FolderΒΆ

GET

Retrieves serialization of resource

permission: guillotina.ViewContent

http

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

curl

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

httpie

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

python-requests

requests.get('http://localhost:8080/db/container/folder', 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/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"
}
POST

Add new resouce inside this container resource

permission: guillotina.AddContent

http

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

{
    "@type": "Item",
    "id": "item",
    "title": "My Item"
}

curl

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

httpie

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

python-requests

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

response

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

{
    "@id": "http://localhost:8080/db/container/folder/item",
    "@type": "Item",
    "UID": "4431ba1d1b2f4442ae6ac40c06c2be4c",
    "__behaviors__": [],
    "__name__": "item",
    "creation_date": "2017-08-03T16:54:08.818671-05:00",
    "guillotina.behaviors.dublincore.IDublinCore": {
        "contributors": [
            "root"
        ],
        "creation_date": "2017-08-03T16:54:08.818671-05:00",
        "creators": [
            "root"
        ],
        "description": null,
        "effective_date": null,
        "expiration_date": null,
        "modification_date": "2017-08-03T16:54:08.818671-05:00",
        "publisher": null,
        "tags": null,
        "title": null
    },
    "modification_date": "2017-08-03T16:54:08.818671-05:00",
    "parent": {
        "@id": "http://localhost:8080/db/container/folder",
        "@type": "Folder"
    },
    "title": "My Item",
    "type_name": "Item"
}
PATCH

Modify the content of this resource

permission: guillotina.ModifyContent

http

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

{
    "title": "My Folder Updated"
}

curl

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

httpie

echo '{
  "title": "My Folder Updated"
}' | http PATCH http://localhost:8080/db/container/folder Accept:application/json Content-Type:application/json -a root:root

python-requests

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

response

HTTP/1.1 204 No Content
Content-Type: application/json
Server: Python/3.6 aiohttp/2.2.5
DELETE

Delete container

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/2.2.5

null
GET @all_permissions

See all permission settings for this resource

permission: guillotina.SeePermissions

http

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

curl

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

httpie

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

python-requests

requests.get('http://localhost:8080/db/container/folder/@all_permissions', 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

[
    {
        "folder": {
            "prinperm": [],
            "prinrole": [
                {
                    "principal": "root",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                }
            ],
            "roleperm": []
        }
    },
    {
        "container": {
            "prinperm": [],
            "prinrole": [
                {
                    "principal": "root",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                }
            ],
            "roleperm": []
        }
    },
    {
        "(no name)": {
            "prinperm": [
                {
                    "permission": "guillotina.AccessContent",
                    "principal": "root",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AddContainer",
                    "principal": "root",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.DeleteContainers",
                    "principal": "root",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.GetAPIDefinition",
                    "principal": "root",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.GetContainers",
                    "principal": "root",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.GetDatabases",
                    "principal": "root",
                    "setting": "Allow"
                }
            ]
        }
    },
    {
        "system": {
            "prinperm": [],
            "prinrole": [],
            "roleperm": [
                {
                    "permission": "guillotina.AccessPreflight",
                    "role": "guillotina.Anonymous",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AccessPreflight",
                    "role": "guillotina.Authenticated",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.Public",
                    "role": "guillotina.Anonymous",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.Public",
                    "role": "guillotina.Authenticated",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ViewContent",
                    "role": "guillotina.Reader",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ViewContent",
                    "role": "guillotina.Reviewer",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ViewContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ViewContent",
                    "role": "guillotina.Editor",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AccessContent",
                    "role": "guillotina.Reader",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AccessContent",
                    "role": "guillotina.Reviewer",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AccessContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AccessContent",
                    "role": "guillotina.Editor",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AccessContent",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.DeleteContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AddContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ModifyContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ModifyContent",
                    "role": "guillotina.Editor",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ChangePermissions",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.SeePermissions",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ReindexContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ReindexContent",
                    "role": "guillotina.Editor",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ManageAddons",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ReadConfiguration",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.WriteConfiguration",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.RegisterConfigurations",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.ManageCatalog",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.RawSearchContent",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.DeleteContainers",
                    "role": "guillotina.ContainerDeleter",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.SearchContent",
                    "role": "guillotina.Member",
                    "setting": "Allow"
                }
            ]
        }
    }
]
GET @behaviors

Get information on behaviors for this resource

permission: guillotina.AccessContent

http

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

curl

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

httpie

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

python-requests

requests.get('http://localhost:8080/db/container/folder/@behaviors', 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

{
    "available": [],
    "dynamic": [],
    "guillotina.behaviors.dublincore.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"
    },
    "static": [
        "guillotina.behaviors.dublincore.IDublinCore"
    ]
}
GET @sharing

Get sharing settings for this resource

permission: guillotina.SeePermissions

http

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

curl

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

httpie

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

python-requests

requests.get('http://localhost:8080/db/container/folder/@sharing', 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

{
    "inherit": [
        {
            "@id": "http://localhost:8080/db/container",
            "prinperm": {},
            "prinrole": {
                "root": {
                    "guillotina.ContainerAdmin": "Allow",
                    "guillotina.Owner": "Allow"
                }
            },
            "roleperm": {}
        }
    ],
    "local": {
        "prinperm": {},
        "prinrole": {
            "root": {
                "guillotina.Owner": "Allow"
            }
        },
        "roleperm": {}
    }
}