Rapidata Job API

The Job API from Rapidata — 21 operation(s) for job.

OpenAPI Specification

rapidata-job-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Rapidata Asset Job API
  description: The API for the Rapidata Asset service
  version: v1
servers:
- url: https://api.rapidata.ai/
tags:
- name: Job
  x-displayName: Job
paths:
  /job/{jobId}/approve:
    post:
      tags:
      - Job
      summary: Approves a job in manual review so its pipeline can start processing.
      parameters:
      - name: jobId
        in: path
        description: The ID of the job to approve.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/definition:
    post:
      tags:
      - Job
      summary: Creates a new job definition.
      description: A preview pipeline is automatically created and returned in the response.
      requestBody:
        description: The job definition parameters.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateJobDefinitionEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateJobDefinitionEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job:
    post:
      tags:
      - Job
      summary: Creates a new job from a job definition and audience.
      description: "If the audience is not already recruiting, recruiting is started automatically.\n The RecruitingStarted field indicates whether this happened."
      requestBody:
        description: The job creation parameters.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateJobEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateJobEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/definition/{definitionId}/revision:
    post:
      tags:
      - Job
      summary: Creates a new revision for an existing job definition.
      description: "Unspecified fields are inherited from the previous revision. Workflow and Referee must be\n provided together if either is specified."
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition to create a revision for.
        required: true
        schema:
          type: string
      requestBody:
        description: The revision parameters.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateJobRevisionEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateJobRevisionEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    get:
      tags:
      - Job
      summary: Gets the latest revision for a job definition.
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobRevisionEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/definition/{definitionId}:
    delete:
      tags:
      - Job
      summary: Deletes a job definition and all its revisions.
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition to delete.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    get:
      tags:
      - Job
      summary: Gets a job definition by its id.
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobDefinitionByIdEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    patch:
      tags:
      - Job
      summary: Updates a job definition.
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition to update.
        required: true
        schema:
          type: string
      requestBody:
        description: The fields to update.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateJobDefinitionEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/{jobId}:
    delete:
      tags:
      - Job
      summary: Deletes a job.
      parameters:
      - name: jobId
        in: path
        description: The id of the job to delete.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    get:
      tags:
      - Job
      summary: Gets a job by its id.
      parameters:
      - name: jobId
        in: path
        description: The id of the job to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobByIdEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    patch:
      tags:
      - Job
      summary: Updates a job.
      parameters:
      - name: jobId
        in: path
        description: The id of the job to update.
        required: true
        schema:
          type: string
      requestBody:
        description: The fields to update.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateJobEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/{jobId}/download-results:
    get:
      tags:
      - Job
      summary: Downloads the results of a job as a file attachment.
      parameters:
      - name: jobId
        in: path
        description: The id of the job to download results for.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/{jobId}/cost-estimate:
    get:
      tags:
      - Job
      summary: Estimates the cost of running a job to completion.
      description: "The estimate multiplies a representative per-response cost sampled from the job's rapids by\n the total number of responses its referee requires. Returns 409 while the estimate is not\n yet available because the job has no rapids, or when the referee is unbounded."
      parameters:
      - name: jobId
        in: path
        description: The id of the job to estimate.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobCostEstimateEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/definition/{definitionId}/cost-estimate:
    get:
      tags:
      - Job
      summary: Estimates the cost of running a job definition's latest revision to completion.
      description: "The estimate multiplies a representative per-response cost sampled from the definition's\n rapids by the total number of responses its referee requires. Returns 409 while the estimate\n is not yet available because no rapids exist, or when the referee is unbounded."
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition to estimate.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobDefinitionCostEstimateEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/{jobId}/results:
    get:
      tags:
      - Job
      summary: Gets the results of a job as a JSON string.
      description: For file download, use the download-results endpoint instead.
      parameters:
      - name: jobId
        in: path
        description: The id of the job to get results for.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: string
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/definition/{definitionId}/revision/{revisionNumber}:
    get:
      tags:
      - Job
      summary: Gets a specific revision for a job definition.
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition.
        required: true
        schema:
          type: string
      - name: revisionNumber
        in: path
        description: The revision number to retrieve.
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobRevisionEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/{jobId}/pause:
    post:
      tags:
      - Job
      summary: Pauses a job, stopping all of its campaigns from processing.
      parameters:
      - name: jobId
        in: path
        description: The ID of the job to pause.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /jobs/aggregated-overview:
    get:
      tags:
      - Job
      summary: Retrieves jobs aggregated by customer with total counts and most recent job information.
      parameters:
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - amount
            - -amount
            - last7_days
            - -last7_days
            - last_job_date
            - -last_job_date
            - owner_mail
            - -owner_mail
            type: string
        x-parameter-group: sort
      - name: owner_mail
        in: query
        description: Filter by owner_mail.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: last_job_date
        in: query
        description: Filter by last_job_date.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: last_job_name
        in: query
        description: Filter by last_job_name.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: logic
        in: query
        description: 'How to combine the field filters: "and" (default) requires every filter to match, "or" requires any of them to match.'
        schema:
          enum:
          - and
          - or
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryAggregatedJobsEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/definitions:
    get:
      tags:
      - Job
      summary: Queries job definitions visible to the caller.
      description: Results are scoped to the caller's customer unless the caller is allowed to view all job definitions.
      parameters:
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - name
            - -name
            - created_at
            - -created_at
            type: string
        x-parameter-group: sort
      - name: definition_id
        in: query
        description: Filter by definition_id.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: name
        in: query
        description: Filter by name.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: definition_type
        in: query
        description: Filter by definition_type.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: created_at
        in: query
        description: Filter by created_at.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: owner_id
        in: query
        description: Filter by owner_id.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: owner_mail
        in: query
        description: Filter by owner_mail.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: logic
        in: query
        description: 'How to combine the field filters: "and" (default) requires every filter to match, "or" requires any of them to match.'
        schema:
          enum:
          - and
          - or
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryJobDefinitionsEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /job/definition/{definitionId}/revisions:
    get:
      tags:
      - Job
      summary: Queries the revisions of a specific job definition.
      parameters:
      - name: definitionId
        in: path
        description: The id of the job definition.
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - revision_number
            - -revision_number
            - created_at
            - -created_at
            type: string
        x-parameter-group: sort
      - name: revision_number
        in: query
        description: Filter by revision_number.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: created_at
        in: query
        description: Filter by created_at.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: state
        in: query
        description: Filter by state.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: logic
        in: query
        description: 'How to combine the field filters: "and" (default) requires every filter to match, "or" requires any of them to match.'
        schema:
          enum:
          - and
          - or
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryJobRevisionsEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /jobs:
    get:
      tags:
      - Job
      summary: Queries jobs visible to the caller.
      description: Results are scoped to the caller's customer unless the caller is allowed to view all jobs.
      parameters:
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - name
            - -name
            - created_at
            - -created_at
            - state
            - -state
            - owner_mail
            - -owner_mail
            - progress
            - -progress
            type: string
        x-parameter-group: sort
      - name: id
        in: query
        description: Filter by id.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
        

# --- truncated at 32 KB (87 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/rapidata/refs/heads/main/openapi/rapidata-job-api-openapi.yml