Latest Publications 

Get Latest Publications

Required scope: public-api:read

Description

The response is an array of objects with 3 possible top-level properties:

  • systemdata
  • metadata
  • content

Use Cases:

  • Bulk export of data, e.g. a specific contentType
Curl Example
ACCESS_TOKEN=ey1234
curl -k -X GET "https://edit.livingdocs.io/proxy/api/api/v1/documents/latestPublications" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Endpoint

GET api/v1/documents/latestPublications

Parameters

NameTypeNotes
?fieldsstringFilters which (comma separated) properties are included in the response. Defaults to systemdata,metadata,content (no renditions).
?limitintegerA limit for how much published documents to retrieve. Defaults to 100. Max. 100.
?offsetintegerAn offset into the query. Useful when getting more than 100 results (pagination)
?reversebooleanOrder publications in ascending order instead of the default descending order. This is useful if you want to paginate using a time based filter.
?homepagebooleanReturn only the document labeled as homepage in the current project.
?contentTypesstringComma separated list of content types to use as filter.
?documentTypesstringComma separated list of document types to use as filter.
Can be one of article, page, data-record.
?id.gtestringFilter by document id range.

Supported filters: id.gte, id.gt, id.lte, id.lt.

The id range filter is useful if you want to export a lot of documents. You can do many requests in parallel against the api, where you filter by the specific ranges.

This query is much more flexible than an offset-based filter and works with millions of documents.

Request 1: ?id.gt=0&id.lte=100
Request 2: ?id.gt=100&id.lte=200
Request 3: ?id.gt=200&id.lte=300
?publishedAt.gtestringFilter by publish date range.
Supported filters: publishedAt.gte, publishedAt.gt, publishedAt.lte, publishedAt.lt.

Example: To retrieve all publications since a specific timestamp, use ?reverse&publishedAt.gte=2021-05-01T00:00:00.000Z

Response

200
OK
[
  {
    "systemdata": {
      "projectId": 1,
      "channelId": 1,
      "documentId": 1,
      "contentType": "article",
      "documentType": "article",
      "publicationId": 1,
      "firstPublicationDate": "2022-03-16T14:08:11:000Z",
      "significantPublicationDate": "2022-10-26T07:25:00.000Z",
      "visiblePublicationDate": "2022-10-27T06:00:00.000Z",
      "updatedAt": "2022-10-30T16:32:04.170Z",
      "layout": "regular",
      "design": {
        "name": "timeline",
        "version": "1.1.0"
      }
    },
    "metadata": {
      "title": "a title",
      "description": "some lead",
      "dependencies": {}
    },
    "content": [
      {
        "id": "doc-1b8i1ksh10",
        "component": "head",
        "identifier": "timeline.head",
        "content": {
          "title": "a title",
          "text": "some lead"
        }
      },
      {
        "id": "doc-1b8i1ksh20",
        "component": "normal",
        "identifier": "timeline.normal",
        "content": {
          "caption": "my caption"
        },
        "styles": {
          "position": "left"
        }
      },
      {
        "id": "doc-1b8i1ksh30",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "first paragraph"
        }
      },
      {
        "id": "doc-1b8i1me1d0",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "second paragraph"
        }
      }
    ]
  },
  {
    "systemdata": {
      "projectId": 1,
      "channelId": 1,
      "documentId": 2,
      "contentType": "article",
      "documentType": "article",
      "publicationId": 5,
      "firstPublicationDate": "2022-03-16T14:08:11:000Z",
      "significantPublicationDate": "2022-10-26T07:25:00.000Z",
      "visiblePublicationDate": "2022-10-27T06:00:00.000Z",
      "updatedAt": "2022-10-30T16:32:04.170Z",
      "layout": "regular",
      "design": {
        "name": "timeline",
        "version": "1.1.0"
      }
    },
    "metadata": {
      "title": "another title",
      "description": "some other lead",
      "dependencies": {}
    },
    "content": [
      {
        "id": "doc-1b8i1ksh10",
        "component": "head",
        "identifier": "timeline.head",
        "content": {
          "title": "a title",
          "text": "some lead"
        }
      },
      {
        "id": "doc-1b8i1ksh20",
        "component": "normal",
        "identifier": "timeline.normal",
        "content": {
          "caption": "my caption"
        },
        "styles": {
          "position": "left"
        }
      },
      {
        "id": "doc-1b8i1ksh30",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "first paragraph"
        }
      },
      {
        "id": "doc-1b8i1me1d0",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "second paragraph"
        }
      }
    ]
  }
]