Uploading Documents

There are 2 ways documents (or staged documents) can be uploaded to our WebApp:

  1. By drag-and-dropping on an asset-tile in the WebApp Cockpit
  2. By using our API

This page focusses on the workflow using our API.

  1. Creating a staged document
  2. Uploading file
  3. Informing upload status
    1. Informing of successful upload
    2. Informing of failed upload

Creating a staged document

Illustrated in steps 1 and 2.

This step is necessary to create an entry of the document in the database.

The client should send a request to POST /external-api/staged-documents with the following JSON body:

{
    "assetIdentifier": "<asset-identifier>",
    "name": "<file-name>.<file-extension>"
}

The response includes a signed-URL that to which the document file should be uploaded.

Uploading file

Illustrated in steps 3 and 4.

The client should use the signed-URL to upload the document to our object-storage server.

Example of a request:

curl -v -X PUT -T path/to/<file-name>.<file-extension> <uploadSignedUrl>

Example of a successful response with curl:

StatusCode: 200

Informing upload status

Illustrated in step 5.

Informing of successful upload

If the upload is successful, that is, you get an HTTP 200 response back; you should send a request to our API to inform us that the upload was successful.

That should be done to PUT /external-api/staged-documents/{uuid} with the following JSON body:

{
  "status": 2
}

For all the statuses, please check ExternalStagedDocument’s Statuses.

Informing of failed upload

If the upload failed, you also need to inform us.

The client should send a request to our API to inform us that the upload failed.

You can do this by sending PUT /external-api/staged-documents/{uuid} with the following JSON body:

{
  "status": 6
}

For all the statuses, please check ExternalStagedDocument’s Statuses.


Architrave GmbH - All rights reserved.
Made in Berlin, proudly international.