Folder

POST /(db)/(container)

Add new resouce inside this container resource

  • Permission: guillotina.AddContent
  • Context: guillotina.interfaces.content.IResource

http

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

{
    "@type": "Folder",
    "id": "foobar"
}

curl

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

httpie

echo '{
  "@type": "Folder",
  "id": "foobar"
}' | http POST http://nohost/db/container Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 201 OK
Content-Length: 186
Content-Type: application/json
Location: http://127.0.0.1:54065/db/container/foobar

{
    "@id": "http://127.0.0.1:54065/db/container/foobar",
    "@name": "foobar",
    "@type": "Folder",
    "@uid": "029|e01c34c378d84b2b9e102a1488a27f63",
    "UID": "029|e01c34c378d84b2b9e102a1488a27f63"
}
Status Codes:

PATCH /(db)/(container)/(id)

Modify the content of this resource

  • Permission: guillotina.ModifyContent
  • Context: guillotina.interfaces.content.IResource

http

PATCH /db/container/foobar HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290
Content-Type: application/json

{
    "title": "foobar"
}

curl

curl -i -X PATCH http://nohost/db/container/foobar -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"title": "foobar"}' --user root:root

httpie

echo '{
  "title": "foobar"
}' | http PATCH http://nohost/db/container/foobar Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 204 OK
Content-Length: 0
Content-Type: application/json
Status Codes:

GET /(db)/(container)/(id)

Retrieves serialization of resource

  • Permission: guillotina.ViewContent
  • Context: guillotina.interfaces.content.IResource

http

GET /db/container/foobar HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 1065
Content-Type: application/json

{
    "@id": "http://127.0.0.1:54065/db/container/foobar",
    "@type": "Folder",
    "@name": "foobar",
    "@uid": "029|e01c34c378d84b2b9e102a1488a27f63",
    "@static_behaviors": [
        "guillotina.behaviors.dublincore.IDublinCore"
    ],
    "parent": {
        "@id": "http://127.0.0.1:54065/db/container",
        "@name": "container",
        "@type": "Container",
        "@uid": "0293c5ae7da34aa88587f958c65b9799",
        "UID": "0293c5ae7da34aa88587f958c65b9799"
    },
    "is_folderish": true,
    "creation_date": "2019-02-18T12:31:12.346240+00:00",
    "modification_date": "2019-02-18T12:31:12.363043+00:00",
    "UID": "029|e01c34c378d84b2b9e102a1488a27f63",
    "type_name": "Folder",
    "title": "foobar",
    "uuid": "029|e01c34c378d84b2b9e102a1488a27f63",
    "__behaviors__": [],
    "__name__": "foobar",
    "guillotina.behaviors.dublincore.IDublinCore": {
        "title": "foobar",
        "description": null,
        "creation_date": "2019-02-18T12:31:12.346240+00:00",
        "modification_date": "2019-02-18T12:31:12.363043+00:00",
        "effective_date": null,
        "expiration_date": null,
        "creators": [
            "root"
        ],
        "tags": null,
        "publisher": null,
        "contributors": [
            "root"
        ]
    },
    "items": [],
    "length": 0
}
Query Parameters:
 
  • include (string) –
  • omit (string) –
Status Codes:

DELETE /(db)/(container)/(id)

Delete resource

  • Permission: guillotina.DeleteContent
  • Context: guillotina.interfaces.content.IResource

http

DELETE /db/container/foobar HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

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

httpie

http DELETE http://nohost/db/container/foobar Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json
Status Codes:

Behaviors

GET /(db)/(container)/(id)/@behaviors

Get information on behaviors for this resource

  • Permission: guillotina.AccessContent
  • Context: guillotina.interfaces.content.IResource

http

GET /db/container/foobar/@behaviors HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar/@behaviors -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar/@behaviors Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 3845
Content-Type: application/json

{
    "static": [
        "guillotina.behaviors.dublincore.IDublinCore"
    ],
    "dynamic": [],
    "available": [
        "guillotina.behaviors.attachment.IAttachment",
        "guillotina.behaviors.attachment.IMultiAttachment",
        "guillotina.behaviors.dynamic.IDynamicFields",
        "guillotina.behaviors.dynamic.IDynamicFieldValues"
    ],
    "guillotina.behaviors.attachment.IAttachment": {
        "type": "object",
        "properties": {
            "file": {
                "type": "object",
                "properties": {
                    "type": "object",
                    "properties": {
                        "content_type": {
                            "type": "string",
                            "description": "The content type identifies the type of data.",
                            "title": "Content Type"
                        },
                        "filename": {
                            "type": "string",
                            "title": "Filename"
                        },
                        "extension": {
                            "type": "string",
                            "title": "Extension of the file"
                        },
                        "md5": {
                            "type": "string",
                            "title": "MD5"
                        },
                        "size": {
                            "type": "integer",
                            "title": "Size"
                        }
                    },
                    "required": [
                        "size"
                    ],
                    "invariants": []
                }
            }
        },
        "required": [
            "file"
        ],
        "invariants": []
    },
    "guillotina.behaviors.attachment.IMultiAttachment": {
        "type": "object",
        "properties": {
            "files": {
                "type": "object",
                "additionalProperties": {
                    "type": "object",
                    "properties": {
                        "type": "object",
                        "properties": {
                            "content_type": {
                                "type": "string",
                                "description": "The content type identifies the type of data.",
                                "title": "Content Type"
                            },
                            "filename": {
                                "type": "string",
                                "title": "Filename"
                            },
                            "extension": {
                                "type": "string",
                                "title": "Extension of the file"
                            },
                            "md5": {
                                "type": "string",
                                "title": "MD5"
                            },
                            "size": {
                                "type": "integer",
                                "title": "Size"
                            }
                        },
                        "required": [
                            "size"
                        ],
                        "invariants": []
                    }
                }
            }
        },
        "required": [
            "files"
        ],
        "invariants": []
    },
    "guillotina.behaviors.dublincore.IDublinCore": {
        "type": "object",
        "properties": {
            "title": {
                "type": "string",
                "description": "The first unqualified Dublin Core 'Title' element value.",
                "title": "Title"
            },
            "description": {
                "type": "string",
                "description": "The first unqualified Dublin Core 'Description' element value.",
                "title": "Description"
            },
            "creation_date": {
                "type": "datetime",
                "description": "The date and time that an object is created. \nThis is normally set automatically.",
                "title": "Creation Date"
            },
            "modification_date": {
                "type": "datetime",
                "description": "The date and time that the object was last modified in a\nmeaningful way.",
                "title": "Modification Date"
            },
            "effective_date": {
                "type": "datetime",
                "description": "The date and time that an object should be published. ",
                "title": "Effective Date"
            },
            "expiration_date": {
                "type": "datetime",
                "description": "The date and time that the object should become unpublished.",
                "title": "Expiration Date"
            },
            "creators": {
                "type": "array",
                "description": "The unqualified Dublin Core 'Creator' element values",
                "title": "Creators",
                "items": {
                    "type": "string"
                }
            },
            "tags": {
                "type": "array",
                "description": "The unqualified Dublin Core 'Tags' element values",
                "title": "Tags",
                "items": {
                    "type": "string"
                }
            },
            "publisher": {
                "type": "string",
                "description": "The first unqualified Dublin Core 'Publisher' element value.",
                "title": "Publisher"
            },
            "contributors": {
                "type": "array",
                "description": "The unqualified Dublin Core 'Contributor' element values",
                "title": "Contributors",
                "items": {
                    "type": "string"
                }
            }
        },
        "required": [],
        "invariants": []
    },
    "guillotina.behaviors.dynamic.IDynamicFields": {
        "type": "object",
        "properties": {
            "fields": {
                "type": "object",
                "additionalProperties": {
                    "type": "object",
                    "properties": {
                        "type": "object",
                        "properties": {
                            "title": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            },
                            "type": {
                                "type": "string",
                                "vocabulary": [
                                    "date",
                                    "integer",
                                    "text",
                                    "float",
                                    "keyword",
                                    "boolean"
                                ]
                            },
                            "required": {
                                "type": "boolean"
                            },
                            "meta": {
                                "type": "object",
                                "title": "Additional information on field",
                                "properties": {}
                            }
                        },
                        "required": [
                            "type"
                        ],
                        "invariants": []
                    }
                }
            }
        },
        "required": [
            "fields"
        ],
        "invariants": []
    },
    "guillotina.behaviors.dynamic.IDynamicFieldValues": {
        "type": "object",
        "properties": {
            "values": {
                "type": "object",
                "additionalProperties": true
            }
        },
        "required": [
            "values"
        ],
        "invariants": []
    }
}
Status Codes:

PATCH /(db)/(container)/(id)/@behaviors

Add behavior to resource

  • Permission: guillotina.ModifyContent
  • Context: guillotina.interfaces.content.IResource

http

PATCH /db/container/foobar/@behaviors HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290
Content-Type: application/json

{
    "behavior": "guillotina.behaviors.attachment.IAttachment"
}

curl

curl -i -X PATCH http://nohost/db/container/foobar/@behaviors -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"behavior": "guillotina.behaviors.attachment.IAttachment"}' --user root:root

httpie

echo '{
  "behavior": "guillotina.behaviors.attachment.IAttachment"
}' | http PATCH http://nohost/db/container/foobar/@behaviors Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 2
Content-Type: application/json

{}
Status Codes:

DELETE /(db)/(container)/(id)/@behaviors

Remove behavior from resource

  • Permission: guillotina.ModifyContent
  • Context: guillotina.interfaces.content.IResource

http

DELETE /db/container/foobar/@behaviors HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290
Content-Type: application/json

{
    "behavior": "guillotina.behaviors.attachment.IAttachment"
}

curl

curl -i -X DELETE http://nohost/db/container/foobar/@behaviors -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"behavior": "guillotina.behaviors.attachment.IAttachment"}' --user root:root

httpie

echo '{
  "behavior": "guillotina.behaviors.attachment.IAttachment"
}' | http DELETE http://nohost/db/container/foobar/@behaviors Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 2
Content-Type: application/json

{}
Status Codes:

Files

PATCH /(db)/(container)/(id)/@upload/(field_name)
  • Permission: guillotina.ModifyContent
  • Context: guillotina.interfaces.content.IResource

http

PATCH /db/container/foobar/@upload/file HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

foobar data

curl

curl -i -X PATCH http://nohost/db/container/foobar/@upload/file -H 'Accept: application/json' --data-raw 'foobar data' --user root:root

httpie

echo 'foobar data' | http PATCH http://nohost/db/container/foobar/@upload/file Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json
Status Codes:

GET /(db)/(container)/(id)/@download/(field_name)
  • Permission: guillotina.ViewContent
  • Context: guillotina.interfaces.content.IResource

http

GET /db/container/foobar/@download/file HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar/@download/file -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar/@download/file Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Disposition: attachment; filename="d334502f112140d9ad3ea9fe33c645cf"
Content-Length: 11
Content-Type: text/plain

foobar data
Status Codes:

Security

GET /(db)/(container)/(id)/@all_permissions

See all permission settings for this resource

  • Permission: guillotina.SeePermissions
  • Context: guillotina.interfaces.content.IResource

http

GET /db/container/foobar/@all_permissions HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar/@all_permissions -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar/@all_permissions Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 4512
Content-Type: application/json

[
    {
        "foobar": {
            "prinperm": [],
            "prinrole": [
                {
                    "principal": "root",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                }
            ],
            "roleperm": [],
            "perminhe": []
        }
    },
    {
        "container": {
            "prinperm": [],
            "prinrole": [
                {
                    "principal": "root",
                    "role": "guillotina.ContainerAdmin",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                }
            ],
            "roleperm": [],
            "perminhe": []
        }
    },
    {
        "(no name)": {
            "prinperm": [
                {
                    "principal": "root",
                    "permission": "guillotina.AccessContent",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "permission": "guillotina.AddContainer",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "permission": "guillotina.DeleteContainers",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "permission": "guillotina.GetAPIDefinition",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "permission": "guillotina.GetContainers",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "permission": "guillotina.GetDatabases",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "permission": "guillotina.MountDatabase",
                    "setting": "Allow"
                },
                {
                    "principal": "root",
                    "permission": "guillotina.UmountDatabase",
                    "setting": "Allow"
                }
            ],
            "perminhe": []
        }
    },
    {
        "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.DuplicateContent",
                    "role": "guillotina.Reader",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.DuplicateContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.DuplicateContent",
                    "role": "guillotina.Editor",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.DeleteContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.AddContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.MoveContent",
                    "role": "guillotina.Owner",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.MoveContent",
                    "role": "guillotina.Editor",
                    "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.Manage",
                    "role": "guillotina.Manager",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.DeleteContainers",
                    "role": "guillotina.ContainerDeleter",
                    "setting": "Allow"
                },
                {
                    "permission": "guillotina.SearchContent",
                    "role": "guillotina.Member",
                    "setting": "Allow"
                }
            ]
        }
    }
]
Status Codes:

GET /(db)/(container)/(id)/@canido

Check if user has permissions on context

  • Permission: guillotina.AccessContent
  • Context: guillotina.interfaces.content.IResource

http

GET /db/container/foobar/@canido?permissions=guillotina.ModifyContent,guillotina.AccessContent HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i 'http://nohost/db/container/foobar/@canido?permissions=guillotina.ModifyContent,guillotina.AccessContent' -H 'Accept: application/json' --user root:root

httpie

http 'http://nohost/db/container/foobar/@canido?permissions=guillotina.ModifyContent,guillotina.AccessContent' Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 68
Content-Type: application/json

{
    "guillotina.ModifyContent": true,
    "guillotina.AccessContent": true
}
Query Parameters:
 
  • permission (string) – (required)
Status Codes:

GET /(db)/(container)/(id)/@sharing

Get sharing settings for this resource

  • Permission: guillotina.SeePermissions
  • Context: guillotina.interfaces.content.IResource

http

GET /db/container/foobar/@sharing HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar/@sharing -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar/@sharing Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 280
Content-Type: application/json

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

POST /(db)/(container)/(id)/@sharing

Change permissions for a resource

  • Permission: guillotina.ChangePermissions
  • Context: guillotina.interfaces.content.IResource

http

POST /db/container/foobar/@sharing HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290
Content-Type: application/json

{
    "prinrole": [
        {
            "principal": "foobar",
            "role": "guillotina.Owner",
            "setting": "Allow"
        }
    ]
}

curl

curl -i -X POST http://nohost/db/container/foobar/@sharing -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"prinrole": [{"principal": "foobar", "role": "guillotina.Owner", "setting": "Allow"}]}' --user root:root

httpie

echo '{
  "prinrole": [
    {
      "principal": "foobar",
      "role": "guillotina.Owner",
      "setting": "Allow"
    }
  ]
}' | http POST http://nohost/db/container/foobar/@sharing Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json
Status Codes:

PUT /(db)/(container)/(id)/@sharing

Replace permissions for a resource

  • Permission: guillotina.ChangePermissions
  • Context: guillotina.interfaces.content.IResource

http

PUT /db/container/foobar/@sharing HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290
Content-Type: application/json

{
    "prinrole": [
        {
            "principal": "foobar",
            "role": "guillotina.Owner",
            "setting": "Allow"
        }
    ]
}

curl

curl -i -X PUT http://nohost/db/container/foobar/@sharing -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"prinrole": [{"principal": "foobar", "role": "guillotina.Owner", "setting": "Allow"}]}' --user root:root

httpie

echo '{
  "prinrole": [
    {
      "principal": "foobar",
      "role": "guillotina.Owner",
      "setting": "Allow"
    }
  ]
}' | http PUT http://nohost/db/container/foobar/@sharing Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json
Status Codes:

Content

POST /(db)/(container)/(id)/@move

Move resource

  • Permission: guillotina.MoveContent
  • Context: guillotina.interfaces.content.IResource

http

POST /db/container/foobar/@move HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290
Content-Type: application/json

{
    "destination": "",
    "new_id": "foobar2"
}

curl

curl -i -X POST http://nohost/db/container/foobar/@move -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"destination": "", "new_id": "foobar2"}' --user root:root

httpie

echo '{
  "destination": "",
  "new_id": "foobar2"
}' | http POST http://nohost/db/container/foobar/@move Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 55
Content-Type: application/json

{
    "@url": "http://127.0.0.1:54065/db/container/foobar2"
}
Status Codes:

POST /(db)/(container)/(id)/@duplicate

Duplicate resource

  • Permission: guillotina.DuplicateContent
  • Context: guillotina.interfaces.content.IResource

http

POST /db/container/foobar2/@duplicate HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290
Content-Type: application/json

{
    "destination": "",
    "new_id": "foobar3"
}

curl

curl -i -X POST http://nohost/db/container/foobar2/@duplicate -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"destination": "", "new_id": "foobar3"}' --user root:root

httpie

echo '{
  "destination": "",
  "new_id": "foobar3"
}' | http POST http://nohost/db/container/foobar2/@duplicate Accept:application/json Content-Type:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 1286
Content-Type: application/json

{
    "@id": "http://127.0.0.1:54065/db/container/foobar3",
    "@type": "Folder",
    "@name": "foobar3",
    "@uid": "029|f76e5f60159149049e308704d76897a6",
    "@static_behaviors": [
        "guillotina.behaviors.dublincore.IDublinCore"
    ],
    "parent": {
        "@id": "http://127.0.0.1:54065/db/container",
        "@name": "container",
        "@type": "Container",
        "@uid": "0293c5ae7da34aa88587f958c65b9799",
        "UID": "0293c5ae7da34aa88587f958c65b9799"
    },
    "is_folderish": true,
    "creation_date": "2019-02-18T12:31:12.410957+00:00",
    "modification_date": "2019-02-18T12:31:12.570223+00:00",
    "UID": "029|f76e5f60159149049e308704d76897a6",
    "type_name": "Folder",
    "title": null,
    "uuid": "029|f76e5f60159149049e308704d76897a6",
    "__behaviors__": [
        "guillotina.behaviors.attachment.IAttachment"
    ],
    "__name__": "foobar3",
    "guillotina.behaviors.dublincore.IDublinCore": {
        "title": null,
        "description": null,
        "creation_date": "2019-02-18T12:31:12.410957+00:00",
        "modification_date": "2019-02-18T12:31:12.570223+00:00",
        "effective_date": null,
        "expiration_date": null,
        "creators": [
            "root"
        ],
        "tags": null,
        "publisher": null,
        "contributors": [
            "root"
        ]
    },
    "guillotina.behaviors.attachment.IAttachment": {
        "file": {
            "filename": "d334502f112140d9ad3ea9fe33c645cf",
            "content_type": "text/plain",
            "size": 11,
            "extension": null,
            "md5": null
        }
    },
    "items": [],
    "length": 0
}
Status Codes:

GET /(db)/(container)/(id)/@addable-types

Return a list of type names that can be added to container

  • Permission: guillotina.AddContent
  • Context: guillotina.interfaces.content.IAsyncContainer

http

GET /db/container/foobar3/@addable-types HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar3/@addable-types -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar3/@addable-types Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 18
Content-Type: application/json

[
    "Item",
    "Folder"
]
Status Codes:

GET /(db)/(container)/(id)/@ids

Return a list of ids in the resource

  • Permission: guillotina.Manage
  • Context: guillotina.interfaces.content.IFolder

http

GET /db/container/foobar3/@ids HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar3/@ids -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar3/@ids Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 2
Content-Type: application/json

[]
Status Codes:

GET /(db)/(container)/(id)/@items

Paginated list of sub objects

  • Permission: guillotina.Manage
  • Context: guillotina.interfaces.content.IFolder

http

GET /db/container/foobar3/@items HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar3/@items -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar3/@items Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json

{
    "items": [],
    "total": 0,
    "page": 1,
    "page_size": 20
}
Query Parameters:
 
  • include (string) –
  • omit (string) –
  • page_size (number) – (default: 20)
  • page (number) – (default: 1)
Status Codes:

GET /(db)/(container)/(id)/@invalidate-cache

Invalidate cache of object

  • Permission: guillotina.ModifyContent
  • Context: zope.interface.Interface

http

GET /db/container/foobar3/@invalidate-cache HTTP/1.1
Accept: application/json
Authorization: Basic cm9vdDpyb290

curl

curl -i http://nohost/db/container/foobar3/@invalidate-cache -H 'Accept: application/json' --user root:root

httpie

http http://nohost/db/container/foobar3/@invalidate-cache Accept:application/json -a root:root

response

HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json
Status Codes: