Document Lists

Get List by Id

Required scope: public-api:read

Description

This endpoint resolves the referenced documents in a list.
The response is a JSON object including list information with resolved documents.

Use Cases
  • Resolve a Document List in the delivery
Curl Example
ACCESS_TOKEN=ey1234
curl -k -X GET "https://server.livingdocs.io/api/v1/document-lists/:id?reverse=false&limit=20" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Endpoint

GET api/v1/document-lists/:id

Parameters

NameTypeRequiredNotes
:idintegerx
?reversebooleanPass ‘reverse=false’ to get the list in the same order as you see it in the editor. (the default is reverse=true for backwards compatibility reasons)
?fieldsstringFilters which (comma separated) document properties are included in the response. Defaults to ‘systemdata,metadata’ also accepts ‘content’ (no renditions).
?limitintegerA limit for how much documents to resolve for the requested list. Defaults to 100. Max. 100.
?ignoreComponentConditionsbooleanProvides a way to opt out of component filtering and return all content regardless of whether each component passes the conditional checks.
Added in: release-2024-03
Default: false
?componentConditionsstringJSON stringified object which contains the component conditions you would like to apply.
Added in: release-2024-03
Default: dateTime: new Date()
Example: ?componentConditions={"dateTime":"2024-02-14T17:25:10.391Z"}

Response

200
OK
api/v1/document-lists/1
{
  "id": 1,
  "name": "List one",
  "documents": [
    {
      "systemdata": {
        "projectId": 1,
        "channelId": 1,
        "documentId": 1,
        "contentType": "article",
        "documentType": "article",
        "layout": "regular",
        "design": {
          "name": "timeline",
          "version": "1.1.0"
        }
      },
      "metadata": {
        "title": "a title",
        "description": "some lead",
        "dependencies": {},
        "test": {
          "callCount": 3,
          "message": "li-test called 3 times",
          "events": [
            "onUpdate",
            "onUpdate",
            "onPreparePublish"
          ]
        },
        "testDependency": "li-test-dependency.onUpdate is correct"
      }
    }
  ],
  "createdAt": "2020-11-05T10:55:51.255Z",
  "updatedAt": "2020-11-05T10:55:51.255Z"
}

Get Lists

Required scope: public-api:read

Description

The response is a JSON array including only document lists without resolving documents.
Curl Example
ACCESS_TOKEN=ey1234
curl -k -X GET "https://server.livingdocs.io/api/v1/document-lists" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Endpoint

GET api/v1/document-lists

Parameters

NameTypeNotes
?namestringFilters the result set and allows searching by list name.
?limitintegerA limit for how much document lists to retrieve. Defaults to 10. Max. 100.
?offsetintegerAn offset into the query. Useful when getting more than 100 results (pagination).

Response

200
OK
api/v1/document-lists
[
  {
    "id": 1,
    "name": "List one",
    "createdAt": "2020-11-05T10:55:51.255Z",
    "updatedAt": "2020-11-05T10:55:51.255Z"
  },
  {
    "id": 2,
    "name": "List two",
    "createdAt": "2020-11-05T11:09:16.561Z",
    "updatedAt": "2020-11-05T11:09:16.561Z"
  },
  {
    "id": 3,
    "name": "List three",
    "createdAt": "2020-11-05T11:09:37.213Z",
    "updatedAt": "2020-11-05T11:09:37.213Z"
  },
  {
    "id": 4,
    "name": "List four",
    "createdAt": "2020-11-05T11:08:53.765Z",
    "updatedAt": "2020-11-05T11:08:53.765Z"
  }
]