Skip to content

Container

Containers are boxes you put content into. They can be a section, blog, gallery, or just a small part of a larger construction.

GET /v3/container

List all containers.

Acl Action: CONTAINER 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.
  • type - array: Limit to given container types.

Example Response:

{
    "items": [
        {
            "id": "12",
            "title": "A test blog",
            "slug": "a-test-blog",
            "uuid": "AAAA-123",
            "description": "",
            "type": "blog",
            "created_at": "2017-02-28 21:02:33",
            "modified_at": "2017-02-28 21:02:33",
            "sort_order": null,
            "published_at": null,
            "srn": "srn:tsn:ceo-core\/container:AAAA-123",
            "lock": false,
            "content": [],
            "tags": []
        },
        {
            "id": "16",
            "title": "A third test gallery",
            "slug": "a-third-test-gallery",
            "uuid": "BBBB-123",
            "description": "<p>Test test test<\/p>",
            "type": "gallery",
            "created_at": "2017-03-03 14:56:07",
            "modified_at": "2017-03-03 15:54:24",
            "sort_order": null,
            "published_at": null,
            "srn": "srn:tsn:ceo-core\/container:BBBB-123",
            "content": [
                {
                    "id": "21",
                    "uuid": "CCCC-123",
                    "title": "",
                    "slug": "impedit-aut-delectus-ut",
                    "type": "media",
                    "version": "1",
                    "weight": "0",
                    "abstract": "",
                    "abstract_raw": "",
                    "content": "Animi architecto blanditiis tempora ipsa.",
                    "content_raw": "",
                    "created_at": "2016-12-07 20:52:36",
                    "modified_at": "2017-02-03 16:07:49",
                    "published_at": null,
                    "state": "0",
                    "url_id": null,
                    "user_id": null,
                    "assignment_id": null,
                    "title_url": "",
                    "workflow_id": "0",
                    "dominant_attachment_id": null,
                    "container_id": null,
                    "srn": "srn:tsn:ceo-core\/content:CCCC-123",
                    "attachment": {
                        "id": "1",
                        "uuid": "DDDD-123",
                        "base_name": "424b48731b3323545f521b415e490cea",
                        "salt": null,
                        "extension": "jpg",
                        "parent_id": null,
                        "content_id": "21",
                        "height": "400",
                        "width": "600",
                        "size_name": "original",
                        "type": "image",
                        "preview_extension": "jpg",
                        "container_id": null,
                        "metadata": null,
                        "srn": "srn:tsn:ceo-core\/attachment:DDDD-123",
                        "public_url": "path/to/DDDD-123.sized-1000x1000.jpg",
                        "original_url": "path/to/DDDD-123.original.jpg"
                    },
                    "urls": [],
                    "lock": false
                },
                {
                    "id": "26",
                    "uuid": "EEEE-123",
                    "title": "1000.jpg",
                    "slug": "1000-jpg",
                    "type": "media",
                    "version": "1",
                    "weight": "0",
                    "abstract": "",
                    "abstract_raw": "",
                    "content": "",
                    "content_raw": "",
                    "created_at": "2016-12-16 16:04:24",
                    "modified_at": "2016-12-16 16:04:24",
                    "published_at": null,
                    "state": "0",
                    "url_id": null,
                    "user_id": "1",
                    "assignment_id": "4",
                    "title_url": "",
                    "workflow_id": "0",
                    "dominant_attachment_id": null,
                    "container_id": null,
                    "srn": "srn:tsn:ceo-core\/content:EEEE-123",
                    "attachment": {
                        "id": "4",
                        "uuid": "7bc6bee7-1a47-4a52-a261-0d34c864e1d6",
                        "base_name": "1000",
                        "salt": null,
                        "extension": "jpg",
                        "parent_id": null,
                        "content_id": "26",
                        "height": "1000",
                        "width": "1000",
                        "size_name": "original",
                        "type": "image",
                        "preview_extension": "jpg",
                        "container_id": null,
                        "metadata": null,
                        "srn": "srn:tsn:ceo-core\/attachment:7bc6bee7-1a47-4a52-a261-0d34c864e1d6",
                        "public_url": "path/to/7bc6bee7-1a47-4a52-a261-0d34c864e1d6.sized-1000x1000.jpg",
                        "original_url": "path/to/7bc6bee7-1a47-4a52-a261-0d34c864e1d6.original.jpg"
                    },
                    "urls": [],
                    "lock": false
                }
            ],
            "tags": []
        }
    ],
    "first": 1,
    "before": 1,
    "current": 1,
    "last": 1,
    "next": 1,
    "total_pages": 1,
    "total_items": 2,
    "limit": 50
}

GET /v3/container/{uuid}

Get a single container.

Acl Action: CONTAINER get

Example Response:

[
    {
        "id": "12",
        "title": "A test blog",
        "slug": "a-test-blog",
        "uuid": "AAAA-123",
        "description": "",
        "type": "blog",
        "created_at": "2017-02-28 21:02:33",
        "modified_at": "2017-02-28 21:02:33",
        "sort_order": null,
        "published_at": null,
        "srn": "srn:tsn:ceo-core\/container:AAAA-123",
        "lock": false,
        "content": [],
        "tags": []
    }
]

POST /v3/container

Create new container. There are 4 container types:

  • Automatic (string automatic): Accepts an array of tags but not content.
  • Manual (string manual): Accepts an array of content but not tags.
  • Blog (string blog): Accepts an array of tags but not content. Will populate in a content drop down when content type is set to post.
  • Gallery (string gallery): Accepts array of tags AND content. Will automatically generate a media placeholder content item.

Acl Action: CONTAINER create

Example Request:

{
    'slug': 'test-container',
    'title': 'Test container',
    'description': 'My description',
    'type': 'manual'
    'published_at': '2017-01-01 00:00:00',
    'content': [
        'AAAA-123',
        'BBBB-123'
    ],
    'tags': [
        'AAAA-123',
        'BBBB-123'
    ]
}

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

PUT /v3/container/{uuid}

Update an existing container.

Acl Action: CONTAINER update

Example Request: See POST /v3/container

Example Response: See POST /v3/container

DELETE /v3/container/{uuid}[,{uuid}...]

Remove a container.

Acl Action: CONTAINER delete

Example Response: ``` { "message": "ok" }