Table of contents

Job Status API

The Job Status API tracks the running state of harvest and reindex jobs. It is used to establish job status records, as well as, both query and update the count of items walked and indexed.

Job completion percentage will be calculated as: (job.walked_count / job.indexed_count) * 100. Thus, the whole job will be 100% when (walk_complete == true && walked_count == indexed_count)

List Jobs

GET /api/data/v3/jobstatus?all={all}&page-token={page_token}"

  • all - Include complete jobs? (default: false)
  • type - Type of job to search (harvest, reindex, unknown)
  • user - User ID for specific jobs initiated by a user
  • page-token - Token specifying results page (for multi-page results).

Response:

  • Status 200 (OK)
{
    "jobs": [
        {
            "request_id": string,
            "container_id": string,
            "user_id": string,
            "walked_count": int,
            "walk_complete": bool,
            "indexed_count": int,
            "error_count": int,
            "created": zulu timestamp,
            "updated": zulu timestamp,
            "cancelled": boolean
        },
        ...
    ],
    "next_page_token": string,
    "previous_page_token": string
}

Job Details

GET /api/data/v3/jobstatus/{request_id}

Response:

  • Status 200 (OK)
{
    "job": {
        "request_id": string,
        "container_id": string,
        "user_id": string,
        "walked_count": int,
        "walk_complete": bool,
        "indexed_count": int,
        "error_count": int,
        "created": zulu timestamp,
        "updated": zulu timestamp,
        "cancelled": boolean
    }
}

Errors:

  • Status 404 (Not Found) - When request_id not found.

Cancel a harvest job

POST /api/data/v3/jobstatus/{request_id}/cancel

Response:

  • Status 200 (OK)
{
    "job": {
        "request_id": string,
        "container_id": string,
        "user_id": string,
        "walked_count": int,
        "indexed_count": int,
        "created": zulu timestamp,
        "updated": zulu timestamp,
        "cancelled": boolean
    }
}

Errors:

  • Status 404 (Not Found) - When request_id not found.

This documentation is generated from the latest version of GrayMeta Platform. For documentation relevant to your own deployed version, please use the documentation inside the application.