File upload
This endpoint allows you to save artifact related data in the database and return a pre-signed URL,
for uploading the file to the storage. After the pre-signed URL is called and the upload process is
finished, update status endpoint is called, for
changing the status of the artifact. Depending on the file processing result status can be set to
SUCCESS
or FAIL
.
Endpoint: /v1/upload/init
Method: POST
Request Body
Media Type: application/json
Body:
{
"fileName": "string",
"fileType": "string",
"size": "integer",
"pageCount": "integer"
}
fileName (required): The name of the file.
fileType (required): The type of the file.
size (required): The size of the file.
pageCount (required): The page count of the file.
Responses
200 (OK) Request processed successfully.
Body:
[
{
"status": "enum",
"message": "string",
"metadata": {
"string": "string"
},
"data": {
"fileId": "string",
"presignedUrl": "string"
}
}
]
401 (Unauthorized) This response is returned if the request is not authorized.
Body:
{
"status": "enum",
"message": "string",
"metadata": {
"string": "string"
},
"data": "object"
}
404 (Not Found) This response is returned if the required resources are not found.
Body:
{
"status": "enum",
"message": "string",
"metadata": {
"string": "string"
},
"data": "object"
}
412 (Precondition Failed) This response is returned if a precondition is not met.
Body:
{
"status": "enum",
"message": "string",
"metadata": {
"string": "string"
},
"data": "object"
}
500 (Internal Server Error) This response is returned if an unexpected internal server error occurs.
Body:
{
"status": "enum",
"message": "string",
"metadata": {
"string": "string"
},
"data": "object"
}