指令碼 API
對於更高級的指令碼開發人員,您可以透過編程方式開啟和儲存指令碼,以幫助實現自動化的開發過程。展開下面的下拉式清單以檢視每個 API 的基本細節。

摘要:按名稱或 masterId 返回指令碼的 XML。
描述:此方法按名稱或 masterId 返回指令碼的 XML。
參數:
- name: scriptPath
in: path
description: full path of script
required: true
style: simple
explode: false
schema:
type: string
- name: scriptId
in: path
description: master id of a script
required: true
style: simple
explode: false
schema:
type: integer
回應:
'200':
description: SUCCESS
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of a script
filePath:
type: string
description: file path
ScriptId:
type: integer
description: MasterId
body:
type: string
description: XML of a Script
'400': description: Invalid params
'404': description: Not found
'500': description: Internal error
'501': description: Incontrol.Net Service Internal Error

摘要:儲存新指令碼或現有指令碼。
描述:此方法將使用 base64 字串將指令碼儲存到 DB 中。
參數:
- name: scriptPath
in: path
description: full path and the name of the Script
required: true
style: simple
explode: false
schema:
type: string
- name: body
in: path
description: 'body of the Script, this is a XML encoded in base64'
required: true
style: simple
explode: false
schema:
type: string
回應:
'200':
description: Success
content:
application/json:
schema:
SaveScript:
type: object
properties:
ScriptId:
type: string
description: The new ScriptId generated after the save was successful
'400': description: Invalid Parameters
'405': description: Locked by someone else
'500': description: Internal Error
'501': description: Service Internal Error

摘要:儲存新指令碼或現有指令碼。
描述:此方法將使用 base64 字串將指令碼儲存到 DB 中。
參數:
- name: scriptPath
in: path
description: full path and the name of the Script
required: true
style: simple
explode: false
schema:
type: string
- name: body
in: path
description: 'body of the Script, this is a XML encoded in base64'
required: true
style: simple
explode: false
schema:
type: string
回應:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
ScriptId:
type: string
description: The new ScriptId generated after the save was successful
'400': description: Invalid Parameters
'405': description: Locked by someone else
'500': description: Internal Error
'501': description: Service Internal Error

摘要:踢掉一個鎖定的指令碼。
描述:此方法將強制解鎖指令碼。
參數:
- name: scriptPath
in: path
description: full path of script
required: true
style: simple
explode: false
schema:
type: string
回應:
'200': description: Success
type: object
properties:
type: string
description: Request Date
ErrorMessage:
type: string
description: Error Message from Service
ErrorState:
type: boolean
description: Error state
KickResult:
type: string
description: Result of service
MasterID:
type: integer
description: Master ID of Script
CurrLockedBy:
type: integer
description: ID of kicked User
'400': description: Invalid Parameters, Script Already Unlocked, You Cannot Kick Yourself From Script
'404': description: ScriptNotFound
'500': description: Internal Error
'501': description: Service Internal Error

摘要:返回指令碼的記錄。
描述:此方法按名稱返回指令碼的記錄。
參數:
- name: scriptPath
in: path
description: full path of script
required: true
style: simple
explode: false
schema:
type: string
回應:
'200':
description: SUCCESS
content:
application/json:
schema:
HistoryScripts:
type: object
properties:
name:
type: string
description: full path of a script joined with the name
versions:
type: array
項目:
HistoryScripts_versions:
type: object
properties:
scriptId:
type: integer
description: Master ID of script
modifyDate:
type: string
description: Modify date
modifyUser:
type: string
description: Modify user
狀態:
type: string
description: Status of a script
'400': description: Invalid params
'404': description: Not found
'500': description: Internal error
'501': description: Incontrol.Net Service Internal Error

get:
tags:
摘要:搜尋指令碼
描述:此方法將根據關鍵字在業務單位中搜尋指令碼。
參數:
name: mediaType
in: query
description: Media type of the script.
required: false
explode: false
schema:
type: integer
name: scriptName
in: path
description: keyword for search
required: true
style: simple
explode: false
schema:
type: string
name: includeInactive
in: query
description: This variable is used to include the search among the inactive scripts.
required: false
explode: false
schema:
type: boolean
name: includeTrusted
in: query
description: This variable is used to include the search among trusted business units
required: false
explode: false
schema:
type: string
name: modEndDate
in: query
description: This variable is used to include the search in an established range of dates
required: false
explode: false
schema:
type: string
回應:
'200':
description: SUCCESS
content:
application/json:
schema:
$ref: '#/components/schemasSearchScript'
'400':
description: Invalid params
'401':
description: Unautohrized.You do not have sufficient permissions
'404':
description: Script path not found
'500':
description: Internal error
'501':
description: Incontrol.Net service internal error
元件:
schemas:
GetScript:
type: object
properties:
name:
type: string
description: 'Name of the script'
filePath:
type: string
description: 'Full script path'
scriptId:
type: integer
description: 'This is the script identifier, it is unique'
body:
type: string
description: 'Script content encoded in Base63 format'
DeleteScript:
type: object
properties:
scriptPath:
type: string
description: 'Information of the full path script name that was removed'
deleted:
type: boolean
description: 'Status of the script'
error:
type: string
description: 'If an error occurs in the deletion process'
SearchScript:
type: object
properties:
type: integer
description: 'Information of the business unit'
scriptName:
type: string
description: 'Full script path'
scriptSearchDetails:
type: array
description: 'Detail of the search result'
items:
$ref: '#/components/schemas/SearchScript_Details'
SearchScript_Details:
type: object
properties:
busNo:
type: integer
description: 'Business unit number'
masterID:
type: string
description: 'Script identifier'
scriptName:
type: string
description: 'Name of the script'
status:
type: string
description: 'Status of the script active/inactive'
mediaType:
type: integer
description: 'Media type number'
modifyDate:
type: string
description: 'The date of the last modification
mUser:
type: integer
description: 'The last user who has modified the script'
actionID:
type: integer
description: 'Action identifier'