Retrieve contents of a Content Library Document
get
/rest/api/v1.3/clDocs/{docPath}
Request
Path Parameters
-
docPath: string
The complete path of the document starting with '/contentlibrary'.
Response
Supported Media Types
- application/json
Default Response
Root Schema : Content Library Documents
Type:
object
Title:
Show Source
Content Library Documents
-
content:
string
Document content.
-
docPath:
string
The complete path of the document starting with '/contentlibrary'.
Examples
This interface is used to retrieve the contents of a content library document.
A successful request requires the following headers:
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
Sample Request URL:
/rest/api/v1.3/clDocs/contentlibrary/abn/wsrest_cl.htm
Sample response :Success
NOTE: Response contains the content of the document as it is saved in the content library. The Responsys Web Services API does not decode the content of the document before returning the response.
{ "documentPath": "/contentlibrary/abn/wsrest_cl.htm", "content": "<html dir=\"ltr\">\r\n <head>\r\n <title><\/title>\r\n <\/head>\r\n <body>\r\n <p>test document<\/p>\r\n <p><img src=\"wsrest_cl.images/testcreate-1.png\" alt=\"\" /><\/p>\r\n <\/body>\r\n<\/html>\n\n\n", "links": [ { "rel": "self", "href": "/rest/api/v1.3/clDocs/contentlibrary/abn/wsrest_cl.htm", "method": "GET" }, { "rel": "deleteDocument", "href": "/rest/api/v1.3/clDocs/contentlibrary/abn/wsrest_cl.htm", "method": "DELETE" }, { "rel": "setDocumentContent", "href": "/rest/api/v1.3/clDocs/contentlibrary/abn/wsrest_cl.htm", "method": "POST" }, { "rel": "createDocument", "href": "/rest/api/v1.3/clDocs", "method": "POST" } ] }
Sample Response: Failure
{ "type": "", "title": "Document not found", "errorCode": "DOCUMENT_NOT_FOUND", "detail": "/contentlibrary/abn/wsrest_cl.htm", "errorDetails": [] }