Content¶
-
POST
/
(db)/
(container)/
(id)/@move
¶ Move resource
- Permission: guillotina.MoveContent
- Context: guillotina.interfaces.content.IResource
POST /db/container/foobar/@move HTTP/1.1 Accept: application/json Authorization: Basic cm9vdDpyb290 Content-Type: application/json { "destination": "", "new_id": "foobar2" }
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
echo '{ "destination": "", "new_id": "foobar2" }' | http POST http://nohost/db/container/foobar/@move Accept:application/json Content-Type:application/json -a root:root
HTTP/1.1 412 OK Content-Length: 258 Content-Type: application/json { "reason": "preconditionFailed", "details": "", "type": "PreconditionFailed", "eid": "d2afbe974b9e438fbfd28d8eb5fafdd4", "message": "Precondition Failed Destination already has object with the id foobar2 on < Item at /container/foobar2 by 140393927826760 >" }
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
POST /db/container/foobar2/@duplicate HTTP/1.1 Accept: application/json Authorization: Basic cm9vdDpyb290 Content-Type: application/json { "destination": "", "new_id": "foobar3" }
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
echo '{ "destination": "", "new_id": "foobar3" }' | http POST http://nohost/db/container/foobar2/@duplicate Accept:application/json Content-Type:application/json -a root:root
HTTP/1.1 412 OK Content-Length: 260 Content-Type: application/json { "reason": "preconditionFailed", "details": "", "type": "PreconditionFailed", "eid": "39e8c2bab75f46f99cd44f1ed90bf498", "message": "Precondition Failed Destination already has object with the id foobar3 on < Folder at /container/foobar2 by 140393931221832 >" }
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)/@invalidate-cache
¶ Invalidate cache of object
- Permission: guillotina.ModifyContent
- Context: zope.interface.Interface
GET /db/container/foobar2/@invalidate-cache HTTP/1.1 Accept: application/json Authorization: Basic cm9vdDpyb290
curl -i http://nohost/db/container/foobar2/@invalidate-cache -H 'Accept: application/json' --user root:root
http http://nohost/db/container/foobar2/@invalidate-cache Accept:application/json -a root:root
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