Salesforce Jobs API

The Jobs API from Salesforce — 12 operation(s) for jobs.

Documentation

Specifications

Schemas & Data

OpenAPI Specification

salesforce-jobs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Salesforce Bulk API 2.0 Abort Jobs API
  description: 'Salesforce Bulk API 2.0 is a simplified, REST-based interface for bulk data operations that improves on the original Bulk API. It uses a straightforward job model and supports CSV format for ingest and query jobs, enabling processing of millions of records asynchronously.

    '
  version: v63.0
  contact:
    name: Salesforce Developers
    url: https://developer.salesforce.com/
  license:
    name: Salesforce Developer Terms
    url: https://www.salesforce.com/company/legal/agreements/
servers:
- url: https://{instance}.salesforce.com/services/data/v{version}/jobs
  description: Salesforce Bulk API 2.0 jobs endpoint
  variables:
    instance:
      default: yourInstance
      description: 'The Salesforce instance identifier (e.g., na1, eu3, or a My Domain subdomain like mycompany).

        '
    version:
      default: '63.0'
      description: 'The Salesforce API version number (e.g., 63.0). Use the latest supported version for new integrations.

        '
security:
- BearerAuth: []
tags:
- name: Jobs
paths:
  /data/v64.0/jobs/query/:
    parameters: []
    get:
      tags:
      - Jobs
      summary: Salesforce Get Job Info Query
      operationId: GetJobInfoQuery
      parameters: []
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Fri, 17 Nov 2023 16:13:43 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=2/15000
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Accept-Encoding
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json;charset=UTF-8:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessfulGetJobInfoQuery'
                - examples:
                  - id: 750...
                    operation: insert
                    object: Account
                    createdById: 005...
                    createdDate: <datetime>
                    systemModstamp: <datetime>
                    state: Open
                    concurrencyMode: Parallel
                    contentType: CSV
                    apiVersion: 58
                    jobType: Classic
                    retries: 0
                    totalProcessingTime: 0
                    apiActiveProcessingTime: 0
                    apexProcessingTime: 0
                contentMediaType: application/json;charset=UTF-8
              example:
                id: 750...
                operation: insert
                object: Account
                createdById: 005...
                createdDate: <datetime>
                systemModstamp: <datetime>
                state: Open
                concurrencyMode: Parallel
                contentType: CSV
                apiVersion: 58
                jobType: Classic
                retries: 0
                totalProcessingTime: 0
                apiActiveProcessingTime: 0
                apexProcessingTime: 0
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      tags:
      - Jobs
      summary: Salesforce Abort a Job Query
      operationId: AbortaJobQuery
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/AbortaJobQueryRequest'
              - examples:
                - state: Aborted
              contentMediaType: application/json
            example:
              state: Aborted
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 15:10:26 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=29/15000
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json;charset=UTF-8:
              schema:
                allOf:
                - $ref: '#/components/schemas/AbortaJobQuery'
                - examples:
                  - id: 750...
                    operation: query
                    object: Account
                    createdById: 005...
                    createdDate: <datetime>
                    systemModstamp: <datetime>
                    state: Aborted
                    concurrencyMode: Parallel
                    contentType: CSV
                    apiVersion: 58
                contentMediaType: application/json;charset=UTF-8
              example:
                id: 750...
                operation: query
                object: Account
                createdById: 005...
                createdDate: <datetime>
                systemModstamp: <datetime>
                state: Aborted
                concurrencyMode: Parallel
                contentType: CSV
                apiVersion: 58
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      tags:
      - Jobs
      summary: Salesforce Delete Job Query
      operationId: DeleteJobQuery
      parameters: []
      responses:
        '204':
          description: No Content
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 15:08:40 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            Content-Security-Policy:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: upgrade-insecure-requests
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=23/15000
          content: {}
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/jobs/query//results:
    parameters: []
    get:
      tags:
      - Jobs
      summary: Salesforce Get Job Query Result
      operationId: GetJobQueryResult
      parameters:
      - name: Content-Type
        in: header
        description: ''
        required: true
        schema:
          const: application/json
          type: string
          examples:
          - application/json
        example: example_value
      - name: Accept
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - test/csv
        example: example_value
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/jobs/query:
    parameters: []
    get:
      tags:
      - Jobs
      summary: Salesforce Get All Query Jobs
      operationId: GetAllQueryJobs
      parameters:
      - name: isPkChunkingEnabled
        in: query
        description: If set to true, the request only returns information about jobs where PK Chunking is enabled
        required: true
        style: form
        explode: true
        schema:
          type: boolean
          examples:
          - false
        example: true
      - name: jobType
        in: query
        description: BigObjectIngest Classic V2Query
        required: true
        style: form
        explode: true
        schema:
          type: string
        example: example_value
      - name: concurrencyMode
        in: query
        description: serial parallel
        required: true
        style: form
        explode: true
        schema:
          type: string
        example: example_value
      - name: queryLocator
        in: query
        description: use the value from the nextRecordsUrl from the previous set
        required: true
        style: form
        explode: true
        schema:
          type: string
        example: example_value
      - name: Content-Type
        in: header
        description: ''
        required: true
        schema:
          const: application/json
          type: string
          examples:
          - application/json
        example: example_value
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Fri, 17 Nov 2023 16:25:06 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=4/15000
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Accept-Encoding
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json;charset=UTF-8:
              schema:
                type: string
                examples:
                - "{\n    \"done\": true,\n    \"nextRecordsUrl\": null,\n    \"records\": [\n        {\n            \"id\": \"750...\",\n            \"operation\": \"insert\",\n            \"object\": \"Account\",\n            \"createdById\": \"005...\",\n            \"createdDate\": \"<datetime>\",\n            \"systemModstamp\": \"<datetime>\",\n            \"state\": \"Open\",\n            \"concurrencyMode\": \"Parallel\",\n            \"contentType\": \"CSV\",\n            \"apiVersion\": 58,\n            \"jobType\": \"Classic\"\n        },...\n    ]\n}"
                contentMediaType: application/json;charset=UTF-8
              example: "{\n    \"done\": true,\n    \"nextRecordsUrl\": null,\n    \"records\": [\n        {\n            \"id\": \"750...\",\n            \"operation\": \"insert\",\n            \"object\": \"Account\",\n            \"createdById\": \"005...\",\n            \"createdDate\": \"<datetime>\",\n            \"systemModstamp\": \"<datetime>\",\n            \"state\": \"Open\",\n            \"concurrencyMode\": \"Parallel\",\n            \"contentType\": \"CSV\",\n            \"apiVersion\": 58,\n            \"jobType\": \"Classic\"\n        },...\n    ]\n}"
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      tags:
      - Jobs
      summary: Salesforce Successful Create Job Query
      operationId: SuccessfulCreatejobQuery
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/SuccessfulCreatejobQueryRequest'
              - examples:
                - operation: query
                  query: SELECT fields FROM object WHERE filter
                  contentType: CSV
                  columnDelimiter: BACKQUOTE | CARET | COMMA | PIPE | SEMICOLON | TAB
                  lineEnding: CRLF | LF
              contentMediaType: application/json
            example:
              operation: query
              query: SELECT fields FROM object WHERE filter
              contentType: CSV
              columnDelimiter: BACKQUOTE | CARET | COMMA | PIPE | SEMICOLON | TAB
              lineEnding: CRLF | LF
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 15:06:06 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=18/15000
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Accept-Encoding
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json;charset=UTF-8:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessfulCreatejobQuery'
                - examples:
                  - id: 750...
                    operation: query
                    object: Account
                    createdById: 005...
                    createdDate: <datetime>
                    systemModstamp: <datetime>
                    state: UploadComplete
                    concurrencyMode: Parallel
                    contentType: CSV
                    apiVersion: 58
                    lineEnding: LF
                    columnDelimiter: COMMA
                contentMediaType: application/json;charset=UTF-8
              example:
                id: 750...
                operation: query
                object: Account
                createdById: 005...
                createdDate: <datetime>
                systemModstamp: <datetime>
                state: UploadComplete
                concurrencyMode: Parallel
                contentType: CSV
                apiVersion: 58
                lineEnding: LF
                columnDelimiter: COMMA
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/jobs/query//resultPages:
    parameters: []
    get:
      tags:
      - Jobs
      summary: Salesforce Get Parallel Results for a Query Job
      description: Retrieves a set of up to 5 job results pages for parallel download.
      operationId: GetParallelResultsforaQueryJob
      parameters:
      - name: Content-Type
        in: header
        description: ''
        required: true
        schema:
          const: application/json
          type: string
          examples:
          - application/json
        example: example_value
      - name: Accept
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - application/json
        example: example_value
      responses:
        default:
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/GetParallelResultsforaQueryJob'
                - examples:
                  - resultPages:
                    - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=aBcDeFg4N
                    - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=HiJkLmN4N
                    - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=oPQrStU4N
                    - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=vWxYzz4N
                    - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=NiKmABC4N
                    nextRecordsUrl: /jobs/query/750R0000000zxr8IAA/resultpages?locator=YcApWm4N
                    done: false
                contentMediaType: application/json
              example:
                resultPages:
                - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=aBcDeFg4N
                - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=HiJkLmN4N
                - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=oPQrStU4N
                - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=vWxYzz4N
                - resultLink: /jobs/query/750R0000000zxr8IAA/results?locator=NiKmABC4N
                nextRecordsUrl: /jobs/query/750R0000000zxr8IAA/resultpages?locator=YcApWm4N
                done: false
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /async/64.0/job:
    parameters: []
    post:
      tags:
      - Jobs
      summary: Salesforce Bulk Create Job
      operationId: BulkCreateJob
      parameters:
      - name: X-SFDC-Session
        in: header
        description: ''
        required: true
        schema:
          type: string
        example: example_value
      - name: charset
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - UTF-8
        example: example_value
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/BulkCreateJobRequest'
              - examples:
                - operation: insert
                  object: Account
                  contentType: CSV
              contentMediaType: application/json
            example:
              operation: insert
              object: Account
              contentType: CSV
        required: true
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Thu, 16 Nov 2023 16:07:11 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Location:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: /services/async/58.0/job/7502o00000kjNCsAAM
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessfulBulkCreateJob'
                - examples:
                  - apexProcessingTime: 0
                    apiActiveProcessingTime: 0
                    apiVersion: 58
                    assignmentRuleId: null
                    concurrencyMode: Parallel
                    contentType: CSV
                    createdById: 005...
                    createdDate: <date_time>
                    externalIdFieldName: null
                    fastPathEnabled: false
                    id: 750...
                    numberBatchesCompleted: 0
                    numberBatchesFailed: 0
                    numberBatchesInProgress: 0
                    numberBatchesQueued: 0
                    numberBatchesTotal: 0
                    numberRecordsFailed: 0
                    numberRecordsProcessed: 0
                    numberRetries: 0
                    object: <Object>
                    operation: insert
                    state: Open
                    systemModstamp: <date_time>
                    totalProcessingTime: 0
                contentMediaType: application/json
              example:
                apexProcessingTime: 0
                apiActiveProcessingTime: 0
                apiVersion: 58
                assignmentRuleId: null
                concurrencyMode: Parallel
                contentType: CSV
                createdById: 005...
                createdDate: <date_time>
                externalIdFieldName: null
                fastPathEnabled: false
                id: 750...
                numberBatchesCompleted: 0
                numberBatchesFailed: 0
                numberBatchesInProgress: 0
                numberBatchesQueued: 0
                numberBatchesTotal: 0
                numberRecordsFailed: 0
                numberRecordsProcessed: 0
                numberRetries: 0
                object: <Object>
                operation: insert
                state: Open
                systemModstamp: <date_time>
                totalProcessingTime: 0
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /async/64.0/job/:
    parameters: []
    post:
      tags:
      - Jobs
      summary: Salesforce Bulk Close Job
      operationId: BulkCloseJob
      parameters:
      - name: X-SFDC-Session
        in: header
        description: ''
        required: true
        schema:
          type: string
        example: example_value
      - name: charset
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - UTF-8
        example: example_value
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/BulkCloseJobRequest'
              - examples:
                - state: Closed
              contentMediaType: application/json
            example:
              state: Closed
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Thu, 16 Nov 2023 16:23:52 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
 

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