Create an application ingestion and replication task
Use the task resource to create an application ingestion and replication task.
POST request
Use the following URI to create a task:
/dbmi/public/api/v2/task/create
Include the following fields in the request:
Field
Type
Required/Optional
Description
projectId
string
no
The project ID where you want to create the task. If you do not provide a project ID, the task is created in the default project.
folderId
string
no
The folder ID in the project where you want to create the task. If you do not specify a folder ID, the task is created in the default folder, represented by an empty string "".
taskName
string
yes
Name of the task.
nativeData
JSON object
yes
The entire task definition including source and target connection and task properties, and run-time settings.
POST request example
Use the following sample as a reference to create a task:
POST /dbmi/public/api/v2/task/create Content-Type: application/json Accept: application/json IDS-SESSION-ID:{{IDS_SESSION_ID}} { "projectID": "<projectId>", "folderID":"<folderId", "taskName": "<taskName>", "nativeData": { //Entire Task (JSON) Payload, having full task definition } } }
Successful response
When the REST API successfully performs the action, it returns a 200 success code.
POST response example
A successful POST response returns a summary, similar to the following example:
], "repoPath": null, "repoHandle": "487797", //this is the dbmiTaskId used we would be using further "frsPath": null }, "isSourceControlled": false, "checkedOutById": null }
Use the value returned in the repoHandle as the task ID for further task operations.
Note: Timestamps are in UTC.
Failed responses
For a failed response, the REST API returns a standard HTTP error code.
The following table describes some of the HTTP error codes that might be returned:
Name
HTTPS status code
Error message
Unauthorized
401
Invalid or missing sessionId.
Forbidden
403
Logged-in user does not have permission to create a task or access the specified folder.
Not found
404
The specified projectId does not exist in the project.
Not found
404
The specified folderId does not exist within the given project.
Bad Request
400
The taskName is syntactically invalid. It is either empty or contains illegal characters.
Conflict
409
A task with the same name already exists in the folder or project.
Internal server error
500
Internal server error. The server experienced a critical error. Contact the server’s administratorto rectify this issue.
Unprocessable Enitity
422
The nativeData task payload is incomplete or invalid. It either contains missing mandatory properties or unsupported configurations.