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:56609/db/container/foobar2" }
Status Codes: - 200 OK – Successfully moved resource
- 401 Unauthorized – You are not authorized to perform the operation
- 404 Not Found – The resource does not exist
-
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:56609/db/container/foobar3", "@type": "Folder", "@name": "foobar3", "@uid": "f25|0af0eaa7dc8d4977a6a55ce64d7be207", "@static_behaviors": [ "guillotina.behaviors.dublincore.IDublinCore" ], "parent": { "@id": "http://127.0.0.1:56609/db/container", "@name": "container", "@type": "Container", "@uid": "f2546879d77e43bfbee1adef359f6211", "UID": "f2546879d77e43bfbee1adef359f6211" }, "is_folderish": true, "creation_date": "2019-08-24T12:41:22.757311+00:00", "modification_date": "2019-08-24T12:41:22.914858+00:00", "UID": "f25|0af0eaa7dc8d4977a6a55ce64d7be207", "type_name": "Folder", "title": null, "uuid": "f25|0af0eaa7dc8d4977a6a55ce64d7be207", "__behaviors__": [ "guillotina.behaviors.attachment.IAttachment" ], "__name__": "foobar3", "guillotina.behaviors.dublincore.IDublinCore": { "title": null, "description": null, "creation_date": "2019-08-24T12:41:22.757311+00:00", "modification_date": "2019-08-24T12:41:22.914858+00:00", "effective_date": null, "expiration_date": null, "creators": [ "root" ], "tags": null, "publisher": null, "contributors": [ "root" ] }, "guillotina.behaviors.attachment.IAttachment": { "file": { "filename": "b5546bcb9946405e86f7ba11ac462d74", "content_type": "text/plain", "size": 11, "extension": null, "md5": null } }, "items": [], "length": 0 }
Status Codes: - 200 OK – Successfully duplicated object
- 401 Unauthorized – You are not authorized to perform the operation
- 404 Not Found – The resource does not exist
-
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:roothttpie
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: - 200 OK – Successfully returned list of type names
- 401 Unauthorized – You are not authorized to perform the operation
- 404 Not Found – The resource does not exist
-
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:roothttpie
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: - 200 OK – Successfully returned list of ids
- 401 Unauthorized – You are not authorized to perform the operation
- 404 Not Found – The resource does not exist
-
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:roothttpie
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: - 200 OK – Successfully returned response object
- 401 Unauthorized – You are not authorized to perform the operation
- 404 Not Found – The resource does not exist
-
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:roothttpie
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: - 200 OK – Successfully invalidated
- 401 Unauthorized – You are not authorized to perform the operation
- 404 Not Found – The resource does not exist