Create a Content Library Media File

post

/rest/api/v1.3/clItems

This operation is used to create a content library media file.

Request

Body ()
Request Body
Root Schema : Content Library Media Files
Type: object
Title: Content Library Media Files
Show Source
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : Content Library Media Files
Type: object
Title: Content Library Media Files
Show Source
Back to Top

Examples

This interface is used to create a content library media file in a content library folder.

A successful request requires the following headers:

FIELDS DESCRIPTION
Authorization <AUTH_TOKEN>
Content-Type application/json

Sample Request Body:

REQUEST NOTE: Ensure that the itemData value is a base64-encoded binary string with no extraneous hidden characters. When the itemData value contains hidden characters, such as such as carriage returns or line feeds, the response returns an HTTP code of 500 and the error details return only an ID number.

    {
       "itemPath": "/contentlibrary/abn/testcreate_50.png",
       "itemData": "<base64 encoded binary string>"
    }
	

Sample Response: Success

Note: The itemData attribute in the response is returned as null always. This is done to avoid returning large binary content in the response.

 {
   "itemPath": "/contentlibrary/abn/testcreate_50.png",
   "itemData": null,
   "links":    [
      {
         "rel": "self",
         "href": "/rest/api/v1.3/clItems",
         "method": "POST"
      },
      {
         "rel": "getContentLibraryItem",
         "href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate_50.png",
         "method": "GET"
      },
      {
         "rel": "deleteContentLibraryItem",
         "href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate_50.png",
         "method": "DELETE"
      },
      {
         "rel": "setContentLibraryItem",
         "href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate_50.png",
         "method": "POST"
      }
   ]
}

	

Sample Response: Failure

    {
   "type": "",
   "title": "Document already exists",
   "errorCode": "DOCUMENT_ALREADY_EXISTS",
   "detail": "/contentlibrary/abn/testcreate_50.png",
   "errorDetails": []
}

     
Back to Top