Skip to main content
Version: 2.10

Updating contents via REST

This document explains how to execute content updates using the Document.One (D1) REST API.

  1. Log in to D1 and open the repository where the contents to be updated are stored:

  2. Select the content you want to update. Copy the content's technical ID:

  3. Go back to the landing page and click the API link under the repository where the contents to be updated are stored:

    The OpenAPI page opens, showing the available D1 endpoints.

  4. Optionally, open the /access.adx.content.test/v1/content/checkout endpoint available under Versioning.

  5. Optionally, paste the content's technical ID into the contentId field:

  6. Optionally, click Execute and check the response. A response with status 200 (success) is expected, meaning that the content is now checked out. At this point, a new version of the content is created, with a new content ID. Copy the new content ID from the message:

  7. Open the /access.adx.content.test/v1/content/update endpoint available under Content. Click Try it out to activate the fields.

  8. Paste the new content ID into the contentId field.

  9. Change the properties as required. If you want to upload a new resource, simply attach it in the resource field.

  10. Click Execute and check the response. A response with status 200 (success) is expected, meaning that the content is now updated. Check the content access again to verify this is the case.

  11. Optionally, open the /access.adx.content.test/v1/content/checkin endpoint available under Versioning.

  12. Optionally, paste the new content technical ID into the contentId field.

  13. Optionally, click Execute. Your content is now saved with a new version, with the status CURRENT.

Updating custom type values on an existing content

In case a custom content exists it can be set. At the moment the OpenAPI user interface is not supporting custom types. Use curl instead to do so. The properties needs to be sent as JSON as part of the properties String-To-String map, for example,

curl -X POST "[http|https]://[HOST]:[PORT]/tribefire-services/api/v1/access.adx.content.[REPO_TECHNICAL_NAME]/v1/content/update?sessionId=[SESSION_ID]" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "serialized-request={ \"properties\": { \"[PROPERTY_NAME]\": \"[PROPERTY_VALUE]\" } }" -F "contentId=[CONTENT_ID]"

Imagine there exists a custom type called Invoice and it has an invoiceNumber, then use the following:

curl -X POST "[http|https]://[HOST]:[PORT]/tribefire-services/api/v1/access.adx.content.[REPO_TECHNICAL_NAME]/v1/content/update?sessionId=[SESSION_ID]" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "serialized-request={ \"properties\": { \"invoiceNumber\": \"myInvoiceNumberValue\" } }" -F "contentId=[CONTENT_ID]"

OpenAPI

For code samples, see

Checkout by ID
Update content by ID
Checkin by ID