Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"CopyLocationInput": {
"destination": "/1/5"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<CopyLocationInput>
<destination>/1/2</destination>
</CopyLocationInput>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"SwapLocationInput": {
"destination": "/1/2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<SwapLocationInput>
<destination>/1/2</destination>
</SwapLocationInput>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RestoreTrashItemInput": {
"destination": "/1/2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<RestoreTrashItemInput>
<destination>/1/2</destination>
</RestoreTrashItemInput>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RestoreTrashItemInput": {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<RestoreTrashItemInput />
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"MoveUserGroupInput": {
"destination": "/1/5/14"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<MoveUserGroupInput>
<destination>/1/2</destination>
</MoveUserGroupInput>
Original file line number Diff line number Diff line change
Expand Up @@ -51,34 +51,6 @@ get:
description: Error - the user is not authorized to read this Location.
404:
description: Error - the Location with the given path does not exist.
move:
displayName: Move subtree
description: Moves Location to a different parent. The destination can also be '/content/trash' where the Location is put into the trash. (NOTE - Be aware that the user might lose access to the item after it has been moved, for example when read access is limited by a subtree). MOVE or POST with header X-HTTP-Method-Override MOVE.
headers:
Destination:
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
responses:
201:
description: Created. If destination is '/api/ibexa/v2/content/trash' and content only has one Location (NOTE - Like on normal subtree moves, be aware that the user might lose access to the item after it has been moved to Trash.)
204:
description: No Content. If destination is '/api/ibexa/v2/content/trash' and content still has other Locations (no trash item is created).
401:
description: Error - the user is not authorized to move this Location.
404:
description: Error - the Location with the given ID does not exist.
copy:
displayName: Copy subtree
description: Copies the subtree to a different parent. COPY or POST with header X-HTTP-Method-Override COPY.
headers:
Destination:
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
responses:
201:
description: Created. Copied the subtree to a different parent.
401:
description: Error - the user is not authorized to move this Location.
404:
description: Error - the Location with the given ID does not exist.
delete:
displayName: Delete subtree
description: Deletes the complete subtree for the given path. Every content item which does not have any other Location is deleted. Otherwise the deleted Location is removed from the content item. The children are recursively deleted.
Expand Down Expand Up @@ -125,13 +97,41 @@ get:
description: Error - the user is not authorized to update this Location.
404:
description: Error - the Location with the given ID does not exist.
swap:
displayName: Swap Location
description: Swaps the Location of a content item with the given Location of another content item. SWAP or POST with header X-HTTP-Method-Override SWAP.
post:
displayName: Swap Location / Copy subtree / Move subtree / Trash
description: "Depending on request method or Content-Type header, one of the following: swaps the Location of a content item with the given Location of another content item, copies a subtree, moves a subtree, sends location to trash. Request method can be POST, SWAP, COPY, MOVE, or TRASH."
headers:
Content-Type:
description: Required only when using POST request method. Indicates the format of the request body and the action.
example: |
application/vnd.ibexa.api.SwapLocationInput+json
application/vnd.ibexa.api.SwapLocationInput+xml
application/vnd.ibexa.api.CopyLocationInput+json
application/vnd.ibexa.api.CopyLocationInput+xml
application/vnd.ibexa.api.MoveLocationInput+json
application/vnd.ibexa.api.MoveLocationInput+xml
application/vnd.ibexa.api.TrashLocationInput+json
application/vnd.ibexa.api.TrashLocationInput+xml
Destination:
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
description: Required only when using SWAP, COPY, or MOVE request methods. A location resource to swap with, copy the subtree to, or move the subtree to, e.g. '/api/ibexa/v2/content/locations/1/63'.
example: /api/ibexa/v2/content/locations/1/63
body:
description: Used together with POST request method. Indicates the location to swap with or the subtree to copy
application/vnd.ibexa.api.SwapLocationInput+json:
type: SwapLocationInputWrapper
example: !include examples/content/locations/path/POST/SwapLocationInput.json.example
application/vnd.ibexa.api.SwapLocationInput+xml:
type: SwapLocationInput
example: !include examples/content/locations/path/POST/SwapLocationInput.xml.example
application/vnd.ibexa.api.CopyLocationInput+json:
type: CopyLocationInputWrapper
example: !include examples/content/locations/path/POST/CopyLocationInput.json.example
application/vnd.ibexa.api.CopyLocationInput+xml:
type: CopyLocationInput
example: !include examples/content/locations/path/POST/CopyLocationInput.xml.example
responses:
201:
description: Created. Copied or moved the subtree to a different parent, or sent the location to Trash.
204:
description: No Content. Swapped the Location of a content item with the given Location of another content item.
401:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,15 @@ get:
description: Temporary redirect.
404:
description: Error - the resource does not exist.
copy:
post:
displayName: Create a draft from current version
description: The system creates a new draft as a copy of the current version. COPY or POST with header X-HTTP-Method-Override COPY.
description: The system creates a new draft as a copy of the current version. Request method can be POST or COPY.
headers:
Content-Type:
description: Optional when using the COPY request method.
example: |
application/vnd.ibexa.api.CreateDraftFromCurrentVersionInput+json
application/vnd.ibexa.api.CreateDraftFromCurrentVersionInput+xml
Accept:
description: If set, the updated version is returned in XML or JSON format.
example: |
Expand Down Expand Up @@ -311,45 +316,44 @@ get:
description: Error - the content ID or version ID does not exist.
412:
description: Error - the current ETag does not match with the one provided in the If-Match header.
copy:
displayName: Create a draft from a version
description: The system creates a new draft as a copy of the given version. COPY or POST with header X-HTTP-Method-Override COPY.
delete:
displayName: Delete content version
description: Deletes the content version.
responses:
204:
description: No Content - the version is deleted.
404:
description: Error - the content item or version were not found.
401:
description: Error - the user is not authorized to delete this version.
403:
description: Error - the version is in published state.
post:
displayName: Publish or copy content version
description: Publishes or copies the content version as draft, depending on request method or Content-Type header. Request method can be POST, PUBLISH, or COPY.
headers:
Content-Type:
description: Required when using the POST request method to indicate the action.
example: |
application/vnd.ibexa.api.PublishContentVersionInput+json
application/vnd.ibexa.api.PublishContentVersionInput+xml
application/vnd.ibexa.api.CreateDraftFromVersionInput+json
application/vnd.ibexa.api.CreateDraftFromVersionInput+xml
Accept:
description: If set, the updated version is returned in XML or JSON format.
description: If set, the published version is returned in XML or JSON format.
example: |
application/vnd.ibexa.api.Version+xml
application/vnd.ibexa.api.Version+json
responses:
201:
description: Created.
description: Copy created.
body:
application/vnd.ibexa.api.Version+xml:
type: Version
example: !include examples/content/objects/content_id/versions/version_no/COPY/Version.xml.example
application/vnd.ibexa.api.Version+json:
type: VersionWrapper
example: !include examples/content/objects/content_id/versions/version_no/COPY/Version.json.example
401:
description: Error - the user is not authorized to update this content item.
404:
description: Error - the content item was not found.
delete:
displayName: Delete content version
description: Deletes the content version.
responses:
204:
description: No Content - the version is deleted.
404:
description: Error - the content item or version were not found.
401:
description: Error - the user is not authorized to delete this version.
403:
description: Error - the version is in published state.
publish:
displayName: Publish a content version
description: Publishes the content version. PUBLISH or POST with header X-HTTP-Method-Override PUBLISH
responses:
204:
description: No Content - the content version is published.
401:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,31 @@ delete:
description: Error - The user has no permission to read the item in Trash.
404:
description: Error - An item in Trash with the provided ID does not exist.
move:
post:
displayName: Untrash content item
description: Restores an item from Trash. MOVE or POST with header X-HTTP-Method-Override MOVE.
description: Restores an item from Trash. Request method can be POST or MOVE.
headers:
Content-Type:
description: Optional when using the MOVE request method.
example: |
application/vnd.ibexa.api.RestoreTrashItemInput+json
application/vnd.ibexa.api.RestoreTrashItemInput+xml
Destination:
description: If the destination Location URI is provided, the item from Trash is restored under this Location, otherwise it is restored under its original parent Location.
description: Used together with MOVE request method. If the destination Location URI (e.g. /api/ibexa/v2/content/locations/1/2) is provided, the item from Trash is restored under this Location, otherwise it is restored under its original parent Location.
body:
description: Used together with POST request method. Omit the "destination" property to restore under original location.
application/vnd.ibexa.api.RestoreTrashItemInput+json:
type: RestoreTrashItemInputWrapper
example: !include examples/content/trash/trash_itemid/POST/RestoreTrashItemInput.json.example
application/vnd.ibexa.api.RestoreTrashItemInput+xml:
type: RestoreTrashItemInput
example: !include examples/content/trash/trash_itemid/POST/RestoreTrashItemInput.xml.example
application/vnd.ibexa.api.RestoreTrashItemInputOriginalLocation+json:
type: RestoreTrashItemInputWrapper
example: !include examples/content/trash/trash_itemid/POST/RestoreTrashItemInputOriginal.json.example
application/vnd.ibexa.api.RestoreTrashItemInputOriginalLocation+xml:
type: RestoreTrashItemInput
example: !include examples/content/trash/trash_itemid/POST/RestoreTrashItemInputOriginal.xml.example
responses:
201:
description: Item restored.
Expand Down
31 changes: 16 additions & 15 deletions docs/api/rest_api/rest_api_reference/input/ibexa-content-types.raml
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,23 @@ get:
description: Error - The user is not authorized to read this content type.
404:
description: Error - The content type does not exist.
copy:
displayName: Copy content type
description: Copies a content type. A new remote ID is generated, and the identifier of the copy is set to 'copy_of_originalBaseIdentifier_newTypeId' (or another random string). COPY or POST with header X-HTTP-Method-Override COPY.
responses:
201:
description: Copy of the content type created.
401:
description: Error - The user is not authorized to copy this content type.
post:
displayName: Create Draft
description: Creates a draft and updates it with the given data.
displayName: Create Draft / Copy
description: |
Depending on request details, either creates a content type draft with the given data or copies a content type. When copying a new ID is generated, and the identifier of the copy is set to 'copy_of_originalBaseIdentifier_newTypeId'. To create a copy request method can be POST or COPY.
headers:
Accept:
description: If set, the new content type draft is returned in XML or JSON format.
example: |
application/vnd.ibexa.api.ContentTypeInfo+xml
application/vnd.ibexa.api.ContentTypeInfo+json
Content-Type:
description: The content type Update schema encoded in XML or JSON format.
description: The content type update schema encoded in XML or JSON format or application/vnd.ibexa.api.CopyContentTypeInput to indicate copying.
example: |
application/vnd.ibexa.api.ContentTypeUpdate+xml
application/vnd.ibexa.api.ContentTypeUpdate+json
application/vnd.ibexa.api.CopyContentTypeInput+json
application/vnd.ibexa.api.CopyContentTypeInput+xml
body:
application/vnd.ibexa.api.ContentTypeUpdate+xml:
type: ContentTypeUpdate
Expand All @@ -96,7 +91,7 @@ get:
example: !include examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example
responses:
201:
description: Draft created.
description: Draft or copy created. For copying the response is empty.
body:
application/vnd.ibexa.api.ContentTypeInfo+xml:
type: ContentTypeInfo
Expand All @@ -107,7 +102,7 @@ get:
400:
description: Error - The input does not match the input schema definition.
401:
description: Error - The user is not authorized to create the draft.
description: Error - The user is not authorized to create or copy the draft.
403:
description: Error - A content type with the given new identifier already exists. A draft already exists.
delete:
Expand Down Expand Up @@ -228,9 +223,15 @@ get:
description: Error - A content type with the given new identifier already exists.
404:
description: Error - There is no draft for this content type.
publish:
post:
displayName: Publish content type draft
description: Publishes a content type draft. PUBLISH or POST with header X-HTTP-Method-Override PUBLISH.
description: Publishes a content type draft. Request method can be POST or PUBLISH.
headers:
Content-Type:
description: Optional when using the PUBLISH request method.
example: |
application/vnd.ibexa.api.PublishContentTypeInput+json
application/vnd.ibexa.api.PublishContentTypeInput+xml
responses:
200:
body:
Expand Down
51 changes: 51 additions & 0 deletions docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
Original file line number Diff line number Diff line change
Expand Up @@ -6275,3 +6275,54 @@ ActionConfiguration:
type: datetime
description: 'Timestamp indicating when the action configuration was last updated.'

SwapLocationInputWrapper:
type: object
properties:
SwapLocationInput:
type: SwapLocationInput

SwapLocationInput:
type: object
properties:
destination:
type: string
description: The location path to swap with.

MoveUserGroupInputWrapper:
type: object
properties:
MoveUserGroupInput:
type: MoveUserGroupInput

MoveUserGroupInput:
type: object
properties:
destination:
type: string
description: The path string of the new parent location.

CopyLocationInputWrapper:
type: object
properties:
CopyLocationInput:
type: CopyLocationInput

CopyLocationInput:
type: object
properties:
destination:
type: string
description: The location path the subtree will be copied to.

RestoreTrashItemInputWrapper:
type: object
properties:
RestoreTrashItemInput:
type: RestoreTrashItemInput

RestoreTrashItemInput:
type: object
properties:
destination:
type: string
description: The path string under which the item should be restored.
Loading