Zoom Ingest API

API Request

POST /review/api/asset/upload

HEADERS:

Content-Typemultipart/form-data
CookieZoom Authenticated Cookie

BODY: formData

KeyDescriptionRequiredDefault
fileFile data. Use actual file data to upload in multipart form submit.Yes
nameName of the file. Uploaded file name will be used if not given.OptionalName from file field
destinationThe ingest destination folder on the Zoom server.Yes
collectionIdIf upload is specific to the collection and added files need to be assigned to that collectionOptional0
destinationFuidDestination folder’s asset id on Zoom server. Either destination or destinationFuid can be given. Field destination is used when both are given. Optional | use destination0
waitPossible values: true or false. If true, request waits for the ingest job to finish else returns the jobId in JSON response.Optionalfalse
waitInMinutesIf wait is true, this much amount of time we want to wait before cancelling it.Optional60
expandZipIf true and given file is zip type, then expands the zip before ingesting.Optionaltrue

API Response

HTTP 200 OK

Response Syntax:

{
  "data": {
    "bid": Branch Id, #1
      "fuids": [     
        Asset Ids     #2
      ],
    "rrn": Repo Revision Number     #3
  },
"success": true,      #4
"length": 38904,      #5
"error": "Error Message when success is false"    #6
}

#Notes

  1. Branch Id(number) Default value is one. By default server adds all the files on HEAD branch with id=1.
  2. Asset Ids(Json number Array): Asset ids of added assets.
  3. Repo Revision Number(number): Unique repository revision number at which assets are added to Zoom server.
  4. success(boolean): True value signifies that operation is completed without any errors. If success is false, associated error is returned in error field of json response. 
  5. length(number): Length of received file.
  6. error(string): This field is populated if any error occurred during the ingest and success value is set to false.

HTTP 401

Authentication failed. Occurs when cookie is not valid.

Curl Command

Syntax

curl -X POST "http://preview-server:8873/review/api/asset/upload" \
  -H "Cookie: <Zoom Authenticated Cookie" \
  -H "Content-Type: multipart/form-data" \
  -F "file=@<path to file>" \
  -F "name=Acme.png" \
  -F "destination=<Zoom server destination>" \
  -F "collectionId=0" \
  -F "destinationFuid=0" \
  -F "wait=false" \
  -F "waitInMinutes=60" \
  -F "expandZip=true"

Example

curl -X POST \
http://preview-server:8873/review/api/asset/upload \
-H 'Content-Type: multipart/form-data' \
-H 'Cookie: b3ca73fb-c9db-4c26-a672-d1555c128b32' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F file=@/Users/test/Downloads/sample.png \
-F name=Acme.png \
-F destination=/defproj/test \
-F collectionId=0 \
-F destinationFuid=0 \
-F wait=true \
-F waitInMinutes=60 \
-F expandZip=true

Output

Success:

{
  "data": {
    "bid": 1,
    "fuids": [ 372 ],
    "rrn": 242
  },
  "success": true,
  "length": 38904
}

Error

{
  "success": false,
  "error: "Permission denied. You don't have permission to add files on Zoom server"
}