Viewing a Job File
Function
This API is used to check whether there are jobs and scripts in the job file to be imported from OBS to DLF.
URI
- Parameter description
Table 1 URI parameter description Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
Request Message
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| path | Yes | String | If OBS is deployed, the job definition file is stored on OBS, for example, obs://myBucket/jobs.zip. If OBS is not deployed deployed, the job definition file is stored in the local PC. |
Response Message
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| jobs | No | List<Job> | Job information. For details, see Table 4. |
| scripts | No | List<Script> | Script information. For details, see Table 5. |
| resources | No | List<Resource> | Resource information referenced in the job. For details, see Table 6. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| params | No | Map<String,String> | Job parameter. |
| name | Yes | String | Job name. |
| path | Yes | String | Path of the job. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Name of the script. |
| path | Yes | String | Path of the script. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Name of the resource. |
| status | Yes | Int | Resource status. 0 indicates that the resource does not exist; 1 indicates that the resource exists. |
| type | Yes | String | Resource type. The value can be:
|
Example
View the parameter definitions in the job file on OBS.
- Request
POST /v1/b384b9e9ab9b4ee8994c8633aabc9505/jobs/check-file { "path": "obs://aaaaa/DLF_myJob.zip" }
- Success response
{ "jobs":[ { "name":"test", "path":"/test", "params":{ "ddd":"dddd" } }, { "name":"test1", "path":"/test", "params":{ "ddd":"dddd" } } ], "scripts":[ { "name":"script1", "path":"/path1" }, { "name":"script2", "path":"/path1" } ] }
Status Code
For details about status codes, see Status Codes.
Last Article: Batch Exporting Jobs
Next Article: Importing a Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.