Skip to main content
POST
/
objects
/
import
Import objects
import requests

url = "https://{FUSION HOST}/api/objects/import"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contentDisposition\"\r\n\r\n{\n  \"type\": \"<string>\",\n  \"parameters\": {},\n  \"fileName\": \"<string>\",\n  \"creationDate\": \"2023-11-07T05:31:56Z\",\n  \"modificationDate\": \"2023-11-07T05:31:56Z\",\n  \"readDate\": \"2023-11-07T05:31:56Z\",\n  \"size\": 123\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"entity\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"headers\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mediaType\"\r\n\r\n{\n  \"type\": \"<string>\",\n  \"subtype\": \"<string>\",\n  \"parameters\": {},\n  \"wildcardType\": true,\n  \"wildcardSubtype\": true\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"messageBodyWorkers\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parent\"\r\n\r\n{\n  \"contentDisposition\": {\n    \"type\": \"<string>\",\n    \"parameters\": {},\n    \"fileName\": \"<string>\",\n    \"creationDate\": \"2023-11-07T05:31:56Z\",\n    \"modificationDate\": \"2023-11-07T05:31:56Z\",\n    \"readDate\": \"2023-11-07T05:31:56Z\",\n    \"size\": 123\n  },\n  \"entity\": {},\n  \"headers\": {},\n  \"mediaType\": {\n    \"type\": \"<string>\",\n    \"subtype\": \"<string>\",\n    \"parameters\": {},\n    \"wildcardType\": true,\n    \"wildcardSubtype\": true\n  },\n  \"messageBodyWorkers\": {},\n  \"parent\": {},\n  \"providers\": {},\n  \"bodyParts\": [\n    {\n      \"contentDisposition\": {\n        \"type\": \"<any>\",\n        \"parameters\": \"<any>\",\n        \"fileName\": \"<any>\",\n        \"creationDate\": \"<any>\",\n        \"modificationDate\": \"<any>\",\n        \"readDate\": \"<any>\",\n        \"size\": \"<any>\"\n      },\n      \"entity\": {},\n      \"headers\": {},\n      \"mediaType\": {\n        \"type\": \"<any>\",\n        \"subtype\": \"<any>\",\n        \"parameters\": \"<any>\",\n        \"wildcardType\": \"<any>\",\n        \"wildcardSubtype\": \"<any>\"\n      },\n      \"messageBodyWorkers\": {},\n      \"parent\": {},\n      \"providers\": {},\n      \"parameterizedHeaders\": {}\n    }\n  ],\n  \"parameterizedHeaders\": {}\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"providers\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bodyParts\"\r\n\r\n{\n  \"contentDisposition\": {\n    \"type\": \"<any>\",\n    \"parameters\": \"<any>\",\n    \"fileName\": \"<any>\",\n    \"creationDate\": \"<any>\",\n    \"modificationDate\": \"<any>\",\n    \"readDate\": \"<any>\",\n    \"size\": \"<any>\"\n  },\n  \"entity\": {},\n  \"headers\": {},\n  \"mediaType\": {\n    \"type\": \"<any>\",\n    \"subtype\": \"<any>\",\n    \"parameters\": \"<any>\",\n    \"wildcardType\": \"<any>\",\n    \"wildcardSubtype\": \"<any>\"\n  },\n  \"messageBodyWorkers\": {},\n  \"parent\": {},\n  \"providers\": {},\n  \"parameterizedHeaders\": {}\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fields\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parameterizedHeaders\"\r\n\r\n{}\r\n-----011000010111000001101001--\r\n"
headers = {"Content-Type": "multipart/form-data; boundary=---011000010111000001101001"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
{
  "conflicts": [
    "<string>"
  ],
  "variablesWarnings": [
    "<string>"
  ],
  "variablesErrors": [
    "<string>"
  ],
  "variablesSubstitutions": [
    "<string>"
  ],
  "validationWarnings": [
    "<string>"
  ],
  "validationErrors": [
    "<string>"
  ],
  "importErrors": [
    "<string>"
  ],
  "importActions": [
    "<string>"
  ],
  "zipFileToken": "<string>",
  "transformationMsgs": [
    "<string>"
  ],
  "status": "<string>"
}

Query Parameters

importPolicy
enum<string>

One of: abort, merge, overwrite.

Available options:
abort,
merge,
overwrite

Body

multipart/form-data

The objects to import.

contentDisposition
object
entity
object
headers
object
mediaType
object
messageBodyWorkers
object
parent
object
providers
object
bodyParts
object[]
fields
object
parameterizedHeaders
object

Response

200 - application/json

successful operation

conflicts
string[]
variablesWarnings
string[]
variablesErrors
string[]
variablesSubstitutions
string[]
validationWarnings
string[]
validationErrors
string[]
importErrors
string[]
importActions
string[]
zipFileToken
string
transformationMsgs
string[]
status
string