Querying a Single Job

Function

Query and display the details of a single job.

URI

  • URI format:
    GET /v2/{project_id}/services/video-topic-segmentation-svc/tasks/{task_id}
  • Parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

    task_id

    Yes

    String

    Job ID

Request Parameters

Example request

GET /v2/{project_id}/services/video-topic-segmentation-svc/tasks/f18320e61e4c4dc685aa2dfc22a28dc5

Response Parameters

  • Example response 1 (output type: obs)
      {
            "id": "f18320e61e4c4dc685aa2dfc22a28dc5",
            "name": "ocr-task",
            "description": "sss",
            "input": {
                      "type": "obs",
                      "data": [
                              {
                                "bucket": "obs-iva",
                                "path": "input/demo.mp4"
                              }
                          ]
       },
            "service_version":"1.0",
            "state": "ABNORMAL",
            "created_at": "2018-06-12T13:00:01Z",
            "updated_at": "2018-06-13T13:00:01Z"
                              }
  • Example response 2 (output type: hosting)
    {
        "service_version": "1.0",
        "output": {
            "hosting": {
                "obs": [
                    {
                        "bucket": "obs-vas-hosting",
                        "path": "video_topics_segmentation/f18320e61e4c4dc685aa2dfc22a28dc5/inputs/20180718CCTV2caijing_part.mp4.json"
       },
                    {
                        "bucket": "obs-vas-hosting",
                        "path": "video_topics_segmentation/f18320e61e4c4dc685aa2dfc22a28dc5/inputs/zhongguoxinwei.mp4.json"
       },
                    {
                        "bucket": "obs-vas-hosting",
                        "path": "video_topics_segmentation/f18320e61e4c4dc685aa2dfc22a28dc5/inputs/201807271900.mp4.json"
       },
                    {
                        "bucket": "obs-vas-hosting",
                        "path": "video_topics_segmentation/f18320e61e4c4dc685aa2dfc22a28dc5/result.json"
                              }
                ],
                "result_json_overdue_at": "2018-11-29T04:37:49Z"
                              }
        },
        "input": {
            "type": "obs",
            "data": [
                {
                    "bucket": "obs-henyou",
                    "path": "inputs/20180718CCTV2caijing_part.mp4",
                    "index": 0
                },
                {
                    "bucket": "obs-henyou",
                    "path": "inputs/zhongguoxinwei.mp4",
                    "index": 1
                },
                {
                    "bucket": "obs-henyou",
                    "path": "inputs/201807271900.mp4",
                    "index": 2
                }
            ]
       },
        "created_at": "2018-11-27T04:34:11Z",
        "name": "est-hosting",
        "id": "f18320e61e4c4dc685aa2dfc22a28dc5",
        "state": "SUCCEEDED",
        "hosting_result": {
            "overdueDate": "2018-11-29T04:37:49Z",
            "data": "[\n{\"name\":\"obs-henyou/inputs/20180718CCTV2caijing_part.mp4\",\"fps\":25,\"results\":[{\"frame\":1127,\"time\":\"00:00:45:02\"},{\"frame\":3587,\"time\":\"00:02:23:12\"},{\"frame\":5121,\"time\":\"00:03:24:21\"},{\"frame\":8020,\"time\":\"00:05:20:20\"},{\"frame\":9978,\"time\":\"00:06:39:03\"},{\"frame\":12393,\"time\":\"00:08:15:18\"}]},\n{\"name\":\"obs-hendayou/inputs/zhongguoxinwei.mp4\",\"fps\":25,\"results\":[{\"frame\":509,\"time\":\"00:00:20:09\"},{\"frame\":3834,\"time\":\"00:02:33:09\"},{\"frame\":4831,\"time\":\"00:03:13:06\"},{\"frame\":5579,\"time\":\"00:03:43:04\"},{\"frame\":8900,\"time\":\"00:05:56:00\"},{\"frame\":10090,\"time\":\"00:06:43:15\"},{\"frame\":11764,\"time\":\"00:07:50:14\"},{\"frame\":14595,\"time\":\"00:09:43:20\"}]},\n{\"name\":\"obs-hendayou/inputs/201807271900.mp4\",\"fps\":25,\"results\":[{\"frame\":445,\"time\":\"00:00:17:20\"},{\"frame\":23264,\"time\":\"00:15:30:14\"},{\"frame\":24033,\"time\":\"00:16:01:08\"},{\"frame\":36675,\"time\":\"00:24:27:00\"},{\"frame\":40639,\"time\":\"00:27:05:14\"},{\"frame\":44387,\"time\":\"00:29:35:12\"}]}\n]",
            "fileSize": "966 bytes",
            "status": "AVAILABLE"
       },
        "updated_at": "2018-11-27T04:37:52Z"
                              }
  • Response parameters

    Parameter

    Type

    Description

    taskDetail

    Object

    Job details. For details, see task.detail.

Status Codes

  • Normal

    200

  • Abnormal

    Status Code

    Description

    400 Bad Request

    Request error. For details about the returned error code, see Error Codes.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    No operation permission.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    Service unavailable.