Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. IDMC REST API
  3. REST API resource quick references
  4. Platform REST API version 2 resources
  5. Platform REST API version 3 resources
  6. Data Integration REST API
  7. Cloud Data Integration for PowerCenter (CDI-PC) REST API
  8. Data Ingestion and Replication REST API
  9. Customer Managed REST API
  10. RunAJob utility
  11. ParamSetCli utility
  12. REST API codes

REST API Reference

REST API Reference

Resume a database or application ingestion and replication task

Resume a database or application ingestion and replication task

Use the resume action of the job resource to resume a
database ingestion and replication
job or
application ingestion and replication
job that failed or was stopped or aborted because of a schema drift error.

POST request

Use the following POST request to resume a job:
POST /dbmi/public/api/v2/job/resume
Include the following required attributes in the request body:
Field
Type
Description
jobId
integer
The ID of the job that you want to resume.
parameters
Map<String, JSON>
Overrides schema drift options and controls how a job that is in a Stopped, Aborted, or Failed state resumes.
For an incremental load job, resume options are:
  • replicate
    . Allows the job to replicate the DDL changes to the target.
  • ignore
    . Does not replicate DDL changes that occur on the source database to the target.
  • stop
    . Stops processing the source table on which the DDL change occurred.
Set the resume option based on what your source supports:
  • REPLICATE
    . For incremental or combined load jobs that are in the Stopped, Aborted, or Failed state due to a schema drift error, allows the job to replicate the DDL change to the target. This override applies only to tables in an Error state caused by the configured
    Stop Table
    or
    Stop Job
    schema drift settings.
  • IGNORE
    . For incremental or combined load jobs that are in the Stopped, Aborted, or Failed state due to a schema drift error, does not replicate DDL changes that occur on the source database to the target. This override applies only to tables in an Error state caused by the
    Stop Table
    or
    Stop Job
    schema drift settings.
  • STOP_TABLE
    . For incremental or combined load jobs that are in the Stopped, Aborted, or Failed state due to a schema drift error, stops processing the source table on which the DDL change occurred. This override applies only to tables in an Error state caused by the configured
    Stop Table
    or
    Stop Job
    schema drift settings.
  • RESYNC
    . For combined load jobs that have Failed or Running With Warnings state due to a schema drift error, resynchronizes the tables that are in error. You can't use this command if the job uses a source that allows selecting individual columns for replication or if the source does not support schema drift.
  • RESYNC_RETAIN
    . For combined load jobs that are in the Stopped, Aborted, or Failed state and have a source that supports selecting individual columns for data replication, resynchronizes the same columns that have been processed for CDC, retaining the current structure of the source and target tables. No checks for changes to the source or target table definitions are performed. If source DDL changes affected the source table structure, those changes are not processed.
  • RESYNC_REFRESH
    . For combined load jobs that are in the Stopped, Aborted, or Failed state and have a source that supports selecting individual columns for data replication, resynchronizes the target tables with the latest source table definitions, including any DDL changes. After the target tables are refreshed, the structure of source and target tables match.
If you are resynchronizing a subtask for a database ingestion and replication combined load job that has a Db2 for i, Db2 for LUW Log-based CDC, Oracle, PostgreSQL, SAP HANA, or SQL Server source, or an application ingestion and replication combined load job that has a NetSuite, Salesforce, or SAP Mass Ingestion source, use RESYNC_RETAIN or RESYNC_REFRESH option instead of the
Resync
option.

Request body

Use the following request body to pass attributes without resume options:
{ "jobId": <jobId>, "parameters": { "resumeOptions":null} }
Use the following request body to pass attributes with resume options. The example includes resume options to replicate all schema changes:
{ "jobId": <jobId>, "parameters": { "resumeOptions":{"schemaChangeOptions":[{"pattern":"*.*","action":"REPLICATE"}]}} }
If you specify the RESYNC or RESYNC_RETAIN resume option, the API automatically applies a generic pattern "*.*" to resyncPatterns, so you do not need to specify a pattern explicitly. For IGNORE, REPLICATE, and STOP_TABLE resume options, the API uses the pattern you specify in the resumeOptions field. The API creates a SchemaChangeHandlingOption for the pattern with a list of SchemaDriftItems for schema operations such as DROP_COLUMN, ADD_COLUMN, RENAME_COLUMN, and MODIFY_COLUMN. Each operation is mapped to a corresponding SchemaDriftAction derived from the resume action.
For example:
{ "jobId": 15, "parameters": { "resumeOptions":{"schemaChangeOptions":[{"pattern":"*.*","action":"REPLICATE"}]}} }
In this request, all tables in the
sales
schema replicates the schema changes.

Success response

A successful response returns the Success status, which indicates the job has been accepted to resume.
{ "status": "Success", "code": 202, "message": "Job with org id 2HimcQ9cXW5kLUCOUkXGi8 and job name zendeskToSlfk-UserA-test_8 has been accepted to resume successfully." }
The resume job API processes requests asynchronously. To verify whether the job resumed successfully, query the Get Job Status API with the job ID. For more information, see Get Job Status API.

Failed responses

If the request fails, the API returns one of the following HTTP error codes:
HTTP status code
Error code
Error message
400
CDIR_VALIDATION_MISSING_FIELD
Required parameter {field} is missing.
400
CDIR_VALIDATION_ INVALID_VALUE
Value for {field} is invalid.
401
CDIR_AUTH_UNAUTHORIZED
Authentication failed. Access token is missing or expired.
403
CDIR_AUTHZ_FORBIDDEN
You do not have the required permissions for this request.
404
CDIR_JOB_NOT_FOUND
Job {jobId} was not found.
409
CDIR_JOB_ALREADY_RUNNING
Job {jobId} is already running.
409
CDIR_JOB_NOT_DEPLOYED
Deploy the job {jobId} before performing this operation.
409
CDIR_JOB_INVALID_STATE like deployed and completed
Job {jobId} cannot perform the requested action while in state {state}. Verify the job's status before retrying.
500
CDIR_INTERNAL_ERROR
An unexpected internal error occurred with this job.
503
CDIR_SERVICE_UNAVAILABLE
Service is temporarily unavailable.
The following example shows a sample error response when you try to resume a job that is already in a running state:
{ "error": { "httpStatus": 409, "code": "CDIR_JOB_ALREADY_RUNNING", "message": "Job {138593} is already running.", "details": [ { "jobId": "138593" } ], "traceId": "381922d9-45ae-4669-a811-0c9ad363bae9" } }

0 COMMENTS

We’d like to hear from you!