Chunked upload. Finish

/dam/assets/bin/chunked/persist/{uploadTid} Finalize the chunking upload of an asset.
Some chunks should be uploaded before notifying the server that API consumer uploaded all chunks.
Table 1. Details

Resource path

/api/core/v1/dam/assets/bin/chunked/persist/{uploadTid}

HTTP method

PUT

Request content type

application/json

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Parameters
Path Parameters
Name Description Required Default Pattern

uploadTid

The session identifier of the started chunked upload.

X

Body parameters

Specified by AssetUploadRequest. The AssetUploadRequest's path and tid parameters should be the same as was sent for /dam/assets/bin/chunked/start

path is required and should contain the file name.
Return Type

PimType with filled ResponsesType

Response type contains status and info about asset that were uploaded to the system.

Responses
Table 2. Http response codes
Code Message Datatype

200

PimType with filled ResponsesType

PimType

400

Invalid input provided

ResponseType

500

An unknown internal error occurred

ResponseType

Samples
Please use transform endpoint to get the JSON/compact-JSON samples from the XML one.
Finalize upload session
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/dam/assets/bin/chunked/persist/c9fd0ff5-69e6-4053-b895-887be66ccfd9' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "path":"/MAM/demo/file2.jpg",
    "tid": "AAAAA-AAAAA-AAAAAA-AAAAAA",
    "doPreviewsAsync": true,
    "doOverwrite": true
}'
Request body AssetUploadRequest
{
    "tid":"0AA31C0C-F2AE-422C-9C6A-25BAB368706E",
    "path": "/MAM/demo/filename.jpg",
    "doPreviewsAsync": true,
    "doOverwrite": true
}
Response body. With status and uploaded asset info
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn">
    <responses>
        <response action="create"
                dataType="asset"
                id="75440"
                path="/demo/file.jpg"
                tid="1296BDF9-E367-492C-ACB8-59FA7C310CE8">
            <status>SUCCESS</status>
            <description>The asset has been uploaded</description>
        </response>
    </responses>
</pim>
Error responses

It is possible, that during chunks upload, the another file with the same name and path or tid was uploaded to the system, target or the target directory is not available.

File already exists:
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
    <details>
        <itm key="supportId">f21311c9-a868-4d4e-bc48-adaa96436335</itm>
    </details>
    <issues>
        <itm key="code">1000</itm>
        <itm key="description">An unknown internal error occurred</itm>
        <itms type="details">
            <itm key="errorMessage">File already exists by path: '/demo/file.jpg'</itm>
        </itms>
    </issues>
    <status>ERROR</status>
</response>
File already exists with the provided tid, but in another path
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
    <details>
        <itm key="supportId">f21311c9-a868-4d4e-bc48-adaa96436335</itm>
    </details>
    <issues>
        <itm key="code">1000</itm>
        <itm key="description">An unknown internal error occurred</itm>
        <itms type="details">
            <itm key="errorMessage">File already exists by path: '/demo/file.jpg'</itm>
        </itms>
    </issues>
    <status>ERROR</status>
</response>
No access to the destination
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
    <details>
        <itm key="supportId">9fdfc6ce-6999-4f3b-8513-be5c431974ee</itm>
    </details>
    <issues>
        <itm key="code">1000</itm>
        <itm key="description">An unknown internal error occurred</itm>
        <itms type="details">
            <itm key="errorMessage">No permissions to upload by path: /demo/file.jpg</itm>
        </itms>
    </issues>
    <status>ERROR</status>
</response>
No destination
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
    <details>
        <itm key="supportId">9fdfc6ce-6999-4f3b-8513-be5c431974ee</itm>
    </details>
    <issues>
        <itm key="code">1000</itm>
        <itm key="description">An unknown internal error occurred</itm>
        <itms type="details">
            <itm key="errorMessage">No target directory by path: '[demo]' in rnc: 'MAM'</itm>
        </itms>
    </issues>
    <status>ERROR</status>
</response>

Welcome to the AI Chat!

Write a prompt to get started...