Querying Script Details
Function
This API is used to query a script, including the script type and script content.
URI
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain a project ID, see Project ID and Account ID.
script_name
Yes
String
Script name.
version
No
integer
Script version. If the version number is transferred, the script of the specified version is queried. If the version number is not transferred, the script of the latest version is queried.
status
No
String
Used to query the script status if version is not specified. The default value is SAVED, indicating that the latest submitted version is to be queried. If the value is PUBLISHED, the production version of the script is to be queried.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workspace |
No |
String |
Workspace ID.
|
Response Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Script name. The name contains a maximum of 128 characters, including only letters, numbers, hyphens (-), and periods (.). The script name must be unique. |
type |
Yes |
String |
Script type.
|
content |
Yes |
String |
Script content. A maximum of 64 KB is supported. |
directory |
No |
String |
Directory for storing the script. Access the DataArts Studio console and choose DataArts Factory. In the left navigation pane, choose . In the directory tree of the script, you can view the created directories. The default directory is the root directory. |
connectionName |
No |
String |
Name of the connection associated with the script. This parameter is mandatory when type is set to DLISQL, SparkSQL, HiveSQL, DWSSQL, Shell, PRESTO, ClickHouseSQL, ImpalaSQL, RDSSQL, or HetuEngineSQL. To obtain the existing connections, refer to the instructions in Querying a Connection List (to Be Taken Offline). By default, this parameter is left blank. |
database |
No |
String |
Database associated with an SQL statement. This parameter is available only when type is set to DLISQL, SparkSQL, HiveSQL, DWSSQL, PRESTO, RDSSQL, ClickHouseSQL, ImpalaSQL, or HetuEngineSQL.
|
queueName |
No |
String |
Queue name of the DLI resource. This parameter is available only when type is set to DLISQL. You can obtain the queue information by calling the API for "Querying All Queues" in the Data Lake Insight API Reference. By default, this parameter is left blank. |
configuration |
No |
map <String,Object> |
Configuration defined by a user for the job. This parameter is available only when type is set to DLISQL. For details about the supported configuration items, see conf parameter description in the "Submitting a SQL Job" section of the Data Lake Insight API Reference. By default, this parameter is left blank. |
description |
No |
String |
Description of the script. The description contains a maximum of 255 characters. |
autoAcquireLock |
No |
boolean |
Whether to automatically obtain the edit lock parameters. The default value is true. |
Example Request
GET /v1/b384b9e9ab9b4ee8994c8633aabc9505/scripts/scriptName
Example Response
Status Codes
See Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot