Start Import Task

post

/v1/imports/{importId}/tasks

Start an import task for a specific import.

Request

Path Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : configurationMapping
Type: array
The list of configuration mappings.
Show Source
Nested Schema : customizationMapping
Type: array
The list of customization mappings.
Show Source
Nested Schema : customJarsToRemove
Type: array
The list of custom Jars to remove.
Show Source
Nested Schema : importType
The flag to check if the node chain has been imported.
Match All
The flag to check if the node chain has been imported.
Show Source
  • Allowed Values: [ "NODE_MANAGER", "NODE_CHAIN" ]
Nested Schema : Mapping
Type: object
Mapping class
Show Source
Nested Schema : destinationTriplet
Type: object
he triplet object that defines the destination of the mapping.
Match All
he triplet object that defines the destination of the mapping.
Show Source
Nested Schema : sourceTriplet
Type: object
The triplet object that defines the source of the mapping.
Match All
The triplet object that defines the source of the mapping.
Show Source
Nested Schema : Triplet
Type: object
Triplet class
Show Source
Back to Top

Response

Supported Media Types

200 Response

The import task was submitted successfully.
Body ()
Root Schema : NodeChainTestUploadResponse
Type: object
The response schema to get the node chain test upload operation's information.
Show Source
Nested Schema : records
Type: array
File records part of the input file.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : NARAttribute
Type: object
The schema that defines the details of a record attribute.
Show Source
Nested Schema : values
Type: array
The list of nested NAR attributes.
Show Source

400 Response

The server could not process the request due to a client error.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

401 Response

The client is not authorized to perform this request.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

403 Response

Access to the requested resource is forbidden.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

404 Response

The specified import could not be found.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

405 Response

The request method is not allowed for this endpoint.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

409 Response

A conflict occurred with the current state of the resource.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

413 Response

The request payload is too large.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

415 Response

The media type of the request is not supported.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

500 Response

The server encountered an internal error while processing the request.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
Back to Top

Examples

The following example shows how to start an import task by submitting a POST request on the REST resource using cURL. This step triggers the final processing of the uploaded files based on the provided mappings. For more information about cURL, see Use cURL.

The -d option specifies the JSON file containing the details of the task.

curl -X POST 'http://hostname:port/version/imports/importId/tasks' -d @sampleStartImportTask

Example of Request Body

The following is an example of the contents of the sampleStartImportTask.json file. This payload specifies the final triplet mappings and instructions for node restarts and ID regeneration.

{
  "customizationMapping": [
    {
      "sourceTriplet": {
        "ip": "100.77.60.203",
        "name": "asd",
        "port": 55109
      },
      "destinationTriplet": {
        "ip": "node-mgr-app",
        "name": "NM1",
        "port": 55109
      }
    }
  ],
  "configurationMapping": [
    {
      "sourceTriplet": {
        "ip": "100.77.60.203",
        "name": "asd",
        "port": 55109
      },
      "destinationTriplet": {
        "ip": "node-mgr-app",
        "name": "NM1",
        "port": 55109
      }
    }
  ],
  "skipCustomization": false,
  "skipConfiguration": false,
  "skipRestart": true
  "regenerateNodeIds": false,
  "importType": "NODE_MANAGER"
}

Example of Response Body

If successful, the response code 200 is displayed along with the following response body.
{
  "importId": "I-5fa40130-3632-4edc-bedf-93e00b22b53b",
  "importTaskId": "IT-a828152f-0f96-419f-9aa5-963f9511dd9c",
  "startTime": "2024-04-23T08:18:45Z[UTC]",
  "status": "STARTED",
  "taskFinished": false
}
Back to Top