Help Center > > API Reference> Moderation (Image)> Image Moderation (Asynchronous Batch)> Job List Query

Job List Query

Updated at: Mar 09, 2020 GMT+08:00

Function

This API queries a batch of image moderation jobs. You can specify the job status to filter the jobs.

Prerequisites

Before using Text Moderation, you need to apply for the service and complete authentication. For details, see Getting Started with Moderation (Image).

URI

URI format

GET /v1.0/moderation/image/batch/jobs?status={status_type}

Request Message

Table 1 describes the request parameters.

Table 1 Request parameters

Parameter

Mandatory

Type

Description

status

No

String

Indicates the job status. Possible values are as follows:

  • created: indicates that a job is created.
  • running: indicates that a job is being processed.
  • finish: indicates that a job is completed.
  • failed: indicates that a job fails to be processed.

Response Message

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

result

Array

Indicates the calling result when the API is successfully called.

This parameter is not included when the API fails to be called.

job_id

String

Indicates the job ID.

status

String

Indicates the job status. Possible values are as follows:

  • created: indicates that a job is created.
  • running: indicates that a job is being processed.
  • finish: indicates that a job is completed.
  • failed: indicates that a job fails to be processed.

create_time

String

Indicates the time when a job is created. For example, 2018-01-02T15:03:04Z.

update_time

DateTime

Indicates the time when a job is updated. For example, 2018-01-02T15:03:04Z.

error_code

String

Indicates the error code when the API fails to be called. For details, see Error Code.

This parameter is not included when the API is successfully called.

error_msg

String

Indicates the error message when the API fails to be called.

This parameter is not included when the API is successfully called.

Examples

  • Example request
    GET https://moderation.ap-southeast-1.myhuaweicloud.com/v1.0/moderation/image/batch/jobs?status=finish 
    
    Request Header:   
    Content-Type:application/json 
    X-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
  • Example successful response
    {
       "result": [
        {
          "job_id": "53ba32e2-c96a-4d0a-a1df-6ddc75f40aed",
          "status": "finish",
          "create_time": "2018-11-22T06:17:09Z",
          "update_time": "2018-11-22T06:17:16Z"
        }
       ]
    }
  • Example failed response
    {
        "error_code": "AIS.0005",
        "error_msg": "The service does not exist."
    }

Status Code

  • Normal

    200

  • Abnormal

    Return Value

    Description

    400

    • The request cannot be understood by the server due to malformed syntax. The client should not repeat the request without modifications.
    • The request parameter is incorrect.

    401

    The request requires user authentication.

    403

    No operation permission.

    404

    The server has not found anything matching the Request-URI.

    500

    The server encountered an unexpected condition which prevented it from fulfilling the request.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel