Figure Eight Job Status API

Control job status.

OpenAPI Specification

figure-eight-job-status-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Appen Platform Account Info Job Status API
  version: 1.0.0
  description: "# Introduction\nHello, and welcome to Appen, the leading data annotation platform for Machine Learning. Our API enables developers to build applications that can programmatically create, edit, and launch Appen jobs, download results, and more! \n\nAppen uses a RESTful API that accepts data requests as URL-encoded key-value pairs. Responses are returned in JSON and authentication is key-based.\n\nBefore integrating with the API, we highly recommend you first build and run a job using our [graphical user interface](https://client.appen.com/sessions/new). Once you have run a job successfully and are satisfied with the results, you can automate the process using the Appen API.\n\n# Authentication\nYou will need to supply your Appen API key to access the API. To find your API key:\n1. Click the Account button located in the bottom corner of the Global Navigation bar on the left side of any page.\n![Appen Authentication](/assets/img/authentication1.png \"Appen Authentication\")\n2. Click the API tab and find your key listed under the Your API Key section. \n![Appen API](/assets/img/authentication2.png \"Appen API key\")\n\nFor requests listed below, the API Key will be listed as `{api_key}`. \n\nThe API key needs to be included in the header for every request: \n```\n  headers: { \n\n   \"AUTHORIZATION\" => \"Token token={api_key}\" \n\n  } \n```\n\nYou may also see other variables, such as `{job_id}` for operations pertaining to a specific job, or `{team_id}` when completing operations relevant to an entire team (like listing all available jobs). Job ID's can be determined from the job listing page or the URL. A team id is visible in the URL of the Teams tab in the Account page. \n# Resources\nThere are three primary data objects on Appen that correspond to resources on the API:\n## Jobs\nA **Job** is an interface that connects your data to an online workforce.\n  Each job on the Appen platform has data, instructions, customizable questions for your use case\n  (written in **CML** [](https://success.appen.com/hc/en-us/articles/202817989-CML-Custom-Markup-Language-Overview)),\n  [test questions](https://success.appen.com/hc/en-us/articles/202702985-How-to-Create-Test-Questions),\n  and is worked on by *Contributors*. Contributors submit *Judgments* on the rows of data via a worker interface. \n    * All jobs in a single account can be found [on your jobs page](https://client.appen.com/jobs) and will be\n    identified by a unique numeric id.\n## Units (also known as 'Rows')\nA **Unit** of data is uploaded to the job from your source data file via API or GUI. \n## Judgments \nA **Judgment** is the set of responses submitted by a contributor on a particular unit of data. It is\n  recommended to collect multiple judgments and compare them to one another or aggregate to the top response. For\n  each job, you can specify the number of judgments you would like each row to receive.\n# Responses and Messaging\nEach request to the Appen API returns an HTTP status code response and one or both of the following:\n* An application response message (in JSON) \n* A JSON representation of the object (job, unit, or judgments) requested\nSee the below sections of different API Requests, Responses and Messaging for more information:\n1. [Job Create/Update](/#tag/Job-CreateUpdate)\n2. [Manage Job Data](/#tag/Manage-Job-Data)\n3. [Job Status](/#tag/Job-Status)\n4. [Monitor Contributors](/#tag/Monitor-Contributors)\n5. [Manage Job Settings](/#tag/Manage-Job-Settings)\n6. [Job Results](/#tag/Job-Results)\n7. [Account Info](/#tag/Account-Info)\n"
  license:
    name: Licensed under Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: https://www.appen.com/privacy-statement/
  contact:
    email: help@appen.com
servers:
- url: https://api.appen.com/v1
  description: Production Server
tags:
- name: Job Status
  description: Control job status.
  externalDocs:
    url: https://success.appen.com/hc/en-us/articles/202703435-Jobs-Resource-Attributes
paths:
  /jobs/{job_id}.json:
    get:
      tags:
      - Job Status
      summary: Get job attributes.
      description: 'Gets the .json of the Job identified by the job_id parameter of the

        request. This includes the total cost and job state.

        '
      parameters:
      - $ref: '#/components/parameters/job_id'
      - $ref: '#/components/parameters/api_key'
      responses:
        '200':
          description: JSON representation of Job
      x-code-samples:
      - lang: Shell
        label: cURL
        source: 'curl -X GET \

          "https://api.appen.com/v1/jobs/{job_id}.json" \

          -H "Authorization: Token token={api_key}" \

          '
  /jobs/{job_id}/orders.json:
    post:
      tags:
      - Job Status
      summary: Launch a job.
      description: Launch a job.
      parameters:
      - $ref: '#/components/parameters/job_id'
      - $ref: '#/components/parameters/api_key'
      - $ref: '#/components/parameters/channel_id'
      - in: query
        name: debit[units_count]
        required: true
        description: The number of rows to be launched
        schema:
          type: integer
      responses:
        '200':
          description: 'JSON object, including credit balance, starting and ending Unit id''s,

            etc.

            '
      x-code-samples:
      - lang: Shell
        label: cURL - On Demand Channel
        source: 'curl -X POST \

          "https://api.appen.com/v1/jobs/{job_id}/orders.json" \

          --data-urlencode "channels[0]=on_demand" \

          --data-urlencode "debit[units_count]=100" \

          -H "Authorization: Token token={api_key}"

          '
      - lang: Shell
        label: cURL - Internal Channel
        source: 'curl -X POST \

          "https://api.appen.com/v1/jobs/{job_id}/orders.json" \

          --data-urlencode "channels[0]=cf_internal" \

          --data-urlencode "debit[units_count]=100" \

          -H "Authorization: Token token={api_key}"

          '
      - lang: Shell
        label: cURL - Two Channels
        source: "curl -X POST \\\n\"https://api.appen.com/v1/jobs/{job_id}/orders.json\" \\\n--data-urlencode \"channels[0]=on_demand\" \\\n--data-urlencode \"channels[1]=cf_internal\" \\ \n--data-urlencode \"debit[units_count]=100\" \\\n-H \"Authorization: Token token={api_key}\" \\\n"
  /jobs/{job_id}/pause.json:
    get:
      tags:
      - Job Status
      summary: Pause a job.
      description: Pause a Job that is currently running.
      parameters:
      - $ref: '#/components/parameters/job_id'
      - $ref: '#/components/parameters/api_key'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                    example: Your job is being paused.
      x-code-samples:
      - lang: Shell
        label: cURL
        source: 'curl -X GET \

          "https://api.appen.com/v1/jobs/{job_id}/pause.json" \

          -H "Authorization: Token token={api_key}" \

          '
  /jobs/{job_id}/resume.json:
    get:
      tags:
      - Job Status
      summary: Resume a job.
      description: Resume a job that had been paused.
      parameters:
      - $ref: '#/components/parameters/job_id'
      - $ref: '#/components/parameters/api_key'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                    example: Your job is being resumed.
      x-code-samples:
      - lang: Shell
        label: cURL
        source: 'curl -X GET \

          "https://api.appen.com/v1/jobs/{job_id}/resume.json" \

          -H "Authorization: Token token={api_key}" \

          '
  /jobs/{job_id}/cancel.json:
    get:
      tags:
      - Job Status
      summary: Cancel a job.
      description: Cancels a job.
      parameters:
      - $ref: '#/components/parameters/job_id'
      - $ref: '#/components/parameters/api_key'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                    example: Your job is being canceled.
      x-code-samples:
      - lang: Shell
        label: cURL
        source: 'curl -X GET \

          "https://api.appen.com/v1/jobs/{job_id}/cancel.json" \

          -H "Authorization: Token token={api_key}" \

          '
  /jobs/{job_id}/ping.json:
    get:
      tags:
      - Job Status
      summary: Get the status of a job.
      description: Get the Status of a Job (includes Unit and Judgment counts).
      parameters:
      - $ref: '#/components/parameters/job_id'
      - $ref: '#/components/parameters/api_key'
      responses:
        '200':
          description: OK - JSON payload comprising judgment and row counts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  golden_units:
                    type: integer
                    example: 22
                  all_units:
                    type: integer
                    example: 220
                  ordered_units:
                    type: integer
                    example: 100
                  completed_units_estimate:
                    type: integer
                    example: 88
                  needed_jugdments:
                    type: integer
                    example: 36
                  all_judgments:
                    type: integer
                    example: 264
                  tainted_judgments:
                    type: integer
                    example: 0
                  completed_gold_estimate:
                    type: integer
                    example: 11
                  completed_non_gold_estimate:
                    type: integer
                    example: 77
      x-code-samples:
      - lang: Shell
        label: cURL
        source: 'curl -X GET \

          "https://api.appen.com/v1/jobs/{job_id}/ping.json" \

          -H "Authorization: Token token={api_key}" \

          '
components:
  schemas:
    new_job_id:
      description: Integer identifier of the requested resource (Job, Unit, Workflow) used in API request paths and response bodies.
      type: integer
      format: int64
      readOnly: true
      minimum: 1
      maximum: 9223372036854776000
      example: 1234567
  parameters:
    channel_id:
      in: query
      name: channel_id
      description: "A unique identifier for a group of contributors. Variable name: `{channel_id}`. \n"
      required: true
      schema:
        type: string
    api_key:
      name: key
      in: query
      required: true
      description: "Your personal Appen API key; used to access the Appen platform. Can be found in your [account settings](https://client.appen.com/account/api). Variable name: `{api_key}`. \n"
      schema:
        type: string
    job_id:
      in: path
      name: job_id
      description: "A unique identifier for a job or task that is distributed to contributors. Variable name: `{job_id}`. \n"
      required: true
      schema:
        $ref: '#/components/schemas/new_job_id'