---
schema_version: "1"
id: 8a6f3834a3c937eff8612bd2f5e1a6decceb0e2a5305fe76f59020b63d05db9a
title: Data Jobs (deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/references/generated-api-specs/ocapi-data-jobs.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-jobs
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4d3ad74428e3b1e388dec2d3810257a86ef90f5bf9ea6544a96d30d2f28c422e
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Jobs (deprecated)

# Data Jobs (deprecated)

**Partial reference:** 1 operation(s) were omitted because their source references could not be resolved.

Data API endpoints enable developers to build applications for merchants: Create, update, delete business objects, like products, customers, pricing and promotions or assignments. They typically provide read and write access and are designed for moderate usage.

**Version:** 25.6

## Servers

*   `https://{host}/s/-/dw/data/v25_6`

Protocols: https.

## Security

*   `oauth2_application` (oauth2) Authentication flow with client ID and password with account manager.
    *   OAuth flow application (tokenUrl: https://account.demandware.com:443/dwsso/oauth2/access\_token)
    *   Scope x-info: Scopes are NOT supported. This is just a dummy, because the 'scopes' field is required.
*   `client_id` (apiKey) Add client ID for application identification. Alternative as 'client\_id' query parameter.
    *   API key in header: x-dw-client-id

## Operations

### GET Read job execution

`GET /jobs/{job_id}/executions/{id}`

Operation ID: `Read job execution`. Tags: jobs. Security: oauth2\_application.

Returns job execution information using the specified ID for the job having the specified job ID.

This endpoint may return the following faults:

*   404 - JobExecutionNotFoundException - for an unknown job ID or job execution ID

#### Parameters

*   `job_id` (path, string, required) the ID of the job.  
    Minimum length: 1.
*   `id` (path, string, required) the ID of the job execution

#### Responses

*   **404** `JobExecutionNotFoundException` - for an unknown job ID or job execution ID
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `job_execution`.
    

### DELETE Delete job execution

`DELETE /jobs/{job_id}/executions/{id}`

Operation ID: `Delete job execution`. Tags: jobs. Security: oauth2\_application.

Deletes job execution information using the specified ID for the job having the specified job ID.

This endpoint may return the following faults:

*   403 - JobExecutionNotFinishedException - if the job execution is not finished.
*   404 - JobExecutionNotFoundException - for an unknown job ID or job execution ID

#### Parameters

*   `job_id` (path, string, required) the ID of the job.  
    Minimum length: 1.
*   `id` (path, string, required) the ID of the job execution

#### Responses

*   **204**
*   **403** `JobExecutionNotFinishedException` - if the job execution is not finished.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `JobExecutionNotFoundException` - for an unknown job ID or job execution ID
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

## Schemas

### fault

Document representing a fault message that is returned whenever the HTTP status code is greater than or equal to 400 (which indicates an error).

*   `arguments` (_object_)
    
    A map that provides fault arguments.
    
    Data can be used to provide error messages on the client side.
    
    Additional properties: `object`.
    
*   `cause` (_cause_)
*   `display_message_pattern` (_string_) The localized display message pattern, if the request parameter display\_locale was given
*   `message` (_string_) The message text of the java exception.
*   `stack_trace` (_string_)
*   `type` (_string_) The name of the java exception.

### job\_execution

*   `client_id` (_string_) When the execution was started by a client, this represents the client's id.
*   `continue_information` (_job\_execution\_continue\_information_) The continuation information of this execution if available.
*   `creation_date` (_string (date-time)_)
*   `duration` (_integer (int64)_) Time in milliseconds, the execution was or is running.
*   `effective_duration` (_integer (int64)_) Time in milliseconds, the job has done work. Paused times are evicted.
*   `end_time` (_string (date-time)_) Timestamp, when execution was finished.
*   `executed_server_id` (_string_) The ID of the server that executed the job.
*   `execution_scopes` (_array of string_) Sorted set of all execution scopes, used by individual steps.
*   `execution_status` (_string_) The current execution status.  
    Allowed values: `pending`, `running`, `pausing`, `paused`, `resuming`, `resumed`, `restarting`, `restarted`, `retrying`, `retried`, `aborting`, `aborted`, `finished`, `unknown`.
*   `exit_status` (_status_) The exit status of the execution, if the execution is in execution status 'finished', 'paused' or 'aborted' and is not executed currently anymore.
*   `id` (_string_) ID of the execution object.
*   `is_log_file_existing` (_boolean_) True if the log file exists, otherwise false.
*   `is_restart` (_boolean_) True if this execution represents a job restart.
*   `job_description` (_string_) Description of the job, this execution belongs to.
*   `job_id` (_string_) ID of the job, this execution belongs to.
*   `last_modified` (_string (date-time)_)
*   `log_file_path` (_string_) Full WebDAV path of the log file, containing execution log.
*   `modification_time` (_string (date-time)_) Timestamp of the last modification time for the execution.
*   `parameters` (_array of job\_execution\_parameter_) List of all job execution parameters.
*   `retry_information` (_job\_execution\_retry\_information_) The retry information of this execution if available.
*   `start_time` (_string (date-time)_) Timestamp, when execution was started.
*   `status` (_string_) The current status. If the execution is currently executed the execution status is returned. If the execution is not executed currently anymore the exit status code of the execution.
*   `status_metadata` (_status\_metadata_) The metadata of the status.
*   `step_executions` (_array of job\_step\_execution_) List of all steps, called for job execution.
*   `user_login` (_string_) When the execution was started by a registered user, this represents the user's login.

_Example_

```
{
  "client_id": "af7f5c90-ffc1-4ea4-9613-f5b375b7dc19",
  "duration": 185,
  "end_time": "2016-05-20T11:54:46.220Z",
  "execution_scopes": [
    "SiteGenesis",
    "SiteGenesis-US",
    "SiteGenesis-DE"
  ],
  "execution_status": "finished",
  "exit_status": {
    "code": "OK",
    "status": "ok"
  },
  "id": "90",
  "is_log_file_existing": true,
  "is_restart": false,
  "job_id": "CustomerImportJob",
  "log_file_name": "Job-JobExecutionTestJob1-20160520115446018.log",
  "modification_time": "2016-05-20T11:54:46.224Z",
  "start_time": "2016-05-20T11:54:46.035Z",
  "status": "OK",
  "step_executions": [
    {
      "duration": 16,
      "end_time": "2016-05-20T11:54:46.075Z",
      "execution_scope": "Organization",
      "execution_status": "finished",
      "exit_status": {
        "code": "OK",
        "message": "",
        "status": "ok"
      },
      "id": "41265",
      "modification_time": "2016-05-20T11:54:46.075Z",
      "start_time": "2016-05-20T11:54:46.059Z",
      "status": "OK",
      "step_description": "A step that executes a pipeline that can be configured via a parameter",
      "step_id": "Step1",
      "step_type_id": "ExecutePipeline",
      "step_type_info": "TestScheduleJobProcessPipeline-StartEnd"
    },
    {
      "duration": 12,
      "end_time": "2016-05-20T11:54:46.102Z",
      "execution_scope": "Organization",
      "execution_status": "finished",
      "exit_status": {
        "code": "OK",
        "message": "",
        "status": "ok"
      },
      "id": "41266",
      "modification_time": "2016-05-20T11:54:46.103Z",
      "start_time": "2016-05-20T11:54:46.090Z",
      "status": "OK",
      "step_description": "A step that executes a script module function that can be configured via a parameter",
      "step_id": "Step2",
      "step_type_id": "ExecuteScriptModule",
      "step_type_info": "testScriptModuleStep.ds#execute"
    },
    {
      "duration": 16,
      "end_time": "2016-05-20T11:54:46.132Z",
      "execution_scope": "SiteGenesis-DE",
      "execution_status": "finished",
      "exit_status": {
        "code": "OK",
        "message": "",
        "status": "ok"
      },
      "id": "41267",
      "include_steps_from_job_id": "JobExecutionTestJob2",
      "modification_time": "2016-05-20T11:54:46.132Z",
      "start_time": "2016-05-20T11:54:46.116Z",
      "status": "OK",
      "step_description": "A step that executes a pipeline that can be configured via a parameter",
      "step_id": "Step3 - Step1",
      "step_type_id": "ExecutePipeline",
      "step_type_info": "TestScheduleJobProcessPipeline-StartEnd"
    },
    {
      "duration": 14,
      "end_time": "2016-05-20T11:54:46.159Z",
      "execution_scope": "SiteGenesis-DE",
      "execution_status": "finished",
      "exit_status": {
        "code": "SUCCESS",
        "message": "Step was successful!",
        "status": "ok"
      },
      "id": "41268",
      "include_steps_from_job_id": "JobExecutionTestJob2",
      "modification_time": "2016-05-20T11:54:46.159Z",
      "start_time": "2016-05-20T11:54:46.145Z",
      "status": "SUCCESS",
      "step_description": "",
      "step_id": "Step3 - Step2",
      "step_type_id": "ExecuteScriptModule",
      "step_type_info": "testScriptModuleStep.ds#testReturnStatusOkWithCodeAndMessage"
    },
    {
      "duration": 15,
      "end_time": "2016-05-20T11:54:46.189Z",
      "execution_scope": "SiteGenesis",
      "execution_status": "finished",
      "exit_status": {
        "code": "OK",
        "message": "",
        "status": "ok"
      },
      "id": "41269",
      "include_steps_from_job_id": "JobExecutionTestJob2",
      "modification_time": "2016-05-20T11:54:46.189Z",
      "start_time": "2016-05-20T11:54:46.174Z",
      "status": "OK",
      "step_description": "A step that executes a pipeline that can be configured via a parameter",
      "step_id": "Step3 - Step1",
      "step_type_id": "ExecutePipeline",
      "step_type_info": "TestScheduleJobProcessPipeline-StartEnd"
    },
    {
      "duration": 13,
      "end_time": "2016-05-20T11:54:46.216Z",
      "execution_scope": "SiteGenesis",
      "execution_status": "finished",
      "exit_status": {
        "code": "SUCCESS",
        "message": "Step was successful!",
        "status": "ok"
      },
      "id": "41270",
      "include_steps_from_job_id": "JobExecutionTestJob2",
      "modification_time": "2016-05-20T11:54:46.216Z",
      "start_time": "2016-05-20T11:54:46.203Z",
      "status": "SUCCESS",
      "step_description": "",
      "step_id": "Step3 - Step2",
      "step_type_id": "ExecuteScriptModule",
      "step_type_info": "testScriptModuleStep.ds#testReturnStatusOkWithCodeAndMessage"
    }
  ]
}
```

### cause

*   `cause` (_cause_)
*   `message` (_string_)
*   `type` (_string_)

### job\_execution\_continue\_information

Information for a job execution continuation.

*   `continue_status` (_string_) Returns the status, this job execution will get on continuation if continuation is pending.  
    Allowed values: `pending`, `running`, `pausing`, `paused`, `resuming`, `resumed`, `restarting`, `restarted`, `retrying`, `retried`, `aborting`, `aborted`, `aborting_for_restart`, `aborted_for_restart`, `finished`, `unknown`.
*   `is_pending` (_boolean_) Returns `true` if the continuation of this job execution is pending and will be started soon, `false` otherwise.

### status

*   `code` (_string_) Status code.
*   `message` (_string_) Status message.
*   `status` (_string_) Status shows successful operation end.  
    Allowed values: `ok`, `error`.

_Example_

```
{
  "code": "SUCCESS",
  "message": "Step was successful!",
  "status": "ok"
}
```

### job\_execution\_parameter

Specification of a parameter for a job execution.  
  
Request example to execute the job in all storefront sites:

POST /dw/data/v19\_10/jobs/CustomerImportJob/executions
Host: example.com
Authorization: Bearer af7f5c90-ffc1-4ea4-9613-f5b375b7dc19
Content-Type: application/json; charset=UTF-8
{
"parameters": \[
{
"name": "SiteScope",
"value": "{\\"all\_storefront\_sites\\":true}"
}
\]
}

  
Request example to execute the job in specified sites only:

POST /dw/data/v19\_10/jobs/CustomerImportJob/executions
Host: example.com
Authorization: Bearer af7f5c90-ffc1-4ea4-9613-f5b375b7dc19
Content-Type: application/json; charset=UTF-8
{
"parameters": \[
{
"name": "SiteScope",
"value": "{\\"named\_sites\\":\[\\"SiteGenesis\\", \\"SiteGenesisGlobal\\"\]}"
}
\]
}

*   `name` (_string_, required) The name of the parameter.  
    Minimum length: 1. Maximum length: 256. Pattern: \\S|(\\S(.\*)\\S).
*   `value` (_string_, required) The value of the parameter.  
    Maximum length: 1000. Pattern: \\S|(\\S(.\*)\\S).

### job\_execution\_retry\_information

Retry information for a previous **failed** job execution.

*   `current_retry_attempt` (_integer (int32)_) The current attempt to retry the previous **failed** job execution.
*   `max_retries` (_integer (int32)_) The maximum number of retries.

### status\_metadata

*   `client_id` (_string_) The client ID that is responsible for the status.
*   `reason` (_string_) The reason of the status.
*   `user_login` (_string_) The user login that is responsible for the status.

### job\_step\_execution

*   `chunk_size` (_integer (int32)_) The chunk size for a chunk oriented step execution, otherwise null.
*   `duration` (_integer (int64)_) Time in milliseconds, the execution was or is running.
*   `end_time` (_string (date-time)_) Timestamp, when execution was finished.
*   `execution_scope` (_string_) The ID of the scope this step is or was executed for.
*   `execution_status` (_string_)
    
    Current execution status of the step.
    
    *   'pending': Execution of the step been initiated but the step is not executing yet. Possible next status: 'running'.
        
    *   'running': The step is currently actively executed. Possible next status: 'finished', 'pausing' or 'aborted'.
        
    *   'finished': The step execution is finished and is not actively executed currently. Possible next status: none.
        
    *   'pausing': Pausing of a running step execution has been initiated but the step is not paused yet. Possible next status: 'paused' or 'aborted'.
        
    *   'paused': The step execution is paused and is not actively executed currently. Possible next status: 'pending'.
        
    *   'aborted': A running step execution has been aborted and is not actively executed currently. Possible next status: none.
        
    
      
    Allowed values: `pending`, `running`, `pausing`, `paused`, `resuming`, `resumed`, `restarting`, `restarted`, `retrying`, `retried`, `aborting`, `aborted`, `finished`, `unknown`.
*   `exit_status` (_status_) The exit status of the step execution, if the step execution is in execution status 'finished', 'paused' or 'aborted' and is not executed currently anymore.
*   `id` (_string_) ID of the execution object.
*   `include_steps_from_job_id` (_string_) ID of the job the step of this step execution was included from, if the step was included from another job.
*   `is_chunk_oriented` (_boolean_) True if this execution represents a chunk oriented step execution.
*   `item_filter_count` (_integer (int32)_) The current number of items that have been filtered for a chunk oriented step execution, otherwise null.
*   `item_write_count` (_integer (int32)_) The current number of items that have been written for a chunk oriented step execution, otherwise null.
*   `modification_time` (_string (date-time)_) Timestamp of the last modification time for the execution.
*   `start_time` (_string (date-time)_) Timestamp, when execution was started.
*   `status` (_string_) The current status. If the step execution is currently executed (execution status is one of 'pending', 'running', 'pausing') the execution status is returned. If the step execution is not executed currently anymore (execution status is one one 'finished', 'paused' or 'aborted') the exit status code of the step execution is returned.
*   `status_metadata` (_status\_metadata_) The metadata of the status.
*   `step_description` (_string_) Description of the step, this execution belongs to.ID of the step
*   `step_id` (_string_) ID of the step, this execution belongs to.ID of the step
*   `step_type_id` (_string_) ID of the step's type at the time it is or was executed.
*   `step_type_info` (_string_) Additional information regarding the step's type at the time it is or was executed (e.g. name of a script module and function).
*   `total_item_count` (_integer (int64)_) The total number of items that will be processed for a chunk oriented step execution (null if unknown), otherwise null.

_Example_

```
{
  "duration": 16,
  "end_time": "2016-05-20T11:54:46.075Z",
  "execution_scope": "Organization",
  "execution_status": "finished",
  "exit_status": {
    "code": "OK",
    "message": "",
    "status": "ok"
  },
  "id": "41265",
  "modification_time": "2016-05-20T11:54:46.075Z",
  "start_time": "2016-05-20T11:54:46.059Z",
  "status": "OK",
  "step_description": "A step that executes a pipeline that can be configured via a parameter",
  "step_id": "Step1",
  "step_type_id": "ExecutePipeline",
  "step_type_info": "TestScheduleJobProcessPipeline-StartEnd"
}
```