Vai al contenuto principale
POST
/
api
/
v1
/
organizations
/
{organizationid}
/
workflows
/
{workflowid}
/
documents
/
{artifactid}
/
versions
Upload a new document version
curl --request POST \
  --url https://app.aegister.com/api/v1/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions/ \
  --header 'Content-Type: application/json' \
  --header 'X-Aegister-Token: <api-key>' \
  --data '
{
  "filename": "<string>",
  "content": "<string>",
  "content_type": "application/pdf",
  "source": "attached"
}
'
{
  "error": 0,
  "messages": "<array>",
  "data": {
    "id": 123,
    "artifact_id": "<string>",
    "original_name": "<string>",
    "size": 123,
    "content_type": "<string>",
    "source": "<string>",
    "created_by": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "download_url": "<string>"
  }
}

Autorizzazioni

X-Aegister-Token
string
header
obbligatorio

Parametri del percorso

artifactid
string
obbligatorio

Artifact ID (e.g. control ID like 'A.5.1').

organizationid
integer
obbligatorio

Organization ID.

workflowid
string
obbligatorio

Workflow ID.

Corpo

filename
string
obbligatorio

Original filename.

content
string
obbligatorio

Base64-encoded file content.

content_type
string
predefinito:application/pdf

MIME type.

source
string
predefinito:attached

Upload source tag.

Risposta

Duplicate detected — existing version returned.

error
integer

Any value different from 0 indicates an error.
More details can be found in messages.

Intervallo richiesto: 0 <= x <= 0
Esempio:

0

messages
array

If error is 1, contains zero or more details on the error.

Esempio:
[]
data
object