Querying the List of Visualization Jobs
Function
This API is used to query the visualization jobs that meet the search criteria.
URI
GET /v1/{project_id}/visualization-jobs
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
status |
No |
String |
Job status. By default, all job statuses are returned. For example, to query failed jobs, set the value of status to 3, 5, 6, or 13. For details about the job statuses, see Job Statuses. |
|
per_page |
No |
Integer |
Number of jobs displayed on each page. The value range is [1, 100]. Default value: 10 |
|
page |
No |
Integer |
Index of the page to be queried. Default value: 1 |
|
sortBy |
No |
String |
Sorting mode of the query. The value can be job_id, job_name, job_desc, create_time, or status. Default value: job_id |
|
order |
No |
String |
Sorting order. Possible values are as follows:
|
|
search_content |
No |
String |
Search content, for example, a visualization job name. The value is a string of 0 to 64 characters. By default, this parameter is left blank. |
|
workspace_id |
No |
String |
Workspace where a job resides. Default value: 0 |
Request Body
None
Response Body
|
Parameter |
Type |
Description |
|---|---|---|
|
is_success |
Boolean |
Whether the request is successful |
|
error_code |
String |
Error code of a failed API call. For details, see Error Code. This parameter is not included when the API call succeeds. |
|
error_msg |
String |
Error message of a failed API call. This parameter is not included when the API call succeeds. |
|
job_total_count |
Integer |
Total number of the queried visualization jobs |
|
job_count_limit |
Integer |
Number of visualization jobs that can be created |
|
jobs |
JSON Array |
Visualization job attributes. For details, see Table 4. |
|
quotas |
Integer |
Maximum number of training jobs |
|
Parameter |
Type |
Description |
|---|---|---|
|
job_name |
String |
Name of a visualization job |
|
status |
Integer |
Status of a visualization job. For details about the job statuses, see Job Statuses. |
|
create_time |
Long |
Time when a visualization job is created |
|
duration |
Long |
Visualization job running duration, in milliseconds |
|
job_desc |
String |
Description of a visualization job |
|
service_url |
String |
Endpoint of a visualization job |
|
train_url |
String |
Path for storing visualization job logs |
|
job_id |
Long |
ID of a visualization job |
|
resource_id |
String |
Charged resource ID of a visualization job |
|
schedule |
JSON |
Auto stop setting. For details, see Table 5. |
|
remaining_duration |
Int |
Remaining auto stop duration |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Set this parameter to stop. |
|
time_unit |
String |
Unit of auto stop duration. The value is HOURS. |
|
duration |
Int |
Auto stop duration. The value ranges from 0 to 24. |
Samples
The following shows how to query the top 10 visualization jobs that are being deployed on the first page in ascending order.
- Sample request
GET https://endpoint/v1/{project_id}/visualization-jobs ?status=7&per_page=10&page=1&sortBy=status&order=asc& search_content=job_name
- Successful sample response
{ "quotas": 100, "is_success": true, "job_total_count": 1, "job_count_limit": 999, "jobs": [ { "job_id": 1, "job_name": "visualization-job", "status": 1, "create_time": 15099239923, "resource_id": "4787c885-e18d-4ef1-aa12-c4ed0c364b27", "duration": 1502323, "job_desc": "This is a visualization job", "service_url": "https://console.huaweicloud.com/modelarts/tensoarbod/xxxx/111", "train_url": "/obs/name/" , "schedule": [ { "type": "stop", "timeUnit": "HOURS", "duration": 1 } ], "remaining_duration": null } ] } - Failed sample response
{ "is_success": false, "error_msg": "error message", "error_code": "ModelArts.0103" }
Status Code
For details about the status code, see Table 1.
Last Article: Creating a Visualization Job
Next Article: Querying the Details About a Visualization Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.