Version chunked upload. Finish
| /dam/assets/versions/bin/chunked/persist/{uploadTid} Finalize the chunk upload of the asset version. |
Finalize the chunking upload of the asset version.
Upload as version feature will create a version for file that currently is on the system and then replace the file on the system with the uploaded.
| Some chunks should be uploaded before notifying the server that API consumer uploaded all chunks. |
Resource path |
|
HTTP method |
PUT |
Request content type |
application/json |
Response content type |
|
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
uploadTid |
The session identifier of the started chunked upload. |
X |
Body parameters
Specified by AssetVersionUploadRequest.
Version of the existing file will be created with provided parameters AssetVersionUploadRequest
It’s a finalization step for file version upload.
The AssetVersionUploadRequest's tid parameter should be the same as was sent for /dam/assets/versions/bin/chunked/start.
|
Return Type
PimType with filled ResponsesType
Response type contains status and info about asset that was uploaded to the system.
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType |
|
400 |
Invalid input provided |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
Finalize upload session
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/dam/assets/versions/bin/chunked/persist/614cde94-fdd6-47aa-86e6-c090d900032c' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"tid": "0AA31C0C-F2AE-422C-9C6A-25BAB368706E",
"versionComment": "Created before upload via API",
"timeoutDate": "2022-09-07T09:16:09.171Z",
"protectedAfterDate": "2022-09-07T09:16:09.171Z",
"protectedBeforeDate": "2022-09-07T09:16:09.171Z",
}'
{
"tid":"0AA31C0C-F2AE-422C-9C6A-25BAB368706E",
"versionComment": "Created before upload via API",
"timeoutDate": "{Date in the ISO8601 format}",
"protectedAfterDate": "{Date in the ISO8601 format}",
"protectedBeforeDate": "{Date in the ISO8601 format}"
}}
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn">
<responses>
<response action="update"
dataType="asset"
tid="0AA31C0C-F2AE-422C-9C6A-25BAB368706E">
<status>SUCCESS</status>
<description>Old file has been versioned and new file has been uploaded</description>
</response>
</responses>
</pim>
Error responses
It is possible, that during chunks upload, the target is not available.
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
<details>
<itm key="supportId">8dbfd28d-9487-4c6c-a878-9f30557f2e1b</itm>
</details>
<issues>
<itm key="code">1002</itm>
<itm key="description">The requested resource could not be found</itm>
<itms type="details">
<itm key="errorMessage">Isy object with meta tag guid '0AA31C0C-F2AE-422C-9C6A-25BAB368706E' is not found.</itm>
</itms>
</issues>
<status>ERROR</status>
</response>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn">
<responses>
<response action="update"
dataType="asset"
tid="0AA31C0C-F2AE-422C-9C6A-25BAB368706E">
<status>ERROR</status>
<description>Asset is not available by access rights</description>
</response>
</responses>
</pim>