File uploads are a two-part process. First, a file is uploaded to iMeet Central. Then it is attached to a task, milestone, database record, or folder, where it becomes a retrievable file. This initial upload is called a deferred asset. A deferred asset is a temporary upload that is not yet associated with a retrievable file. A local file will be uploaded through the API and the API will return a Deferred Asset ID.

The second step is to attach the deferred asset to a task, milestone, folder, or database record. This is done by sending the Deferred Asset ID and a Task ID, Folder ID, etc. to the API. The API will then create a file from the deferred asset and attach it to the desired entity.

Create a deferred asset

Files are uploaded to the API as binary content. It is not multipart form data. The content of the file is the body of the request.

To create the deferred asset, POST a local file to /v1/files/upload with the following HTTP headers:

Header Example default value
Content-Type (optional) application/text text/plain
Content-Disposition (required) attachment; filename=mydoc.txt  

Create a file

The previous step will return a Deferred Asset ID. This Deferred Asset ID then gets posted to either a task, milestone, database record, or folder where the deferred asset will be converted to a file. Multiple deferred assets can be posted at once.

{
  "deferredAssetIds": [
    ""
  ]
}

Because the input can be a list, the output can also be a list.

{
  "responses": [
    {
      "requestId": "",
      "status": 0,
      "body": ""
    }
  ]
}

This is a list of responses from the API. RequestID is the Deferred Asset ID. This allows the response item to be matched to a request item. Status is the HTTP status. If successful, the status will be 201 (CREATED), and the body will be the ID of the newly created file.

In the case of an error, the status will contain an HTTP error code and possibly an error message in the body. This format can also handle a partial success (some files were created, but others were not).

Upload a new version

If a file already exists but you need to update the content, just create a new revision. Unlike creating a new file, this is a one-step process.

The upload process is the same as creating a deferred asset like above, but PUT a local file to /v1/files/XXX where XXX is the ID of an existing file. The response will be a 201 (CREATED) if the file is successfully updated.