Obtaining Details About a Custom Script
Function
This API is used to obtain script details.
Constraints: Only details about custom scripts can be queried.
URI
GET /v1/job/scripts/{script_uuid}
Parameter | Mandatory | Type | Description |
|---|---|---|---|
script_uuid | Yes | String | Script UUID. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
script_uuid | String | Script UUID. Minimum length: 1 character Maximum length: 25 characters |
name | String | Script name. Minimum length: 1 character Maximum length: 64 characters |
version | String | Script version number. The field will be discarded later. You are not advised to specify it. Minimum length: 1 character Maximum length: 16 characters |
description | String | Script description Minimum length: 1 character Maximum length: 256 characters |
type | String | Script type. The options are as follows: SHELL: shell script; PYTHON: Python script; BAT: Bat script. The value can be:
|
content | String | Script content Minimum length: 1 character Maximum length: 4096 characters |
script_params | Array of ScriptParamDefine objects | Input parameter Array length: 0 to 20 characters |
status | String | Script status. The options are as follows: PENDING_APPROVE: to be approved; APPROVED: normal (approved); REJECTED: rejected (approved by the reviewer) The value can be:
|
gmt_created | Long | Creation time. Minimum value: 1 Maximum value: 9223372036854775807 |
gmt_modified | Long | Modification time. Minimum value: 1 Maximum value: 9223372036854775807 |
creator | String | Creator. Minimum length: 1 character Maximum length: 64 characters |
creator_id | String | Creator ID. Minimum length: 1 character Maximum length: 32 characters |
operator | String | Modifier. Minimum length: 1 character Maximum length: 32 characters |
properties | ScriptPropertiesModel object | Script label. Risk level (value range: LOW, MEDIUM, and HIGH), reviewer, and interpreter |
Parameter | Type | Description |
|---|---|---|
param_name | String | The parameter name can contain only letters, digits, and underscores (_). Minimum length: 1 character Maximum length: 64 characters |
param_value | String | Default value. Minimum length: 0 character Maximum length: 1,024 characters |
param_description | String | Description of the parameter. Minimum length: 0 character Maximum length: 256 characters |
param_order | Integer | Parameter sequence. The value starts from 1 and must be consecutive. Minimum value: 1 Maximum value: 20 |
sensitive | Boolean | Whether a parameter is sensitive. |
Parameter | Type | Description |
|---|---|---|
risk_level | String | Risk level. LOW: low risk; MEDIUM: medium risk; HIGH: high risk The value can be:
|
version | String | Script version number. Minimum length: 1 character Maximum length: 10 characters |
reviewers | Array of ReviewerInfo objects | Approver. If this parameter is not specified, review is not required. Array length: 0 to 5 characters |
protocol | String | Review message notification protocol, which is used to notify reviewers. DEFAULT: default; SMS: SMS; EMAIL: email; DING_TALK: DingTalk; WE_LINK: WeLink; WECHAT: WeChat; CALLNOTIFY: language; NOT_TO_NOTIFY: no notification The value can be:
|
Request Example
None
Response Example
None
Status Code
Status Code | Description |
|---|---|
200 | Custom script details |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

