ContainerΒΆ

GET

Retrieves serialization of resource

permission: guillotina.ViewContent

http

GET /db/container HTTP/1.1
Accept: application/json
Host: localhost:8080
Authorization: Basic cm9vdDpyb290

curl

curl -i http://localhost:8080/db/container -H 'Accept: application/json' --user root:root

httpie

http http://localhost:8080/db/container Accept:application/json -a root:root

python-requests

requests.get('http://localhost:8080/db/container', headers={'Accept': 'application/json'}, auth=('root', 'root'))

response

HTTP/1.1 200 OK
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5

{
    "@id": "http://localhost:8080/db/container",
    "@type": "Container",
    "UID": "5121b7b53e4847c8bb8b281cf873a9e0",
    "__behaviors__": [],
    "__name__": "container",
    "creation_date": "2017-08-03T16:53:18.314861-05:00",
    "items": [],
    "length": 0,
    "modification_date": "2017-08-03T16:53:18.314861-05:00",
    "parent": {},
    "title": "Container",
    "type_name": "Container"
}
POST

Add new resouce inside this container resource

permission: guillotina.AddContent

http

POST /db/container HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/json
Authorization: Basic cm9vdDpyb290

{
    "@type": "Folder",
    "id": "folder",
    "title": "My Folder"
}

curl

curl -i -X POST http://localhost:8080/db/container -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"@type": "Folder", "id": "folder", "title": "My Folder"}' --user root:root

httpie

echo '{
  "@type": "Folder",
  "id": "folder",
  "title": "My Folder"
}' | http POST http://localhost:8080/db/container Accept:application/json Content-Type:application/json -a root:root

python-requests

requests.post('http://localhost:8080/db/container', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'@type': 'Folder', 'id': 'folder', 'title': 'My Folder'}, auth=('root', 'root'))

response

HTTP/1.1 201 Created
Content-Type: application/json
Location: http://localhost:8080/db/container/folder
Server: Python/3.6 aiohttp/2.2.5

{
    "@id": "http://localhost:8080/db/container/folder",
    "@type": "Folder",
    "UID": "691c83337ab74a85a162fbec877d614c",
    "__behaviors__": [],
    "__name__": "folder",
    "creation_date": "2017-08-03T16:54:08.479606-05:00",
    "guillotina.behaviors.dublincore.IDublinCore": {
        "contributors": [
            "root"
        ],
        "creation_date": "2017-08-03T16:54:08.479606-05:00",
        "creators": [
            "root"
        ],
        "description": null,
        "effective_date": null,
        "expiration_date": null,
        "modification_date": "2017-08-03T16:54:08.479606-05:00",
        "publisher": null,
        "tags": null,
        "title": null
    },
    "items": [],
    "length": 0,
    "modification_date": "2017-08-03T16:54:08.479606-05:00",
    "parent": {
        "@id": "http://localhost:8080/db/container",
        "@type": "Container"
    },
    "title": "My Folder",
    "type_name": "Folder"
}
DELETE

permission: guillotina.DeleteContainers

http

DELETE /db/container HTTP/1.1
Accept: application/json
Host: localhost:8080
Authorization: Basic cm9vdDpyb290

curl

curl -i -X DELETE http://localhost:8080/db/container -H 'Accept: application/json' --user root:root

httpie

http DELETE http://localhost:8080/db/container Accept:application/json -a root:root

python-requests

requests.delete('http://localhost:8080/db/container', headers={'Accept': 'application/json'}, auth=('root', 'root'))

response

HTTP/1.1 200 OK
Content-Type: application/json
Server: Python/3.6 aiohttp/1.3.3

null
GET @addons

permission: guillotina.ManageAddons

http

GET /db/container/@addons HTTP/1.1
Accept: application/json
Host: localhost:8080
Authorization: Basic cm9vdDpyb290

curl

curl -i http://localhost:8080/db/container/@addons -H 'Accept: application/json' --user root:root

httpie

http http://localhost:8080/db/container/@addons Accept:application/json -a root:root

python-requests

requests.get('http://localhost:8080/db/container/@addons', headers={'Accept': 'application/json'}, auth=('root', 'root'))

response

HTTP/1.1 200 OK
Content-Type: application/json
Server: Python/3.6 aiohttp/1.3.3

{
    "available": [
        {
            "id": "govsocial",
            "title": "govsocial Addon"
        }
    ],
    "installed": []
}
POST @addons

Install addon to container

permission: guillotina.ManageAddons

http

POST /db/container/@addons HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/json
Authorization: Basic cm9vdDpyb290

{
    "id": "myaddon"
}

curl

curl -i -X POST http://localhost:8080/db/container/@addons -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"id": "myaddon"}' --user root:root

httpie

echo '{
  "id": "myaddon"
}' | http POST http://localhost:8080/db/container/@addons Accept:application/json Content-Type:application/json -a root:root

python-requests

requests.post('http://localhost:8080/db/container/@addons', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'id': 'myaddon'}, auth=('root', 'root'))

response

HTTP/1.1 400 Bad Request
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5

{
    "error": {
        "message": "Property 'id' is required to be valid",
        "type": "RequiredParam"
    }
}
DELETE @addons

Uninstall an addon from container

permission: guillotina.ManageAddons

http

DELETE /db/container/@addons HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/json
Authorization: Basic cm9vdDpyb290

{
    "id": "myaddon"
}

curl

curl -i -X DELETE http://localhost:8080/db/container/@addons -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"id": "myaddon"}' --user root:root

httpie

echo '{
  "id": "myaddon"
}' | http DELETE http://localhost:8080/db/container/@addons Accept:application/json Content-Type:application/json -a root:root

python-requests

requests.delete('http://localhost:8080/db/container/@addons', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'id': 'myaddon'}, auth=('root', 'root'))

response

HTTP/1.1 400 Bad Request
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5

{
    "error": {
        "message": "Property 'id' is required to be valid",
        "type": "RequiredParam"
    }
}
GET @registry

Read container registry settings

permission: guillotina.ReadConfiguration

http

GET /db/container/@registry/guillotina.documentation.testmodule.ISchema.foo HTTP/1.1
Accept: application/json
Host: localhost:8080
Authorization: Basic cm9vdDpyb290

curl

curl -i http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo -H 'Accept: application/json' --user root:root

httpie

http http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo Accept:application/json -a root:root

python-requests

requests.get('http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo', headers={'Accept': 'application/json'}, auth=('root', 'root'))

response

HTTP/1.1 200 OK
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5

{
    "value": "New foobar value"
}
POST @registry

Register a new interface to for registry settings

permission: guillotina.RegisterConfigurations

http

POST /db/container/@registry HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/json
Authorization: Basic cm9vdDpyb290

{
    "initial_values": {
        "foo": "bar"
    },
    "interface": "guillotina.documentation.testmodule.ISchema"
}

curl

curl -i -X POST http://localhost:8080/db/container/@registry -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"initial_values": {"foo": "bar"}, "interface": "guillotina.documentation.testmodule.ISchema"}' --user root:root

httpie

echo '{
  "initial_values": {
    "foo": "bar"
  },
  "interface": "guillotina.documentation.testmodule.ISchema"
}' | http POST http://localhost:8080/db/container/@registry Accept:application/json Content-Type:application/json -a root:root

python-requests

requests.post('http://localhost:8080/db/container/@registry', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'initial_values': {'foo': 'bar'}, 'interface': 'guillotina.documentation.testmodule.ISchema'}, auth=('root', 'root'))

response

HTTP/1.1 201 Created
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5

{}
PATCH @registry

Update registry setting

permission: guillotina.WriteConfiguration

http

PATCH /db/container/@registry/guillotina.documentation.testmodule.ISchema.foo HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/json
Authorization: Basic cm9vdDpyb290

{
    "value": "New foobar value"
}

curl

curl -i -X PATCH http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"value": "New foobar value"}' --user root:root

httpie

echo '{
  "value": "New foobar value"
}' | http PATCH http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo Accept:application/json Content-Type:application/json -a root:root

python-requests

requests.patch('http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'value': 'New foobar value'}, auth=('root', 'root'))

response

HTTP/1.1 204 No Content
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5
GET @registry/[dotted-name:string]

permission: guillotina.ReadConfiguration

http

GET /db/container/@registry/guillotina.documentation.testmodule.ISchema.foo HTTP/1.1
Accept: application/json
Host: localhost:8080
Authorization: Basic cm9vdDpyb290

curl

curl -i http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo -H 'Accept: application/json' --user root:root

httpie

http http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo Accept:application/json -a root:root

python-requests

requests.get('http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo', headers={'Accept': 'application/json'}, auth=('root', 'root'))

response

HTTP/1.1 200 OK
Content-Type: application/json
Server: Python/3.6 aiohttp/1.3.3

{
    "value": "New foobar value"
}
PATCH @registry/[dotted-name:string]

permission: guillotina.WriteConfiguration

http

PATCH /db/container/@registry/guillotina.documentation.testmodule.ISchema.foo HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/json
Authorization: Basic cm9vdDpyb290

{
    "value": "New foobar value"
}

curl

curl -i -X PATCH http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"value": "New foobar value"}' --user root:root

httpie

echo '{
  "value": "New foobar value"
}' | http PATCH http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo Accept:application/json Content-Type:application/json -a root:root

python-requests

requests.patch('http://localhost:8080/db/container/@registry/guillotina.documentation.testmodule.ISchema.foo', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'value': 'New foobar value'}, auth=('root', 'root'))

response

HTTP/1.1 204 No Content
Content-Type: application/json
Server: Python/3.6 aiohttp/1.3.3
GET @types

Read information on available types

permission: guillotina.AccessContent

http

GET /db/container/@types HTTP/1.1
Accept: application/json
Host: localhost:8080
Authorization: Basic cm9vdDpyb290

curl

curl -i http://localhost:8080/db/container/@types -H 'Accept: application/json' --user root:root

httpie

http http://localhost:8080/db/container/@types Accept:application/json -a root:root

python-requests

requests.get('http://localhost:8080/db/container/@types', headers={'Accept': 'application/json'}, auth=('root', 'root'))

response

HTTP/1.1 200 OK
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5

[
    {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "definitions": {
            "IDublinCore": {
                "invariants": [],
                "properties": {
                    "contributors": {
                        "description": "The unqualified Dublin Core 'Contributor' element values",
                        "items": {
                            "type": "string"
                        },
                        "title": "Contributors",
                        "type": "array"
                    },
                    "creation_date": {
                        "description": "The date and time that an object is created. \nThis is normally set automatically.",
                        "title": "Creation Date",
                        "type": "datetime"
                    },
                    "creators": {
                        "description": "The unqualified Dublin Core 'Creator' element values",
                        "items": {
                            "type": "string"
                        },
                        "title": "Creators",
                        "type": "array"
                    },
                    "description": {
                        "description": "The first unqualified Dublin Core 'Description' element value.",
                        "title": "Description",
                        "type": "string"
                    },
                    "effective_date": {
                        "description": "The date and time that an object should be published. ",
                        "title": "Effective Date",
                        "type": "datetime"
                    },
                    "expiration_date": {
                        "description": "The date and time that the object should become unpublished.",
                        "title": "Expiration Date",
                        "type": "datetime"
                    },
                    "modification_date": {
                        "description": "The date and time that the object was last modified in a\nmeaningful way.",
                        "title": "Modification Date",
                        "type": "datetime"
                    },
                    "publisher": {
                        "description": "The first unqualified Dublin Core 'Publisher' element value.",
                        "title": "Publisher",
                        "type": "string"
                    },
                    "tags": {
                        "description": "The unqualified Dublin Core 'Tags' element values",
                        "items": {
                            "type": "string"
                        },
                        "title": "Tags",
                        "type": "array"
                    },
                    "title": {
                        "description": "The first unqualified Dublin Core 'Title' element value.",
                        "title": "Title",
                        "type": "string"
                    }
                },
                "required": [
                    "title",
                    "description",
                    "creation_date",
                    "modification_date",
                    "effective_date",
                    "expiration_date",
                    "creators",
                    "tags",
                    "publisher",
                    "contributors"
                ],
                "type": "object"
            }
        },
        "invariants": [],
        "properties": {
            "IDublinCore": [
                {
                    "$ref": "#/definitions/IDublinCore"
                }
            ],
            "__behaviors__": {
                "description": "Dynamic behaviors for the content type",
                "title": "Enabled behaviors",
                "type": "array"
            },
            "__name__": {
                "description": "The object can be looked up from the parent's sublocations using this name.",
                "title": "The name within the parent",
                "type": "string"
            },
            "title": {
                "description": "Title of the Resource",
                "title": "Title",
                "type": "string"
            },
            "type_name": {
                "type": "string"
            }
        },
        "required": [
            "type_name"
        ],
        "title": "Item",
        "type": "object"
    },
    {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "definitions": {
            "IDublinCore": {
                "invariants": [],
                "properties": {
                    "contributors": {
                        "description": "The unqualified Dublin Core 'Contributor' element values",
                        "items": {
                            "type": "string"
                        },
                        "title": "Contributors",
                        "type": "array"
                    },
                    "creation_date": {
                        "description": "The date and time that an object is created. \nThis is normally set automatically.",
                        "title": "Creation Date",
                        "type": "datetime"
                    },
                    "creators": {
                        "description": "The unqualified Dublin Core 'Creator' element values",
                        "items": {
                            "type": "string"
                        },
                        "title": "Creators",
                        "type": "array"
                    },
                    "description": {
                        "description": "The first unqualified Dublin Core 'Description' element value.",
                        "title": "Description",
                        "type": "string"
                    },
                    "effective_date": {
                        "description": "The date and time that an object should be published. ",
                        "title": "Effective Date",
                        "type": "datetime"
                    },
                    "expiration_date": {
                        "description": "The date and time that the object should become unpublished.",
                        "title": "Expiration Date",
                        "type": "datetime"
                    },
                    "modification_date": {
                        "description": "The date and time that the object was last modified in a\nmeaningful way.",
                        "title": "Modification Date",
                        "type": "datetime"
                    },
                    "publisher": {
                        "description": "The first unqualified Dublin Core 'Publisher' element value.",
                        "title": "Publisher",
                        "type": "string"
                    },
                    "tags": {
                        "description": "The unqualified Dublin Core 'Tags' element values",
                        "items": {
                            "type": "string"
                        },
                        "title": "Tags",
                        "type": "array"
                    },
                    "title": {
                        "description": "The first unqualified Dublin Core 'Title' element value.",
                        "title": "Title",
                        "type": "string"
                    }
                },
                "required": [
                    "title",
                    "description",
                    "creation_date",
                    "modification_date",
                    "effective_date",
                    "expiration_date",
                    "creators",
                    "tags",
                    "publisher",
                    "contributors"
                ],
                "type": "object"
            }
        },
        "invariants": [],
        "properties": {
            "IDublinCore": [
                {
                    "$ref": "#/definitions/IDublinCore"
                }
            ],
            "__behaviors__": {
                "description": "Dynamic behaviors for the content type",
                "title": "Enabled behaviors",
                "type": "array"
            },
            "__name__": {
                "description": "The object can be looked up from the parent's sublocations using this name.",
                "title": "The name within the parent",
                "type": "string"
            },
            "title": {
                "description": "Title of the Resource",
                "title": "Title",
                "type": "string"
            },
            "type_name": {
                "type": "string"
            }
        },
        "required": [
            "type_name"
        ],
        "title": "Folder",
        "type": "object"
    },
    {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "definitions": {},
        "invariants": [],
        "properties": {
            "__behaviors__": {
                "description": "Dynamic behaviors for the content type",
                "title": "Enabled behaviors",
                "type": "array"
            },
            "__name__": {
                "description": "The object can be looked up from the parent's sublocations using this name.",
                "title": "The name within the parent",
                "type": "string"
            },
            "title": {
                "description": "Title of the Resource",
                "title": "Title",
                "type": "string"
            },
            "type_name": {
                "type": "string"
            }
        },
        "required": [
            "type_name"
        ],
        "title": "Container",
        "type": "object"
    }
]