GET /v3/content

List content items

Acl Action: CONTENT list

Arguments:

  • page - integer: Page number for paginated results.
  • per_page - int: Per page offset for pagination.
  • order - string: Valid property to order by. Will default to version.
  • dir - string: Either asc or desc.
  • has_attachment - integer: Do not append for any content type, use 0 for items without attachments, 1 for items with attachments.

Example Response:

{
    "items": [
        {
            "id": "1",
            "uuid": "12345678-AAAA-BBBB-CCCC-123456789012",
            "title": "",
            "slug": "ea-necessitatibus-id-consequuntur",
            "type": "article",
            "version": "35",
            "weight": "0",
            "abstract": "Another thing",
            "abstract_raw": "",
            "content": "Dicta dolorem unde nulla enim..",
            "content_raw": "",
            "created_at": "2016-12-07 20:52:11",
            "modified_at": "2017-02-02 21:03:32",
            "published_at": null,
            "state": "0",
            "url_id": null,
            "user_id": "1",
            "assignment_id": null,
            "title_url": "",
            "workflow_id": "3",
            "dominant_attachment_id": "0",
            "has_attachment": "0",
            "srn": "srn:tsn:ceo-core\/content:12345678-AAAA-BBBB-CCCC-123456789012",
            "ssts_path": "news/campus",
            "export": {},
            "authors": [],
            "tags": [],
            "urls": [],
            "lock": false,
            "versions": [],
            "audit": []
        }
    ],
    "first": 1,
    "before": 1,
    "current": 1,
    "last": 1,
    "next": 1,
    "total_pages": 1,
    "total_items": 33,
    "limit": 50
}

GET /v3/content/{content-uuid}

Get a single content item.

Acl Action: CONTENT get

Example Response:

{
    "id": "1",
    "uuid": "12345678-AAAA-BBBB-CCCC-123456789012",
    "title": "",
    "slug": "ea-necessitatibus-id-consequuntur",
    "type": "article",
    "version": "35",
    "weight": "0",
    "abstract": "Another thing",
    "abstract_raw": "",
    "content": "Dicta dolorem unde nulla enim..",
    "content_raw": "",
    "created_at": "2016-12-07 20:52:11",
    "modified_at": "2017-02-02 21:03:32",
    "published_at": null,
    "state": "0",
    "url_id": null,
    "user_id": "1",
    "assignment_id": null,
    "title_url": "",
    "workflow_id": "3",
    "dominant_attachment_id": "0",
    "has_attachment": "0",
    "srn": "srn:tsn:ceo-core\/content:12345678-AAAA-BBBB-CCCC-123456789012",
    "ssts_path": "news/campus",
    "export": {},
    "authors": [],
    "tags": [],
    "urls": [],
    "lock": false,
    "versions": [],
    "audit": []
}

POST /v3/content

Create a new content item

  • Acl Action: CONTENT create
  • Acl Action: CONTENT publish - Applies only if published_at date changes, or is set/unset.
  • Acl Action: CONTENT type_article - Applies only if type is "article".
  • Acl Action: CONTENT type_post - Applies only if type is "post".
  • Acl Action: CONTENT type_media - Applies only if type is "media".
  • Acl Action: CONTENT type_page - Applies only if type is "page".

Example Request:

{
    "title": "",
    "slug": "ea-necessitatibus-id-consequuntur",
    "type": "article",
    "weight": "0",
    "abstract": "Another thing",
    "abstract_raw": "",
    "content": "Dicta dolorem unde nulla enim..",
    "content_raw": "",
    "published_at": null,
    "state": "0",
    "dominantAttachment": "XXXXXXXX-AAAA-BBBB-CCCC-123456789012",
    "authors": [
      "CCCCCCCC-AAAA-BBBB-CCCC-123456789012",
      "BBBBBBBB-AAAA-BBBB-CCCC-123456789012",
    ],
    "tags": [
      "NNNNNNNN-AAAA-BBBB-CCCC-123456789012",
      "LLLLLLLL-AAAA-BBBB-CCCC-123456789012"
    ],
    "urls": [
      "foo/bar"
    ]
}

You can also use the attachment key to create and upload a new media file:

{
  "attachment": {
    "file": "BASE64-Encoded-String",
    "name": "myfile.png"
  }
}

Example Response: See GET /v3/content

PUT /v3/content/{content-uuid}

Update existing content item.

Acl Action: CONTENT update

Example Request: See POST /v3/content

Example Response: See POST /v3/content

DELETE /v3/content/{content-uuid}

Delete a content item and associated attachment.

Acl Action: CONTENT delete

Example Response:

{
  "message": "Ok"
}