REST API Reference > Database Ingestion and Replication REST API > Create a database ingestion and replication task
  

Create a database ingestion and replication task

Use the POST request on the task resource to create a database ingestion and replication task.

POST request

To create a database ingestion and replication task through the API, use the following URI:
/dbmi/public/api/v2/task/create
Include the following fields in the request:
Field
Type
Required / Optional
Description
projectId
string
no
ID number associated with the project where you want to create the task. If you do not provide a project ID, it defaults to "Default".
folderId
string
no
Folder ID within the project to create the task. Defaults to empty "" if omitted.
taskName
string
yes
Name of the task.
nativeData
JSON object
yes
Entire task payload, with the task definition, including source properties, target properties, runtime settings, and other configurations.

POST request example

{
"projectID": "<projectId>",
"folderID":"<folderId",
"taskName": "<taskName>",
"nativeData": {
//Entire Task (JSON) Payload, having full task definition
}
}

POST request example

Use the following sample as a reference to create a application ingestion and replication 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 responses

When the REST API successfully performs the action, it returns a 200 success code.
Status code
Description
HTTP/2 200 OK
Successful

POST response example

A successful POST response returns a summary, similar to the following example:
{
"@odata.context": "$metadata#Documents",
"id": "49Ad323lvrNky7ZKPr6e6o",
"name": "sapodpTosnowflake57ccfd92-2985-47e3-89a0-c5612fcaa",
"description": "UNLOAD",
"owner": "29JnX3zg0EVild2QuRlUc2",
"createdBy": "29JnX3zg0EVild2QuRlUc2",
"lastUpdatedBy": "29JnX3zg0EVild2QuRlUc2",
"lastAccessedBy": "29JnX3zg0EVild2QuRlUc2",
"createdTime": "2023-03-15T15:00:00.719Z",
"lastUpdatedTime": "2023-03-15T15:00:00.719Z",
"lastAccessedTime": "2023-03-15T15:00:01.728Z",
"expiresBy": "2038-01-18T00:00:00Z",
"parentInfo": [
{
"parentId": "7cCn5thwWFLhiZoSosphKL",
"parentName": "REG",
"parentType": "Space"
},
{
"parentId": "6E442DkEnGbhO1L31w2UW3",
"parentName": "Ramya",
"parentType": "Project"
},
{
"parentId": "7oUOa49tVKzexgnzp3zyIc",
"parentName": "SAP_ABAP",
"parentType": "Folder"
}
],
"documentType": "APPMI_TASK",
"contentType": "JSON",
"documentState": "VALID",
"aclRule": "org",
"subcontainerCount": 0,
"customAttributes": null,
"repoInfo": {
"repoParams": [

],
"repoPath": null,
"repoHandle": "487797", //this is the dbmiTaskId we would be using further
"frsPath": null
},
"isSourceControlled": false,
"checkedOutById": null
}
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.