Upload Import File

post

/v1/imports/uploadImportFile

Upload input file for importing.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - multipart/form-data ()
Root Schema : schema
Type: string(binary)
Back to Top

Response

Supported Media Types

200 Response

The file was uploaded 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 requested resource 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 uploaded file exceeds the maximum allowed size.
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 upload customization and configuration files for importing by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

The -F option specifies the individual files to attach as parts of the multipart request body.

curl -X POST 'http://hostname:port/imports/uploadImportFile' \
    -H "Content-Type: multipart/form-data" \
    -F "customizationFile=@inputFiles/2NM/export_20240407_163132.nmx" \
    -F "configurationFile=@inputFiles/2NM/export_20240407_163132.xml"

Example of Request Body

The following is an example of the structured contents of the multipart/form-data request body. Each part is seperated by a bounary string and includes a Content-Disposition header identifying the form field name.

--boundary
Content-Disposition: form-data; name="customizationFile"; filename="customizationFile.nmx"

< inputFiles/2NM/export_20240407_163132.nmx

--boundary
Content-Disposition: form-data; name="configurationFile"; filename="configurationFile.xml"

< inputFiles/2NM/export_20240407_163132.xml

--boundary--

Example of Response Body

If successful, the response code 200 is displayed along with the following response body.
{
  "configurationMapping": [
    {
      "sourceTriplet": {
        "ip": "node-mgr-app",
        "name": "test",
        "port": 55109
      },
      "valid": false
    },
    {
      "sourceTriplet": {
        "ip": "node-mgr-app-2",
        "name": "test",
        "port": 55109
      },
      "valid": false
    }
  ],
  "configurationMappingCount": 2,
  "customJarsToRemove": [],
  "customizationMapping": [
    {
      "sourceTriplet": {
        "ip": "node-mgr-app",
        "name": "test",
        "port": 55109
      },
      "valid": false
    },
    {
      "sourceTriplet": {
        "ip": "node-mgr-app-2",
        "name": "test",
        "port": 55109
      },
      "valid": false
    }
  ],
  "customizationMappingCount": 2,
  "importId": "I-5fa40130-3632-4edc-bedf-93e00b22b53b",
  "isNodeChainImport": false,
  "regenerateNodeIds": true,
  "skipConfiguration": false,
  "skipCustomization": false,
  "skipRestart": false
}
Back to Top