Querying the List of Visualization Jobs
Sample Code
In ModelArts notebook, you do not need to enter authentication parameters for session authentication. For details about session authentication of other development environments, see Session Authentication.
1 2 3 4 5 |
from modelarts.session import Session from modelarts.estimator import VisualizationJob session = Session() job_list = VisualizationJob.get_visualization_job_list(modelarts_session=session, status=8, per_page=10, page=1, sort_by="create_time", order="asc", search_content="job") print(job_list) |
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
modelarts_session |
Yes |
Object |
Session object. For details about the initialization method, see Session Authentication. |
status |
No |
String |
Status of a visualization job. 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/sort_by |
No |
String |
When AK/SK-based authentication is used, the parameter name is sortBy. When the username and password are used for authentication, the parameter name is sort_by. The parameter specifies the sorting mode of the query. The value can be job_name, job_desc, status, duration, create_time, or log_dir. Default value: job_name |
order |
No |
String |
Sorting order. The options are as follows:
|
search_content |
No |
String |
Search content, for example, a visualization job name. The value consists of 0 to 100 characters. By default, this parameter is left blank. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code when the API fails to be called. For details, see Error Codes. This parameter is not included when the API call succeeds. |
error_msg |
String |
Error message when the API call fails. 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 3. |
Parameter |
Type |
Description |
---|---|---|
job_id |
Integer |
ID of a visualization job |
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 |
Running duration of a visualization job, in milliseconds |
job_desc |
String |
Description of a visualization job |
service_url |
String |
Endpoint of a visualization job |
train_url |
String |
Path to visualization job logs |
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