Send Requests

Use the following guidelines when sending requests using the REST API for Content Management 1.1.

URL Structure

Access the Content Management REST resources using the following URL structure:
https://subdomain.domain.com[:port]/documents/api/version/resourcePath

Where:

  • subdomain.domain.com[:port] - Host and port where Oracle Content and Experience Cloud is running.

  • version - Version of the REST API; for example: 1.1.

  • resource-path - Relative path that defines the resource. For a complete list of resources, see “All Rest Endpoints” under Table of Contents.

Supported Methods

You can perform basic CRUD operations (create, read, update, and delete) on Oracle Content and Experience Cloud using standard HTTP method requests, as summarized in the following table.

HTTP Method Description
GET Get information about a resource or resources, download a file, get a thumbnail or rendition of a document, or get users.
POST Create a resource, assign a metadata collection to a file or folder, assign values to a file or folder metadata collection, copy or move a file or folder, generate file renditions, reserve or unreserve a file, upload a file or file version, or share a folder.
PUT Update or edit a resource.
DELETE Remove a resource, delete values in a file or folder metadata collection, revoke a user, or unshare a collection.

Media Types

The following media types are supported by the REST API for Content Management:

  • application/json

  • application/XML

A response can use either media type, as in the following example for creating a new folder. The examples in the REST API descriptions show only the JSON response.

Request:
POST .../folders/FF4729683CD68C1AFB1AE87DT0000000000100000001
Request body:
{
    "name": "restFolder",
    "description": "rest folder"
}

JSON Response:

{
    "childItemsCount": "0",
    "createdBy": {
        "displayName": "User AA",
        "id": "U0EAA20910FAF3052ACB79E4T00000000001",
        "type": "user"
    },
    "createdTime": "2014-02-21T20:54:50Z",
    "description": "rest folder",
    "errorCode": "0",
    "id": "FB4CD874EF94CD2CC1B60B72T0000000000100000001",
    "modifiedBy": {
        "displayName": "User AA",
        "id": "U0EAA20910FAF3052ACB79E4T00000000001",
        "type": "user"
    },
    "modifiedTime": "2014-02-21T20:54:50Z",
    "name": "restFolder",
    "ownedBy": "{
        "displayName": "User AA",
        "id": "U0EAA20910FAF3052ACB79E4T00000000001",
        "type": "user"
    },

    "parentID": "FF4729683CD68C1AFB1AE87DT0000000000100000001",
    "type": "folder"
}

XML Response:

<?xml version="1.0" encoding="utf-8"?>
<resource>
    <childItemsCount>0</childItemsCount>
    <createdBy>
        <displayName>User AA</displayName>
        <id>U0EAA20910FAF3052ACB79E4T00000000001</id>
        <type>user</type>
    </createdBy>
    <createdTime>2014-02-21T20:56:07Z</createdTime>
    <description>rest folder 2</description>
    <errorCode>0</errorCode>
    <id>F512DA3911603E8AB84A07ACT0000000000100000001</id>
    <modifiedBy>
        <displayName>User AA</displayName>
        <id>U0EAA20910FAF3052ACB79E4T00000000001</id>
        <type>user</type>

    </modifiedBy>
    <modifiedTime>2014-02-21T20:56:07Z</modifiedTime>
    <name>restFolder2</name>
    <ownedBy>
        <displayName>User AA</displayName>
        <id>U0EAA20910FAF3052ACB79E4T00000000001</id>
        <type>user</type>
    </ownedBy>
    <parentID>FF4729683CD68C1AFB1AE87DT0000000000100000001</parentID>    
    <type>folder</type>
 </resource>                   

Common Request Headers

The following table lists some common request headers.

Header Description Example
Accept

List the media types that you prefer for the response body.

Note that unless an operation specifies otherwise, the media type for a response body is application/json.

application/json

application/xml

Authorization How to validate the user. See Authorization.

Authorization: Basic abcvZTphYmMxMjM=

Authorization: Bearer eyJhbGciOiJ...9yoQ

Content-Length The size of the request body in bytes. 540
Content-Type

The media type of the request body. This header is required for POST and PUT requests.

Note that unless an operation specifies otherwise, the media type for a request body is application/json.

application/json
Accept-Language Set the language to be used for any error messages that are returned. This will not change the language of any text in a valid response. fr