Skip to main content
Version: 2.8

Creating contents via REST

This document explains how to create new contents in a repository using Document.One (D1) REST API. You can create either a single content or a batch of contents in one go.

  1. Log in to D1.

  2. On the landing page, click the API link under repository where you want to create content(s):

    Accessing the D1 REST API

    The OpenAPI page opens, showing the available D1 endpoints. You have two options now see Task 1: Creating a specific content and Task 2: Creating multiple contents.

Task 1: Creating a specific content

  1. Find the /access.adx.content.repository_name/v1/content Create Content endpoint and expand it.

    To create folders, use the /access.adx.content.demo/v1/folder Create Folder endpoint.

  2. Attach the file to be a basis for your content in the resource field.

    Attaching the resource file

  3. Optionally, change other properties as required.

  4. Click Execute and check the response. A response with code 200 (success) means that the content is now created.

  5. Your content is now created and in WORKING_COPY status.

For a code sample, see

Create content

Setting custom type values on creating a content

In case a custom content is prepared it can on upload already set the according types. 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?sessionId=[SESSION_ID]" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "serialized-request={\"properties\": { \"[PROPERTY_NAME]\": \"[PROPERTY_VALUE]\" } }" -F "resource=@[RESOURCE_NAME]" -F "entryType=[CUSTOM_TYPE]"

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?sessionId=[SESSION_ID]" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "serialized-request={\"properties\": { \"invoiceNumber\": \"myInvoiceNumberValue\" } }" -F "resource=@myInvoice.pdf" -F "entryType=Invoice"

Task 2: Creating multiple contents

  1. Find the /access.adx.content.repository_name/v1/contents Create Contents endpoint and expand it.
  2. Attach the files your contents should be created from in the resources field.
  3. Optionally, change other properties as required.
  4. Click Execute and check the response. A response with code 200 (success) means that the content is now created.
  5. Your contents are now created and in WORKING_COPY status.

For a code sample, see

Create contents