Retrieve binary content of images in a Content Library Document

get

/rest/api/v1.3/clDocImages/{documentPath}

Request

Path Parameters
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : Content Library Document Images
Type: object
Title: Content Library Document Images
Show Source
Nested Schema : imageData
Type: array
Images in the content library document.
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Examples

The following example shows how to get images in a content library document.

A successful request requires the following headers:

FIELDS DESCRIPTION
Authorization <AUTH_TOKEN>
Accept application/json

Sample Request URL:

    /rest/api/v1.3/clDocImages/contentlibrary/abn/wsrest_cl.htm;
	
RESPONSE NOTES:
  • A success response echoes back the document path you sent, and it returns content as null. It also returns the related endpoints for the given document path.
  • Possible error responses occur when:
    • The documentPath is incorrect in the request (error codes include FOLDER_NOT_FOUND and DOCUMENT_NOT_FOUND and the details show the folder path without the file name). Verify that the folder and file names are spelled correctly and that they exist in the Content Library. To get the correct path, you can ask the Responsys Account Admin to send you a copy of the document path, which the admin can get from the Content Library.
    • The documentPath has incorrect format in the request (error code is INVALID_PARAMETER and the details show the folder path without the file name). Verify that you have included /contentlibrary at the start of the path, have spelled it correctly, and have included the document file name at the end of the path.
    • The document in your request does not contain images, or the path to the image is broken (error code is IMAGES_NOT_FOUND). Verify that you are requesting the images for the correct Content Library file. You can also retrieve the HTML document from the content library and examine it to determine if there are errors in the image tags, such as the wrong file extension, file name, or path to the image file.

Sample Response: Success

    {
   "documentPath": "/contentlibrary/abn/wsrest_cl.htm",
   "imageData": [   {
      "itemPath": "/contentlibrary/abn/testcreate.png",
      "itemData": <base64 encoded binary string>,
      "links":       [
                  {
            "rel": "getContentLibraryItem",
            "href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate.png",
            "method": "GET"
         },
                  {
            "rel": "setContentLibraryItem",
            "href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate.png",
            "method": "POST"
         },
                  {
            "rel": "deleteContentLibraryItem",
            "href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate.png",
            "method": "DELETE"
         },
                  {
            "rel": "createContentLibraryItem",
            "href": "/rest/api/v1.3/clItems",
            "method": "POST"
         }
      ]
   }],
   "links":    [
            {
         "rel": "self",
         "href": "/rest/api/v1.3/clDocImages/contentlibrary/abn/wsrest_cl.htm",
         "method": "GET"
      },
            {
         "rel": "setDocumentImages",
         "href": "/rest/api/v1.3/clDocImages/contentlibrary/abn/wsrest_cl.htm",
         "method": "POST"
      }
   ]
}
	

Sample Response: Failure

        {
   "type": "",
   "title": "Images not found",
   "errorCode": "IMAGES_NOT_FOUND",
   "detail": "There are no images in wsrest_cl.htm",
   "errorDetails": []
}
     
Back to Top