Skip to content

Version

Version provides version information for content items.

GET /v3/version

List versions for content item, defined by content string.

Acl Action: VERSION list

Arguments:

  • content - string: REQUIRED Content SRN.
  • 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 modified_at.
  • dir - string: Either asc or desc.

Example Response:

{
    "items": [
        {
            "id": "859",
            "uuid": "AAAA-1234",
            "slug": "this-is-a-test-58d2e7cea2193",
            "type": "article",
            "version": "1",
            "weight": "0",
            "abstract": "",
            "abstract_raw": "",
            "content": "",
            "content_raw": "",
            "created_at": "2017-03-22 21:08:30",
            "modified_at": "2017-03-22 21:08:30",
            "published_at": null,
            "state": "0",
            "url_id": null,
            "content_id": "220",
            "user_id": "1",
            "title_url": "",
            "workflow_id": "2",
            "title": "",
            "dominant_attachment_id": null,
            "srn": "srn:tsn:ceo-core\/version:AAAA-1234",
            "user": {
                "id": "1",
                "uuid": "BBBB-1234",
                "name": "mike",
                "slug": "mike",
                "email": "mike@getsnworks.com",
                "is_snworks": "1",
                "srn": "srn:tsn:ceo-core\/user:BBBB-1234"
            }
        }
    ],
    "first": 1,
    "before": 1,
    "current": 1,
    "last": 1,
    "next": 1,
    "total_pages": 1,
    "total_items": 1,
    "limit": 0
}

GET /v3/version/{uuid}

Get a single version.

Acl Action: VERSION get

Example Response:

[
    {
        "id": "859",
        "uuid": "AAAA-1234",
        "slug": "this-is-a-test-58d2e7cea2193",
        "type": "article",
        "version": "1",
        "weight": "0",
        "abstract": "",
        "abstract_raw": "",
        "content": "",
        "content_raw": "",
        "created_at": "2017-03-22 21:08:30",
        "modified_at": "2017-03-22 21:08:30",
        "published_at": null,
        "state": "0",
        "url_id": null,
        "content_id": "220",
        "user_id": "1",
        "title_url": "",
        "workflow_id": "2",
        "title": "",
        "dominant_attachment_id": null,
        "srn": "srn:tsn:ceo-core\/version:AAAA-1234",
        "user": {
            "id": "1",
            "uuid": "BBBB-1234",
            "name": "mike",
            "slug": "mike",
            "email": "mike@getsnworks.com",
            "is_snworks": "1",
            "srn": "srn:tsn:ceo-core\/user:BBBB-1234"
        }
    }
]

PUT /v3/version/{uuid}

Restore version with given UUID. This will create a new version with the content of the requested version, it will not revert the content history.

Acl Action: VERSION restore

Example Response: See GET /v3/content/{uuid}