Root resources ¶
/
List of root resources ¶
GET /
Lists the root resources of the Ibexa Platform installation.
Header parameters
Accept
If set, the list is return in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Root+xml
application/vnd.ez.api.Root+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| Root | This class represents a root. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Root media-type="application/vnd.ez.api.Root+xml">
<content media-type="" href="/api/ezp/v2/content/objects"/>
<contentByRemoteId media-type="" href="/api/ezp/v2/content/objects{?remoteId}"/>
<contentTypes media-type="application/vnd.ez.api.ContentTypeInfoList+xml" href="/api/ezp/v2/content/types"/>
<contentTypeByIdentifier media-type="" href="/api/ezp/v2/content/types{?identifier}"/>
<contentTypeGroups media-type="application/vnd.ez.api.ContentTypeGroupList+xml" href="/api/ezp/v2/content/typegroups"/>
<contentTypeGroupByIdentifier media-type="" href="/api/ezp/v2/content/typegroups{?identifier}"/>
<users media-type="application/vnd.ez.api.UserRefList+xml" href="/api/ezp/v2/user/users"/>
<roles media-type="application/vnd.ez.api.RoleList+xml" href="/api/ezp/v2/user/roles"/>
<rootLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2"/>
<rootUserGroup media-type="app
file_copy
{
"Root": {
"_media-type": "application/vnd.ez.api.Root+json",
"content": {
"_href": "/api/ezp/v2/content/objects",
"_media-type": ""
},
"contentByRemoteId": {
"_href": "/api/ezp/v2/content/objects{?remoteId}",
"_media-type": ""
},
"contentTypeByIdentifier": {
"_href": "/api/ezp/v2/content/types{?identifier}",
"_media-type": ""
},
"contentTypeGroupByIdentifier": {
"_href": "/api/ezp/v2/content/typegroups{?identifier}",
"_media-type": ""
},
"contentTypeGroups": {
"_href": "/api/ezp/v2/content/typegroups",
"_media-type": "application/vnd.ez.api.ContentTypeGroupList+json"
},
"contentTypes": {
"_href": "/api/ezp/v2/content/types",
"_media-type": "application/vnd.ez.api.ContentTypeInfoList+json"
},
"createSession": {
"_href
Managing bookmarks ¶
/bookmark
List of bookmarks ¶
GET /bookmark
Lists bookmarked Locations for the current user.
Header parameters
Accept
If set, the list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.BookmarkList+xml
application/vnd.ez.api.BookmarkList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| offset | integer | The offset of the result set. |
| limit | integer | The number of returned bookmarks. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to list bookmarks. |
Types
| Type | Description |
|---|---|
| BookmarkList | List of bookmarked Locations. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<BookmarkList media-type="application/vnd.ez.api.BookmarkList+xml">
<count>3</count>
<Bookmark media-type="application/vnd.ez.api.Bookmark+xml" _href="/api/ezp/v2/bookmark/65">
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/57/65">
<id>65</id>
<priority>0</priority>
<hidden>false</hidden>
<invisible>false</invisible>
<explicitlyHidden>false</explicitlyHidden>
<ParentLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/57"/>
<pathString>/1/2/57/65/</pathString>
<depth>3</depth>
<childCount>0</childCount>
<remoteId>aa538e305aea472eb221ce23d1cc4b50</remoteId>
<Children media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/2/57/65/children"/>
<Content media-type=
file_copy
{
"BookmarkList": {
"_media-type": "application/vnd.ez.api.BookmarkList+json",
"count": 3,
"items": [
{
"_media-type": "application/vnd.ez.api.Bookmark+json",
"__href": "/api/ezp/v2/bookmark/65",
"Location": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/57/65",
"id": 65,
"priority": 0,
"hidden": false,
"invisible": false,
"explicitlyHidden": false,
"ParentLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/57"
},
"pathString": "/1/2/57/65/",
"depth": 3,
"childCount": 0,
"remoteId": "a
Create bookmark ¶
POST /bookmark/{locationId}
Add given Location to bookmarks of the current user.
Possible responses
| Code | Description |
|---|---|
| 201 |
Created. |
| 401 |
Error - the user is not authorized to given Location. |
| 404 |
Error - the given Location does not exist. |
| 409 |
Error - Location is already bookmarked. |
Check if Location is bookmarked ¶
HEAD /bookmark/{locationId}
Checks if the given Location is bookmarked by the current user.
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - bookmarked. |
| 401 |
Error - the user is not authorized for the given Location. |
| 404 |
Error - the given Location does not exist / is not bookmarked. |
Delete bookmark ¶
DELETE /bookmark/{locationId}
Deletes the given Location from bookmarks of the current user.
Possible responses
| Code | Description |
|---|---|
| 204 |
Deleted - no content. |
| 401 |
Error - the user is not authorized for the given Location. |
| 404 |
Error - the given Location does not exist / is not bookmarked. |
Managing content ¶
/content/objects
Create Content item ¶
POST /content/objects
Creates a draft assigned to the authenticated user. If a different user ID is given in the input, the draft is assigned to the given user but this action requires special permissions for the authenticated user (this is useful for content staging where the transfer process does not have to authenticate with the user who created the Content item in the source server). The user needs to publish the Content item if it should be visible.
Header parameters
Accept
Content - If set, all information for the Content item including the embedded current version is returned in XML or JSON format. ContentInfo - If set, all information for the Content item (excluding the current version) is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Content+xml
application/vnd.ez.api.Content+json
application/vnd.ez.api.ContentInfo+xml
application/vnd.ez.api.ContentInfo+json
|
Content-Type
The ContentCreate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentCreate+xml
application/vnd.ez.api.ContentCreate+json
|
Possible responses
| Code | Description |
|---|---|
| 201 | |
| 400 |
Error - the input does not match the input schema definition or the validation on a field fails. |
| 401 |
Error - the user is not authorized to create this Object in this Location. |
| 404 |
Error - the parent Location specified in the request body does not exist. |
Types
| Type | Description |
|---|---|
| ContentCreate | This class is used for creating a new Content item. |
| Content | Content ID matcher class. |
| ContentInfo | This class provides all version independent information of the Content item. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentCreate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ContentType href="/api/ezp/v2/content/types/2"/>
<mainLanguageCode>eng-GB</mainLanguageCode>
<LocationCreate>
<ParentLocation href="/api/ezp/v2/content/locations/1/2"/>
<priority>0</priority>
<hidden>false</hidden>
<sortField>PATH</sortField>
<sortOrder>ASC</sortOrder>
</LocationCreate>
<Section href="/api/ezp/v2/content/sections/1"/>
<alwaysAvailable>true</alwaysAvailable>
<remoteId></remoteId>
<fields>
<field>
<fieldDefinitionIdentifier>title</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>draft article</fieldValue>
</field>
<field>
<fieldDefinitionIdentifier>intro</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>
<value key="xml"><![CDATA[<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit"><p>draft draft</p></section>]
file_copy
{
"ContentCreate": {
"ContentType": {
"_href": "/api/ezp/v2/content/types/2"
},
"mainLanguageCode": "eng-GB",
"LocationCreate": {
"ParentLocation": {
"_href": "/api/ezp/v2/content/locations/1/2"
},
"priority": "0",
"hidden": "false",
"sortField": "PATH",
"sortOrder": "ASC"
},
"Section": {
"_href": "/api/ezp/v2/content/sections/1"
},
"alwaysAvailable": "true",
"fields": {
"field": [
{
"fieldDefinitionIdentifier": "title",
"languageCode": "eng-GB",
"fieldTypeIdentifier": "ezstring",
"fieldValue": "draft article"
},
{
"fieldDefinitionIdentifier": "intro",
"languageCode": "eng-GB",
"fieldTypeIdentifier": "ezrichtext",
"fieldValue":
{
"xml": "<section xmlns=\"http://ez.no/namespaces/ezpublish5/xhtml5/edit\"><p>draft draft</p></section>"
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/83" remoteId="a9c8f00b1dba880df7a5ed3e93fad421" id="83">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2"/>
<Name>draft article</Name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/83/versions"/>
<CurrentVersion media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/83/currentversion">
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/83/versions/1">
<VersionInfo>
<id>547</id>
<versionNo>1</versionNo>
<status>DRAFT</status>
<modificationDate>2019-02-19T15:55:37+01:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/67/versions/5">
<VersionInfo>
<id>1114</id>
<versionNo>5</versionNo>
<status>PUBLISHED</status>
<modificationDate>2019-03-16T11:19:51+01:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2019-03-16T11:18:45+01:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB,fre-FR,ger-DE,nor-NO</languageCodes>
<VersionTranslationInfo media-type="application/vnd.ez.api.VersionTranslationInfo+xml">
<Language>
<languageCode>eng-GB</languageCode>
</Language>
<Language>
<languageCode>fre-FR</languageCode>
</Language>
<Language>
<languageCode>ger-DE</languageCode>
</Languag
file_copy
{
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/57",
"_remoteId": "055e5ed41cba5e8ec81d8846a4d1c673",
"_id": 57,
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/2"
},
"Name": "draft article",
"TranslatedName": "draft article",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/57/versions"
},
"CurrentVersion": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/57/currentversion",
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/57/versions/1",
"VersionInfo": {
"id": 517,
Load content by remote ID ¶
GET /content/objects
Loads Content item for a given remote ID.
Query parameters
| Property | Type | Value |
|---|---|---|
| remoteId | string | The remote ID of the Content item. If present, the Content item with the given remote ID is returned. |
Possible responses
| Code | Description |
|---|---|
| 307 |
Temporary redirect. |
| 404 |
Error - the content with the given remote ID does not exist. |
Load content ¶
GET /content/objects/{contentId}
Loads the Content item for the given ID. Depending on the Accept header the current version is embedded (i.e. the current published version or if it does not exist, the draft of the authenticated user).
Header parameters
Accept
Content - If set, all information for the Content item including the embedded current version is returned in XML or JSON format. ContentInfo - If set, all information for the Content item (excluding the current version) is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Content+xml
application/vnd.ez.api.Content+json
application/vnd.ez.api.ContentInfo+xml
application/vnd.ez.api.ContentInfo+json
|
If-None-Match
If the provided ETag matches the current ETag then a "304 Not Modified" is returned. The ETag changes if the meta data has changed, this happens also if there is a new published version.
| Property | Value |
|---|---|
| Type | string |
| Examples |
ETag
|
Query parameters
| Property | Type | Value |
|---|---|---|
| languages | string | Restricts the output of translatable fields to the given languages. Comma separated list. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to read this object. This could also happen if there is no published version yet and another user owns a draft of this Content item. |
| 404 |
Error - the ID is not found. |
Types
| Type | Description |
|---|---|
| Content | Content ID matcher class. |
| ContentInfo | This class provides all version independent information of the Content item. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/54" remoteId="9e863fbb0fb835ce050032b4f00de61d" id="54">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/1"/>
<Name>Forms</Name>
<TranslatedName>Forms</TranslatedName>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/54/versions"/>
<CurrentVersion media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/54/currentversion">
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/54/versions/1">
<VersionInfo>
<id>514</id>
<versionNo>1</versionNo>
<status>PUBLISHED</status>
<modificationDate>2018-09-17T06:48:13+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" h
file_copy
{
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/54",
"_remoteId": "9e863fbb0fb835ce050032b4f00de61d",
"_id": 54,
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/1"
},
"Name": "Forms",
"TranslatedName": "Forms",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/54/versions"
},
"CurrentVersion": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/54/currentversion",
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/54/versions/1",
"VersionInfo": {
"id": 514,
Update content ¶
PATCH /content/objects/{contentId}
This method updates the content metadata which is independent from a version. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, all information for the Content item (excluding the current version) is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentInfo+xml
application/vnd.ez.api.ContentInfo+json
|
If-match
Causes to patch only if the specified ETag is the current one. Otherwise a 412 is returned.
| Property | Value |
|---|---|
| Type | string |
| Examples |
ETag
|
Content-Type
The ContentUpdate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentUpdate+xml
application/vnd.ez.api.ContentUpdate+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to update this object. |
| 404 |
Error - the content ID does not exist. |
| 412 |
Error - the current ETag does not match with the one provided in the If-Match header. |
| 415 |
Error - the media-type is not one of those specified in headers. |
Types
| Type | Description |
|---|---|
| ContentInfo | This class provides all version independent information of the Content item. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentUpdate>
<mainLanguageCode>eng-GB</mainLanguageCode>
<Section href="/api/ezp/v2/content/sections/1"/>
<MainLocation href="/api/ezp/v2/content/locations/2/63/66"/>
<Owner href="/api/ezp/v2/user/users/11"/>
<alwaysAvailable>false</alwaysAvailable>
<remoteId>69848aeb86164c35e5c98202eebe9e05</remoteId>
</ContentUpdate>
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/80" remoteId="69848aeb86164c35e5c98202eebe9e05" id="80">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2"/>
<Name>article1</Name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/80/versions"/>
<CurrentVersion media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/80/currentversion"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/1"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/63/66"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/80/locations"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/11"/>
<lastModi
Delete Content ¶
DELETE /content/objects/{contentId}
Deletes Content item. If Content item has multiple Locations, all of them will be deleted via delete a subtree.
Possible responses
| Code | Description |
|---|---|
| 204 |
The Content item is deleted. |
| 404 |
Error - Content item was not found. |
| 401 |
Error - the user is not authorized to delete this Content item. |
Copy content ¶
COPY /content/objects/{contentId}
Creates new Content item as a copy, under the given parent Location given in the destination header. COPY or POST with header X-HTTP-Method-Override COPY.
Header parameters
destination
A Location resource to which the Content item should be copied.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 201 |
Copy created. |
| 401 |
Error - the user is not authorized to copy this Content item to the given Location. |
| 404 |
Error - the source or destination resource does not exist. |
/content/objects/{contentId}/translations/{languageCode}
Delete translation (permanently) ¶
DELETE /content/objects/{contentId}/translations/{languageCode}
Permanently deletes a translation from all versions of a Content item.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content |
| 401 |
Error - the user is not authorized to delete Content item (content/remove policy). |
| 404 |
Error - the Content item was not found. |
| 406 |
Error - the given translation does not exist for the Content item. |
| 409 |
Error - the specified translation is the only one any version has or is the main translation. |
Get current version ¶
GET /content/objects/{contentId}/currentversion
Redirects to the current version of the Content item.
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 307 |
Temporary redirect. |
| 404 |
Error - the resource does not exist. |
Types
| Type | Description |
|---|---|
| Version | Returns the VersionInfo for this version. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/61/versions/1">
<VersionInfo>
<id>521</id>
<versionNo>1</versionNo>
<status>PUBLISHED</status>
<modificationDate>2021-06-28T11:33:49+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2021-06-28T11:33:31+00:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB</languageCodes>
<VersionTranslationInfo media-type="application/vnd.ez.api.VersionTranslationInfo+xml">
<Language>
<languageCode>eng-GB</languageCode>
</Language>
</VersionTranslationInfo>
<names>
<value languageCode="eng-GB">Art1</value>
</names>
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/o
file_copy
{
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/61/versions/1",
"VersionInfo": {
"id": 521,
"versionNo": 1,
"status": "PUBLISHED",
"modificationDate": "2021-06-28T11:33:49+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"creationDate": "2021-06-28T11:33:31+00:00",
"initialLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"VersionTranslationInfo": {
"_media-type": "application/vnd.ez.api.VersionTranslationInfo+json",
"Language": [
{
"languageCode": "eng-GB"
}
]
},
"names": {
"value": [
{
"_langu
Create a draft from current version ¶
COPY /content/objects/{contentId}/currentversion
The system creates a new draft as a copy of the current version. COPY or POST with header X-HTTP-Method-Override COPY.
Header parameters
Accept
If set, the updated version is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Version+xml
application/vnd.ez.api.Version+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Created |
| 401 |
Error - the user is not authorized to update this Content item. |
| 403 |
Error - the current version is already a draft. |
| 404 |
Error - the Content item was not found. |
Types
| Type | Description |
|---|---|
| Version | Returns the VersionInfo for this version. |
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/61/versions/2">
<VersionInfo>
<id>580</id>
<versionNo>2</versionNo>
<status>DRAFT</status>
<modificationDate>2021-07-26T08:10:02+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2021-07-26T08:10:02+00:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB</languageCodes>
<VersionTranslationInfo media-type="application/vnd.ez.api.VersionTranslationInfo+xml">
<Language>
<languageCode>eng-GB</languageCode>
</Language>
</VersionTranslationInfo>
<names>
<value languageCode="eng-GB">Art1</value>
</names>
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objec
file_copy
{
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/61/versions/3",
"VersionInfo": {
"id": 581,
"versionNo": 3,
"status": "DRAFT",
"modificationDate": "2021-07-26T08:16:50+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"creationDate": "2021-07-26T08:16:50+00:00",
"initialLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"VersionTranslationInfo": {
"_media-type": "application/vnd.ez.api.VersionTranslationInfo+json",
"Language": [
{
"languageCode": "eng-GB"
}
]
},
"names": {
"value": [
{
"_languageC
/content/objects/{contentId}/versions
List versions ¶
GET /content/objects/{contentId}/versions
Returns a list of all versions of the Content item. This method does not include fields and relations in the version elements of the response.
Header parameters
Accept
If set, the version list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.VersionList+xml
application/vnd.ez.api.VersionList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user has no permission to read the versions. |
Types
| Type | Description |
|---|---|
| VersionList | List of all versions of the content. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<VersionList media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/61/versions">
<VersionItem>
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/61/versions/1"/>
<VersionInfo>
<id>521</id>
<versionNo>1</versionNo>
<status>PUBLISHED</status>
<modificationDate>2021-06-28T11:33:49+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2021-06-28T11:33:31+00:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB</languageCodes>
<VersionTranslationInfo media-type="application/vnd.ez.api.VersionTranslationInfo+xml">
<Language>
<languageCode>eng-GB</languageCode>
</Language>
</VersionTran
file_copy
{
"VersionList": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/61/versions",
"VersionItem": [
{
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/61/versions/1"
},
"VersionInfo": {
"id": 521,
"versionNo": 1,
"status": "PUBLISHED",
"modificationDate": "2021-06-28T11:33:49+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"creationDate": "2021-06-28T11:33:31+00:00",
"initialLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"VersionTranslationInfo": {
Load version ¶
GET /content/objects/{contentId}/versions/{versionNo}
Loads a specific version of a Content item. This method returns Fields and relations.
Header parameters
If-None-Match
Only return the version if the given ETag is the not current one, otherwise a 304 is returned.
| Property | Value |
|---|---|
| Type | string |
| Examples |
ETag
|
Accept
If set, the version list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Version+xml
application/vnd.ez.api.Version+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| fields | string | Fields which should be returned in the response. Comma separated list. |
| responseGroups | string | Alternative comma separated lists of predefined Field groups. |
| languages | string | Restricts the output of translatable Fields to the given languages. Comma separated list. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 304 |
Error - the ETag does not match the current one. |
| 401 |
Error - the user is not authorized to read this Content item. |
| 404 |
Error - the ID or version is not found. |
Types
| Type | Description |
|---|---|
| Version | Returns the VersionInfo for this version. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/61/versions/3">
<VersionInfo>
<id>581</id>
<versionNo>3</versionNo>
<status>DRAFT</status>
<modificationDate>2021-07-26T08:16:50+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2021-07-26T08:16:50+00:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB</languageCodes>
<VersionTranslationInfo media-type="application/vnd.ez.api.VersionTranslationInfo+xml">
<Language>
<languageCode>eng-GB</languageCode>
</Language>
</VersionTranslationInfo>
<names>
<value languageCode="eng-GB">Art1</value>
</names>
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objec
file_copy
{
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/61/versions/3",
"VersionInfo": {
"id": 581,
"versionNo": 3,
"status": "DRAFT",
"modificationDate": "2021-07-26T08:16:50+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"creationDate": "2021-07-26T08:16:50+00:00",
"initialLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"VersionTranslationInfo": {
"_media-type": "application/vnd.ez.api.VersionTranslationInfo+json",
"Language": [
{
"languageCode": "eng-GB"
}
]
},
"names": {
"value": [
{
"_languageC
Update version ¶
PATCH /content/objects/{contentId}/versions/{versionNo}
A specific draft is updated. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated version is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Version+xml
application/vnd.ez.api.Version+json
|
If-match
Performs the patch only if the specified ETag is the current one.
| Property | Value |
|---|---|
| Type | string |
Content-Type
The VersionUpdate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.VersionUpdate+xml
application/vnd.ez.api.VersionUpdate+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| languages | string | Restricts the output of translatable Fields to the given languages. Comma separated list. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to update this version. |
| 403 |
Error - the version is not allowed to change - i.e. version is not a DRAFT. |
| 404 |
Error - the content ID or version ID does not exist. |
| 412 |
Error - the current ETag does not match with the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| VersionUpdate | |
| Version | Returns the VersionInfo for this version. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<VersionUpdate xmlns:p="http://ez.no/API/Values"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ez.no/API/Values ../VersionUpdate.xsd ">
<modificationDate>2012-02-20T12:00:00</modificationDate>
<initialLanguageCode>ger-DE</initialLanguageCode>
<fields>
<field>
<id>1234</id>
<fieldDefinitionIdentifier>title</fieldDefinitionIdentifier>
<languageCode>ger-DE</languageCode>
<fieldValue>Neuer Titel</fieldValue>
</field>
<field>
<id>1235</id>
<fieldDefinitionIdentifier>summary</fieldDefinitionIdentifier>
<languageCode>ger-DE</languageCode>
<fieldValue>Dies ist eine neuse Zusammenfassungy</fieldValue>
</field>
</fields>
</VersionUpdate>
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Version href="/content/objects/23/versions/4" media-type="application/vnd.ez.api.Version+xml">
<VersionInfo>
<id>45</id>
<versionNo>4</versionNo>
<status>DRAFT</status>
<modificationDate>2012-02-20T12:00:00</modificationDate>
<Creator href="/user/users/44" media-type="application/vnd.ez.api.User+xml" />
<creationDate>22012-02-20T12:00:00</creationDate>
<initialLanguageCode>ger-DE</initialLanguageCode>
<names>
<value languageCode="ger-DE">Neuer Titel</value>
</names>
<Content href="/content/objects/23" media-type="application/vnd.ez.api.ContentInfo+xml" />
</VersionInfo>
<Fields>
<field>
<id>1234</id>
<fieldDefinitionIdentifier>title</fieldDefinitionIdentifier>
<languageCode>ger-DE</languageCode>
<fieldValue>Neuer Titel</fieldValue>
</field>
<field>
<id>1235</id>
<fieldDefinitionIdentifier>summary</fieldDefinitionIdentifier>
<languageCode>ger-
Create a draft from a version ¶
COPY /content/objects/{contentId}/versions/{versionNo}
The system creates a new draft as a copy of the given version. COPY or POST with header X-HTTP-Method-Override COPY.
Header parameters
Accept
If set, the updated version is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Version+xml
application/vnd.ez.api.Version+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Created. |
| 401 |
Error - the user is not authorized to update this Content item. |
| 404 |
Error - the Content item was not found. |
Types
| Type | Description |
|---|---|
| Version | Returns the VersionInfo for this version. |
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/61/versions/3">
<VersionInfo>
<id>582</id>
<versionNo>3</versionNo>
<status>DRAFT</status>
<modificationDate>2021-07-26T08:54:47+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2021-07-26T08:54:47+00:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB</languageCodes>
<VersionTranslationInfo media-type="application/vnd.ez.api.VersionTranslationInfo+xml">
<Language>
<languageCode>eng-GB</languageCode>
</Language>
</VersionTranslationInfo>
<names>
<value languageCode="eng-GB">Art1</value>
</names>
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objec
file_copy
{
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/61/versions/4",
"VersionInfo": {
"id": 583,
"versionNo": 4,
"status": "DRAFT",
"modificationDate": "2021-07-26T08:55:27+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"creationDate": "2021-07-26T08:55:27+00:00",
"initialLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"VersionTranslationInfo": {
"_media-type": "application/vnd.ez.api.VersionTranslationInfo+json",
"Language": [
{
"languageCode": "eng-GB"
}
]
},
"names": {
"value": [
{
"_languageC
Delete content version ¶
DELETE /content/objects/{contentId}/versions/{versionNo}
Deletes the content version.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - the version is deleted. |
| 404 |
Error - the Content item or version were not found. |
| 401 |
Error - the user is not authorized to delete this version. |
| 403 |
Error - the version is in published state. |
Publish a content version ¶
PUBLISH /content/objects/{contentId}/versions/{versionNo}
Publishes the content version. PUBLISH or POST with header X-HTTP-Method-Override PUBLISH
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - the content version is published. |
| 401 |
Error - the user is not authorized to publish this version. |
| 403 |
Error - the version is not a draft. |
| 404 |
Error - the Content item or version were not found. |
/content/objects/{contentId}/versions/{versionNo}/translations/{languageCode}
Delete translation from version draft ¶
DELETE /content/objects/{contentId}/versions/{versionNo}/translations/{languageCode}
Removes a translation from a version draft.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - removes a translation from a version draft. |
| 401 |
Error - the user is not authorized to delete this translation. |
| 403 |
Error - the version is not in draft state. |
| 404 |
Error - the Content item or version number were not found. |
| 406 |
Error - the given translation does not exist for the version. |
| 409 |
Error - the specified translation is the only one the version has or is the main translation. |
Load Relations of Content item version ¶
GET /content/objects/{contentId}/versions/{versionNo}/relations
Loads the Relations of the given version.
Header parameters
Accept
If set, the Relation is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RelationList+xml
application/vnd.ez.api.RelationList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| offset | integer | The offset of the result set. |
| limit | integer | The number of bookmarks returned. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to read this Content item. |
| 404 |
Error - the Content item was not found. |
Types
| Type | Description |
|---|---|
| RelationList | Class representing a list of relations between content. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/59/versions/1">
<VersionInfo>
<id>519</id>
<versionNo>1</versionNo>
<status>PUBLISHED</status>
<modificationDate>2021-06-28T11:33:01+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2021-06-28T11:32:39+00:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB</languageCodes>
<VersionTranslationInfo media-type="application/vnd.ez.api.VersionTranslationInfo+xml">
<Language>
<languageCode>eng-GB</languageCode>
</Language>
</VersionTranslationInfo>
<names>
<value languageCode="eng-GB">Art1</value>
</names>
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/o
file_copy
{
"Version": {
"_media-type": "application/vnd.ez.api.Version+json",
"_href": "/api/ezp/v2/content/objects/59/versions/1",
"VersionInfo": {
"id": 519,
"versionNo": 1,
"status": "PUBLISHED",
"modificationDate": "2021-06-28T11:33:01+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"creationDate": "2021-06-28T11:32:39+00:00",
"initialLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"VersionTranslationInfo": {
"_media-type": "application/vnd.ez.api.VersionTranslationInfo+json",
"Language": [
{
"languageCode": "eng-GB"
}
]
},
"names": {
"value": [
{
"_langu
Create new Relation ¶
POST /content/objects/{contentId}/versions/{versionNo}/relations
Creates a new Relation of type COMMON for the given draft.
Header parameters
Accept
If set, the updated version is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Relation+xml
application/vnd.ez.api.Relation+json
|
Content-Type
The RelationCreate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RelationCreate+xml
application/vnd.ez.api.RelationCreate+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Types
| Type | Description |
|---|---|
| Relation | Class representing a relation between content. |
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Relation media-type="application/vnd.ez.api.Relation+xml" href="/api/ezp/v2/content/objects/59/versions/2/relations/40">
<SourceContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/59"/>
<DestinationContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/59"/>
<RelationType>COMMON</RelationType>
</Relation>
file_copy
{
"Relation": {
"_media-type": "application/vnd.ez.api.Relation+json",
"_href": "/api/ezp/v2/content/objects/59/versions/2/relations/38",
"SourceContent": {
"_media-type": "application/vnd.ez.api.ContentInfo+json",
"_href": "/api/ezp/v2/content/objects/59"
},
"DestinationContent": {
"_media-type": "application/vnd.ez.api.ContentInfo+json",
"_href": "/api/ezp/v2/content/objects/59"
},
"RelationType": "COMMON"
}
}
Load Relation ¶
GET /content/objects/{contentId}/versions/{versionNo}/relations/{relationId}
Loads a Relation for the given Content item.
Header parameters
Accept
If set, the Relation is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Relation+xml
application/vnd.ez.api.Relation+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - loads a Relation for the given Content item. |
| body | |
| 401 |
Error - the user is not authorized to read this Content item. |
| 404 |
Error - the Content item with the given ID or the Relation does not exist. |
Delete Relation ¶
DELETE /content/objects/{contentId}/versions/{versionNo}/relations/{relationId}
Deletes a Relation of the given draft.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - deleted a Relation of the given draft. |
| 401 |
Error - the user is not authorized to delete this Relation. |
| 403 |
Error - the Relation is not of type COMMON or the given version is not a draft. |
| 404 |
Error - Content item or the Relation were not found in the given version. |
/content/objects/{contentId}/relations
Load Relations of Content item ¶
GET /content/objects/{contentId}/relations
Redirects to the Relations of the current version.
Possible responses
| Code | Description |
|---|---|
| 307 |
Temporary redirect. |
| 401 |
Error - the user is not authorized to read this Content item. |
| 404 |
Error - the Content item was not found. |
Create new Location for Content item ¶
POST /content/objects/{contentId}/locations
Creates a new Location for the given Content item.
Header parameters
Accept
If set, the new Location is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Location+xml
application/vnd.ez.api.Location+json
|
Content-Type
The LocationCreate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.LocationCreate+json
application/vnd.ez.api.LocationCreate+xml
|
Possible responses
| Code | Description |
|---|---|
| 201 | |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to create this Location. |
| 403 |
Error - a Location under the given parent ID already exists. |
Types
| Type | Description |
|---|---|
| LocationCreate | |
| Location | This class represents a Location in the Repository. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<LocationCreate>
<ParentLocation href="/api/ezp/v2/content/locations/1/42" />
<priority>0</priority>
<hidden>false</hidden>
<sortField>PATH</sortField>
<sortOrder>ASC</sortOrder>
</LocationCreate>
file_copy
{
"LocationCreate": {
"ParentLocation": {
"_href": "/api/ezp/v2/content/locations/1/59"
},
"priority": "0",
"hidden": false,
"sortField": "PATH",
"sortOrder": "ASC"
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/42/96">
<id>96</id>
<priority>0</priority>
<hidden>false</hidden>
<invisible>true</invisible>
<explicitlyHidden>false</explicitlyHidden>
<ParentLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/42"/>
<pathString>/1/2/42/96/</pathString>
<depth>3</depth>
<childCount>0</childCount>
<remoteId>58133c8c75230e5debe362a28b92d27a</remoteId>
<Children media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/2/42/96/children"/>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/63"/>
<sortField>PATH</sortField>
<sortOrder>ASC</sortOrder>
<UrlAliases media-type="application/vnd.ez.api.UrlAliasRefList+xml" href="/api/ezp/v2/content/locations/1/2/42/96/urlaliases"/>
<ContentInfo m
file_copy
{
"Location": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/59/114",
"id": 114,
"priority": 0,
"hidden": false,
"invisible": false,
"explicitlyHidden": false,
"ParentLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/59"
},
"pathString": "/1/2/59/114/",
"depth": 3,
"childCount": 0,
"remoteId": "47a1e4ee082fb64e93a822dcfe3a5614",
"Children": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/content/locations/1/2/59/114/children"
},
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/59"
},
"sortField": "PATH",
"sortOrder": "ASC",
"UrlAliases": {
Get Locations for Content item ¶
GET /content/objects/{contentId}/locations
Loads all Locations for the given Content item.
Header parameters
Accept
If set, the Location list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.LocationList+xml
application/vnd.ez.api.LocationList+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to read this Content item. |
| 404 |
Error - the Content item with the given ID does not exist. |
Types
| Type | Description |
|---|---|
| LocationList | This class represents a queried Location list holding a totalCount and a partial list of Locations (by offset/limit parameters and permission filters). |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<LocationList media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/63/locations">
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/57/65"/>
</LocationList>
file_copy
{
"LocationList": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/content/objects/63/locations",
"Location": [
{
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/57/65"
}
]
}
}
Get Object states of Content item ¶
GET /content/objects/{contentId}/objectstates
Returns the Object states of a Content item
Header parameters
Accept
If set, the Object states are returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentObjectStates+xml
application/vnd.ez.api.ContentObjectStates+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Object state. |
| 404 |
Error - The Content item does not exist. |
Types
| Type | Description |
|---|---|
| ContentObjectStates | Represents a list of object states. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentObjectStates media-type="application/vnd.ez.api.ContentObjectStates+xml">
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/2/objectstates/1"/>
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/3/objectstates/3"/>
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/7/objectstates/7"/>
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/8/objectstates/8"/>
</ContentObjectStates>
file_copy
{
"ContentObjectStates": {
"_media-type": "application/vnd.ez.api.ContentObjectStates+json",
"ObjectState": [
{
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/2/objectstates/1"
},
{
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/3/objectstates/3"
},
{
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/7/objectstates/7"
},
{
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/8/objectstates/8"
}
]
}
}
Set Object states of Content item ¶
PATCH /content/objects/{contentId}/objectstates
Updates Object states of a Content item. An Object state in the input overrides the state of the Object state group. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated Object state is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentObjectStates+xml
application/vnd.ez.api.ContentObjectStates+json
|
Content-Type
The Content item Object states input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentObjectStates+xml
application/vnd.ez.api.ContentObjectStates+json
|
If-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 204 |
OK - Object state updated. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to set an Object state. |
| 403 |
Error - The input contains multiple Object states of the same Object state group. |
| 412 |
Error - The current ETag does not match the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| ContentObjectStates | Represents a list of object states. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentObjectStates>
<ObjectState href="/api/ezp/v2/content/objectstategroups/2/objectstates/2"/>
</ContentObjectStates>
file_copy
{
"ContentObjectStates": {
"ObjectState": [
{
"_href": "/api/ezp/v2/content/objectstategroups/2/objectstates/2"
}
]
}
}
Code: 204
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentObjectStates media-type="application/vnd.ez.api.ContentObjectStates+xml">
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/2/objectstates/2"/>
</ContentObjectStates>
file_copy
{
"ContentObjectStates": {
"_media-type": "application\/vnd.ez.api.ContentObjectStates+json",
"ObjectState": [
{
"_media-type": "application\/vnd.ez.api.ObjectState+json",
"_href": "\/api\/ezp\/v2\/content\/objectstategroups\/2\/objectstates\/2"
}
]
}
}
/content/objects/{contentId}/hide
Hide Content item ¶
POST /content/objects/{contentId}/hide
Makes or keep the Content item invisible
Possible responses
| Code | Description |
|---|---|
| 204 |
OK - Object item is hidden. |
| 401 |
Error - The user has no permission to change Object item visibility. |
| 404 |
Error - The Content item was not found. |
/content/objects/{contentId}/reveal
Reveal Content item ¶
POST /content/objects/{contentId}/reveal
Makes or keep the Content item visible
Possible responses
| Code | Description |
|---|---|
| 204 |
OK - Object item is revealed. |
| 401 |
Error - The user has no permission to change Object item visibility. |
| 404 |
Error - The Content item was not found. |
/content/objectstategroups
List Object state groups ¶
GET /content/objectstategroups
Returns a list of all Object state groups.
Header parameters
Accept
If set, the Object state group list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateGroupList+xml
application/vnd.ez.api.ObjectStateGroupList+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns a list of Object state groups. |
| 401 |
Error - The user has no permission to read Object state groups. |
Types
| Type | Description |
|---|---|
| ObjectStateGroupList | List of Object state groups. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateGroupList media-type="application/vnd.ez.api.ObjectStateGroupList+xml" href="/api/ezp/v2/content/objectstategroups">
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/2">
<id>2</id>
<identifier>ez_lock</identifier>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<ObjectStates media-type="application/vnd.ez.api.ObjectStateList+xml" href="/api/ezp/v2/content/objectstategroups/2/objectstates"/>
<names>
<value languageCode="eng-GB">Lock</value>
</names>
<descriptions>
<value languageCode="eng-GB"></value>
</descriptions>
</ObjectStateGroup>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/3">
<id>3</id>
<identifier>accessibility</identifier>
file_copy
{
"ObjectStateGroupList": {
"_media-type": "application/vnd.ez.api.ObjectStateGroupList+json",
"_href": "/api/ezp/v2/content/objectstategroups",
"ObjectStateGroup": [
{
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/2",
"id": 2,
"identifier": "ez_lock",
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"ObjectStates": {
"_media-type": "application/vnd.ez.api.ObjectStateList+json",
"_href": "/api/ezp/v2/content/objectstategroups/2/objectstates"
},
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Lock"
}
]
},
"
Create Object state group ¶
POST /content/objectstategroups
Creates a new Object state group.
Header parameters
Accept
If set, the new Object state group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateGroup+xml
application/vnd.ez.api.ObjectStateGroup+json
|
Content-Type
The Object state group input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateGroupCreate+json
application/vnd.ez.api.ObjectStateGroupCreate+xml
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Object state group created. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to create an Object state group. |
| 403 |
Error - An Object state group with the same identifier already exists. |
Types
| Type | Description |
|---|---|
| ObjectStateGroupCreate | |
| ObjectStateGroup | This class represents an Object state group value. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateGroupCreate>
<identifier>custom</identifier>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<names>
<value languageCode="eng-GB">Custom State</value>
</names>
<descriptions>
<value languageCode="eng-GB">Custom Object state</value>
</descriptions>
</ObjectStateGroup>
file_copy
{
"ObjectStateGroup": {
"identifier": "custom-states",
"defaultLanguageCode": "eng-GB",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Custom State"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Custom Object state"
}
]
}
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/5">
<id>5</id>
<identifier>custom-states</identifier>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<ObjectStates media-type="application/vnd.ez.api.ObjectStateList+xml" href="/api/ezp/v2/content/objectstategroups/5/objectstates"/>
<names>
<value languageCode="eng-GB">Custom State</value>
</names>
<descriptions>
<value languageCode="eng-GB">Custom Object state</value>
</descriptions>
</ObjectStateGroup>
file_copy
{
"ObjectStateGroup": {
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/7",
"id": 7,
"identifier": "custom-states",
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"ObjectStates": {
"_media-type": "application/vnd.ez.api.ObjectStateList+json",
"_href": "/api/ezp/v2/content/objectstategroups/7/objectstates"
},
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Custom State"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Custom Object state"
}
]
}
}
}
Get Object state group ¶
GET /content/objectstategroups/{objectStateGroupId}
Returns the Object state group with the provided ID.
Header parameters
Accept
If set, the Object state group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateGroup+xml
application/vnd.ez.api.ObjectStateGroup+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Object state group. |
| 401 |
Error - The user is not authorized to read this Object state group. |
| 404 |
Error - The Object state group does not exist. |
Types
| Type | Description |
|---|---|
| ObjectStateGroup | This class represents an Object state group value. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/7">
<id>7</id>
<identifier>custom-states</identifier>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<ObjectStates media-type="application/vnd.ez.api.ObjectStateList+xml" href="/api/ezp/v2/content/objectstategroups/7/objectstates"/>
<names>
<value languageCode="eng-GB">Custom State</value>
</names>
<descriptions>
<value languageCode="eng-GB">Custom Object state</value>
</descriptions>
</ObjectStateGroup>
file_copy
{
"ObjectStateGroup": {
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/7",
"id": 7,
"identifier": "custom-states",
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"ObjectStates": {
"_media-type": "application/vnd.ez.api.ObjectStateList+json",
"_href": "/api/ezp/v2/content/objectstategroups/7/objectstates"
},
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Custom State"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Custom Object state"
}
]
}
}
}
Update Object state group ¶
PATCH /content/objectstategroups/{objectStateGroupId}
Updates an Object state group. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated Object state group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateGroup+xml
application/vnd.ez.api.ObjectStateGroup+json
|
Content-Type
The Object state group input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateGroupUpdate+json
application/vnd.ez.api.ObjectStateGroupUpdate+xml
|
If-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Object stated group updated. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to update an Object state group. |
| 403 |
Error - An Object state group with the provided identifier already exists. |
| 412 |
Error - The current ETag does not match the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| ObjectStateGroup | This class represents an Object state group value. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/7">
<id>7</id>
<identifier>custom-states</identifier>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<ObjectStates media-type="application/vnd.ez.api.ObjectStateList+xml" href="/api/ezp/v2/content/objectstategroups/7/objectstates"/>
<names>
<value languageCode="eng-GB">New Custom State name</value>
</names>
<descriptions>
<value languageCode="eng-GB">Custom Object state</value>
</descriptions>
</ObjectStateGroup>
file_copy
{
"ObjectStateGroup": {
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/7",
"id": 7,
"identifier": "custom-states",
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"ObjectStates": {
"_media-type": "application/vnd.ez.api.ObjectStateList+json",
"_href": "/api/ezp/v2/content/objectstategroups/7/objectstates"
},
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New Custom State name"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Custom Object state"
}
]
}
}
}
Delete Object state group ¶
DELETE /content/objectstategroups/{objectStateGroupId}
Deletes the given Object state group including Object states.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - Object state group deleted. |
| 401 |
Error - The user is not authorized to delete an Object state group. |
| 404 |
Error - The Object state group does not exist. |
List Object states ¶
GET /content/objectstategroups/{objectStateGroupId}/objectstates
Returns a list of all Object states of the given group.
Header parameters
Accept
If set, the Object state list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateList+xml
application/vnd.ez.api.ObjectStateList+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns a list of Object states. |
| 401 |
Error - The user has no permission to read Object states. |
Types
| Type | Description |
|---|---|
| ObjectStateList | List of Object states. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateList media-type="application/vnd.ez.api.ObjectStateList+xml" href="/api/ezp/v2/content/objectstategroups/2/objectstates">
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/2/objectstates/1">
<id>1</id>
<identifier>not_locked</identifier>
<priority>0</priority>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/2"/>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<names>
<value languageCode="eng-GB">Not locked</value>
</names>
<descriptions>
<value languageCode="eng-GB"></value>
</descriptions>
</ObjectState>
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/2/objectstates/2">
<id>2</id>
file_copy
{
"ObjectStateList": {
"_media-type": "application/vnd.ez.api.ObjectStateList+json",
"_href": "/api/ezp/v2/content/objectstategroups/2/objectstates",
"ObjectState": [
{
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/2/objectstates/1",
"id": 1,
"identifier": "not_locked",
"priority": 0,
"ObjectStateGroup": {
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/2"
},
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Not locked"
}
Create Object state ¶
POST /content/objectstategroups/{objectStateGroupId}/objectstates
Creates a new Object state.
Header parameters
Accept
If set, the new Object state is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectState+xml application/vnd.ez.api.ObjectState+json
|
Content-Type
The Object state input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateCreate+json
application/vnd.ez.api.ObjectStateCreate+xml
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Object state created. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to create an Object state. |
| 403 |
Error - An Object state with the same identifier already exists in the given group. |
Types
| Type | Description |
|---|---|
| ObjectStateCreate | |
| ObjectState | This class represents a Object state value. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateCreate>
<identifier>new-state</identifier>
<priority>1</priority>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<names>
<value languageCode="eng-GB">New State</value>
</names>
<descriptions>
<value languageCode="eng-GB">New Object State</value>
</descriptions>
</ObjectStateCreate>
file_copy
{
"ObjectStateCreate": {
"identifier": "new-state",
"priority": "1",
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New State"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New Object State"
}
]
}
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/7/objectstates/5">
<id>5</id>
<identifier>new-state</identifier>
<priority>0</priority>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/7"/>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<names>
<value languageCode="eng-GB">New State</value>
</names>
<descriptions>
<value languageCode="eng-GB">New Object State</value>
</descriptions>
</ObjectState>
file_copy
{
"ObjectState": {
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/7/objectstates/7",
"id": 7,
"identifier": "new-state",
"priority": 0,
"ObjectStateGroup": {
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/7"
},
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New State"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New Object State"
}
]
}
}
}
Get Object state ¶
GET /content/objectstategroups/{objectStateGroupId}/objectstates/{objectStateId}
Returns the Object state.
Header parameters
Accept
If set, the Object State is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectState+xml
application/vnd.ez.api.ObjectState+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Object state. |
| 401 |
Error - The user is not authorized to read this Object state. |
| 404 |
Error - The Object state does not exist. |
Types
| Type | Description |
|---|---|
| ObjectState | This class represents a Object state value. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/6/objectstates/2">
<id>2</id>
<identifier>locked</identifier>
<priority>1</priority>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/2"/>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<names>
<value languageCode="eng-GB">Locked</value>
</names>
<descriptions>
<value languageCode="eng-GB"></value>
</descriptions>
</ObjectState>
file_copy
{
"ObjectState": {
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/2/objectstates/2",
"id": 2,
"identifier": "locked",
"priority": 1,
"ObjectStateGroup": {
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/2"
},
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Locked"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": ""
}
]
}
}
}
Update Object state ¶
PATCH /content/objectstategroups/{objectStateGroupId}/objectstates/{objectStateId}
Updates an Object state. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated Object state is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectState+xml
application/vnd.ez.api.ObjectState+json
|
Content-Type
The Object state input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ObjectStateUpdate+json
application/vnd.ez.api.ObjectStateUpdate+xml
|
If-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Object State updated |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to update the Object state. |
| 403 |
Error - An Object state with the provided identifier already exists in this group. |
| 412 |
Error - The current ETag does not match the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| ObjectStateUpdate | |
| ObjectState | This class represents a Object state value. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectStateCreate>
<priority>3</priority>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<names>
<value languageCode="eng-GB">New Object State name</value>
</names>
</ObjectStateCreate>
file_copy
{
"ObjectStateGroup": {
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New Object State name"
}
]
}
}
}
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ObjectState media-type="application/vnd.ez.api.ObjectState+xml" href="/api/ezp/v2/content/objectstategroups/2/objectstates/2">
<id>2</id>
<identifier>locked</identifier>
<priority>1</priority>
<ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/2"/>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<names>
<value languageCode="eng-GB">New Object State name</value>
</names>
<descriptions>
<value languageCode="eng-GB"></value>
</descriptions>
</ObjectState>
file_copy
{
"ObjectState": {
"_media-type": "application/vnd.ez.api.ObjectState+json",
"_href": "/api/ezp/v2/content/objectstategroups/6/objectstates/9",
"id": 9,
"identifier": "closed",
"priority": 1,
"ObjectStateGroup": {
"_media-type": "application/vnd.ez.api.ObjectStateGroup+json",
"_href": "/api/ezp/v2/content/objectstategroups/6"
},
"defaultLanguageCode": "eng-GB",
"languageCodes": "eng-GB",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New Object State name"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": ""
}
]
}
}
}
Delete Object state ¶
DELETE /content/objectstategroups/{objectStateGroupId}/objectstates/{objectStateId}
Deletes provided Object state.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - Object state deleted. |
| 401 |
Error - The user is not authorized to delete an Object state. |
| 404 |
Error - The Object state does not exist. |
/content/locations
/content/locations
Load Locations by id/remoteId/urlAlias ¶
GET /content/locations
Loads the Location for a given ID (x), remote ID or URL alias.
Query parameters
| Property | Type | Value |
|---|---|---|
| id | string | The ID of the Location. If present, the Location with the given ID is returned. |
| remoteId | string | The remote ID of the Location. If present, the Location with the given remote ID is returned. |
| urlAlias | string | One of the URL aliases of the Location. If present, the Location with given URL Alias is returned. |
Possible responses
| Code | Description |
|---|---|
| 307 |
Temporary redirect to the main resource URL. |
| 200 | |
| 404 |
Error - the Location with the given ID (remote ID or URL Alias) does not exist. |
Types
| Type | Description |
|---|---|
| Location | This class represents a Location in the Repository. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/58">
<id>58</id>
<priority>0</priority>
<hidden>false</hidden>
<invisible>false</invisible>
<explicitlyHidden>false</explicitlyHidden>
<ParentLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2"/>
<pathString>/1/2/58/</pathString>
<depth>2</depth>
<childCount>3</childCount>
<remoteId>0cfe62f27753448d79aaa8acd8d01699</remoteId>
<Children media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/2/58/children"/>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/57"/>
<sortField>PATH</sortField>
<sortOrder>ASC</sortOrder>
<UrlAliases media-type="application/vnd.ez.api.UrlAliasRefList+xml" href="/api/ezp/v2/content/locations/1/2/58/urlaliases"/>
<ContentInfo media-type="app
file_copy
{
"Location": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/58",
"id": 58,
"priority": 0,
"hidden": false,
"invisible": false,
"explicitlyHidden": false,
"ParentLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2"
},
"pathString": "/1/2/58/",
"depth": 2,
"childCount": 3,
"remoteId": "0cfe62f27753448d79aaa8acd8d01699",
"Children": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/content/locations/1/2/58/children"
},
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/57"
},
"sortField": "PATH",
"sortOrder": "ASC",
"UrlAliases": {
"_media-type":
Load Location ¶
GET /content/locations/{path}
Loads the Location for the given path e.g. '/content/locations/1/2/61'.
Header parameters
Accept
If set, the new Location is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Location+xml
application/vnd.ez.api.Location+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to read this Location. |
| 404 |
Error - the Location with the given path does not exist. |
Types
| Type | Description |
|---|---|
| Location | This class represents a Location in the Repository. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/61">
<id>61</id>
<priority>0</priority>
<hidden>false</hidden>
<invisible>false</invisible>
<ParentLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2"/>
<pathString>/1/2/61/</pathString>
<depth>2</depth>
<childCount>0</childCount>
<remoteId>2cfa66027e3806b113d994c9c26d3a66</remoteId>
<Children media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/2/61/children"/>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/60"/>
<sortField>NAME</sortField>
<sortOrder>ASC</sortOrder>
<UrlAliases media-type="application/vnd.ez.api.UrlAliasRefList+xml" href="/api/ezp/v2/content/locations/1/2/61/urlaliases"/>
<ContentInfo media-type="application/vnd.ez.api.ContentInfo+xml" href="/api
file_copy
{
"Location": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/58",
"id": 58,
"priority": 0,
"hidden": false,
"invisible": false,
"explicitlyHidden": false,
"ParentLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2"
},
"pathString": "/1/2/58/",
"depth": 2,
"childCount": 3,
"remoteId": "0cfe62f27753448d79aaa8acd8d01699",
"Children": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/content/locations/1/2/58/children"
},
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/57"
},
"sortField": "PATH",
"sortOrder": "ASC",
"UrlAliases": {
"_media-type":
Move subtree ¶
MOVE /content/locations/{path}
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.
Header parameters
Destination
A parent Location resource to which the Location is moved e.g. '/api/ezp/v2/content/locations/1/63'.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 201 |
Created. If destination is '/api/ezp/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 |
No Content. If destination is '/api/ezp/v2/content/trash' and content still has other Locations (no trash item is created). |
| 401 |
Error - the user is not authorized to move this Location. |
| 404 |
Error - the Location with the given ID does not exist. |
Copy subtree ¶
COPY /content/locations/{path}
Copies the subtree to a different parent. COPY or POST with header X-HTTP-Method-Override COPY.
Header parameters
Destination
A parent Location resource to which the Location is moved e.g. '/api/ezp/v2/content/locations/1/63'.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 201 |
Created. Copied the subtree to a different parent. |
| 401 |
Error - the user is not authorized to move this Location. |
| 404 |
Error - the Location with the given ID does not exist. |
Delete subtree ¶
DELETE /content/locations/{path}
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.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - deleted. |
| 401 |
Error - the user is not authorized to delete this subtree. |
| 404 |
Error - the Location with the given ID does not exist. |
Update Location ¶
PATCH /content/locations/{path}
Updates the Location. This method can also be used to hide/reveal a Location via the hidden field in the LocationUpdate. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the Location is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Location+xml
application/vnd.ez.api.Location+json
|
Content-Type
The LocationUpdate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.LocationUpdate+xml
application/vnd.ez.api.LocationUpdate+json
|
If-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to update this Location. |
| 404 |
Error - the Location with the given ID does not exist. |
Types
| Type | Description |
|---|---|
| LocationUpdateStruct | This class is used for updating Location meta data. |
| Location | This class represents a Location in the Repository. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<LocationUpdate>
<priority>3</priority>
<hidden>true</hidden>
<remoteId>remoteId-qwert999</remoteId>
<sortField>CLASS</sortField>
<sortOrder>DESC</sortOrder>
</LocationUpdate>
file_copy
{
"LocationUpdate": {
"priority": "3",
"hidden": true,
"remoteId": "remoteId-qwert999",
"sortField": "NAME",
"sortOrder": "DESC"
}
}
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/58">
<id>58</id>
<priority>0</priority>
<hidden>false</hidden>
<invisible>false</invisible>
<explicitlyHidden>false</explicitlyHidden>
<ParentLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2"/>
<pathString>/1/2/58/</pathString>
<depth>2</depth>
<childCount>3</childCount>
<remoteId>0cfe62f27753448d79aaa8acd8d01699</remoteId>
<Children media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/2/58/children"/>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/57"/>
<sortField>PATH</sortField>
<sortOrder>ASC</sortOrder>
<UrlAliases media-type="application/vnd.ez.api.UrlAliasRefList+xml" href="/api/ezp/v2/content/locations/1/2/58/urlaliases"/>
<ContentInfo media-type="app
file_copy
{
"Location": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/59",
"id": 59,
"priority": 3,
"hidden": true,
"invisible": true,
"explicitlyHidden": true,
"ParentLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2"
},
"pathString": "/1/2/59/",
"depth": 2,
"childCount": 5,
"remoteId": "remoteId-qwert999",
"Children": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/content/locations/1/2/59/children"
},
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/58"
},
"sortField": "NAME",
"sortOrder": "DESC",
"UrlAliases": {
"_media-type": "application/vnd.
Swap Location ¶
SWAP /content/locations/{path}
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.
Header parameters
Destination
A parent Location resource to which the Location is moved e.g. '/api/ezp/v2/content/locations/1/63'.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content. Swapped the Location of a Content item with the given Location of another Content item. |
| 401 |
Error - the user is not authorized to swap this Location. |
| 404 |
Error - the Location with the given ID does not exist. |
/content/locations/{path}/children
Get child Locations. ¶
GET /content/locations/{path}/children
Loads all child Locations for the given parent Location.
Header parameters
Accept
If set, the new Location list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.LocationList+xml
application/vnd.ez.api.LocationList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| offset | integer | The offset of the result set. |
| limit | integer | The number of Locations returned. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to read this Content item. |
| 404 |
Error - the Content item with the given ID does not exist. |
Types
| Type | Description |
|---|---|
| LocationList | This class represents a queried Location list holding a totalCount and a partial list of Locations (by offset/limit parameters and permission filters). |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<LocationList media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/63/children">
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/63/60"/>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/63/61"/>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/63/62"/>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/63/67"/>
</LocationList>
/content/locations/{path}/urlaliases
List URL aliases for Location ¶
GET /content/locations/{path}/urlaliases
Returns the list of URL aliases for a Location.
Header parameters
Accept
If set, the URL alias list contains only references and is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlAliasRefList+xml
application/vnd.ez.api.UrlAliasRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| custom | boolean | Indicates whether autogenerated (false) or manual URL aliases (true) should be returned (default true). |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the list of URL aliases. |
| 400 |
Error - The user has no permission to read URL aliases. |
| 401 |
Error - The Location was not found. |
Types
| Type | Description |
|---|---|
| UrlAliasRefList | List of URL alias in the Repository. |
/content/views
/content/views
Create View ¶
POST /content/views
Executes a query and returns View including the results. The View input reflects the criteria model of the public PHP API. Will respond with a 301, as the resource has been moved to /views (Platform 1.0) - DEPRECATED.
Header parameters
Accept
The View in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.View+xml
application/vnd.ez.api.View+json
application/vnd.ez.api.View+xml; version=1.1
application/vnd.ez.api.View+json; version=1.1
|
Content-Type
The View input in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ViewInput+xml
application/vnd.ez.api.ViewInput+json
application/vnd.ez.api.ViewInput+xml; version=1.1
application/vnd.ez.api.ViewInput+json; version=1.1
|
Possible responses
| Code | Description |
|---|---|
| 301 |
Moved permanently. |
| 400 |
Error - the input does not match the input schema definition. |
/content/sections
Create new Section ¶
POST /content/sections
Creates a new Section.
Header parameters
Accept
If set, the new Section is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Section+xml
application/vnd.ez.api.Section+json
|
Content-Type
The Section input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.SectionInput+json
application/vnd.ez.api.SectionInput+xml
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Types
| Type | Description |
|---|---|
| SectionInput | |
| Section | This class represents a Section. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<SectionInput>
<identifier>restricted</identifier>
<name>Restricted</name>
</SectionInput>
file_copy
{
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/13",
"sectionId": 13,
"identifier": "restricted",
"name": "Restricted"
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/7">
<sectionId>7</sectionId>
<identifier>restricted</identifier>
<name>Restricted</name>
</Section>
file_copy
{
"SectionInput": {
"identifier": "restricted",
"name": "Restricted"
}
}
Get Sections ¶
GET /content/sections
Returns a list of all Sections.
Header parameters
Accept
If set, the Section list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.SectionList+xml
application/vnd.ez.api.SectionList+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Query parameters
| Property | Type | Value |
|---|---|---|
| identifer | string | Only the Section with the given identifier is returned. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - The user has no permission to read the Section. |
Types
| Type | Description |
|---|---|
| SectionList | This class represents a Section list. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<SectionList media-type="application/vnd.ez.api.SectionList+xml" href="/api/ezp/v2/content/sections">
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/1">
<sectionId>1</sectionId>
<identifier>standard</identifier>
<name>Standard</name>
</Section>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2">
<sectionId>2</sectionId>
<identifier>users</identifier>
<name>Users</name>
</Section>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/3">
<sectionId>3</sectionId>
<identifier>media</identifier>
<name>Media</name>
</Section>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/6">
<sectionId>6</sectionId>
<identifier>form</identifier>
<name>Form</name>
</Section>
file_copy
{
"SectionList": {
"_media-type": "application/vnd.ez.api.SectionList+json",
"_href": "/api/ezp/v2/content/sections",
"Section": [
{
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/1",
"sectionId": 1,
"identifier": "standard",
"name": "Standard"
},
{
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2",
"sectionId": 2,
"identifier": "users",
"name": "Users"
},
{
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/3",
"sectionId": 3,
"identifier": "media",
"name": "Media"
},
{
"_media-type": "applic
Get Section ¶
GET /content/sections/{sectionId}
Returns the Section by given Section ID.
Header parameters
Accept
If set, the Section is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Section+xml
application/vnd.ez.api.Section+json
|
If-None-match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - The user is not authorized to read this Section. |
| 404 |
Error - The Section does not exist. |
Types
| Type | Description |
|---|---|
| Section | This class represents a Section. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/5">
<sectionId>10</sectionId>
<identifier>design</identifier>
<name>Design</name>
</Section>
file_copy
{
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/10",
"sectionId": 10,
"identifier": "design",
"name": "Design"
}
}
Update a Section ¶
PATCH /content/sections/{sectionId}
Updates a Section. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated Section is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Section+xml
application/vnd.ez.api.Section+json
|
Content-Type
The Section input schema encoded in XML or JSON.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.SectionInput+xml
application/vnd.ez.api.SectionInput+json
|
If-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Section updated. |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to create this Section. |
| 403 |
Error - a Section with the given identifier already exists. |
| 412 |
Error - the current ETag does not match with the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| SectionInput | |
| Section | This class represents a Section. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/7">
<sectionId>7</sectionId>
<identifier>template</identifier>
<name>Template</name>
</Section>
file_copy
{
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/7",
"sectionId": 7,
"identifier": "template",
"name": "Template"
}
}
Delete Section ¶
DELETE /content/sections/{sectionId}
The given Section is deleted.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - given Section is deleted. |
| 401 |
Error - the user is not authorized to delete this Section. |
| 404 |
Error - the Section does not exist. |
/content/trash
List Trash items ¶
GET /content/trash
Returns a list of all items in the Trash.
Header parameters
Accept
If set, the Trash item list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Trash+xml
application/vnd.ez.api.Trash+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| limit | string | Only limit. Items will be returned, starting with the offset. |
| offset | string | Offset of the result set. |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the list of items in the Trash. |
| 401 |
Error - The user has no permission to read the Trash. |
Types
| Type | Description |
|---|---|
| Trash |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Trash media-type="application/vnd.ez.api.Trash+xml" href="/api/ezp/v2/content/trash">
<TrashItem media-type="application/vnd.ez.api.TrashItem+xml" href="/api/ezp/v2/content/trash/58">
<id>58</id>
<priority>0</priority>
<hidden>false</hidden>
<invisible>false</invisible>
<ParentLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/56"/>
<pathString>/1/2/56/58/</pathString>
<depth>3</depth>
<childCount>0</childCount>
<remoteId>59800915ad2eb8514de0bebe84f6ccba</remoteId>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/52"/>
<sortField>PATH</sortField>
<sortOrder>ASC</sortOrder>
<ContentInfo media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/52">
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="
file_copy
{
"Trash": {
"_media-type": "application/vnd.ez.api.Trash+json",
"_href": "/api/ezp/v2/content/trash",
"TrashItem": [
{
"_media-type": "application/vnd.ez.api.TrashItem+json",
"_href": "/api/ezp/v2/content/trash/87",
"id": 87,
"priority": 0,
"hidden": false,
"invisible": false,
"ParentLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/57"
},
"pathString": "/1/2/57/87/",
"depth": 3,
"childCount": 0,
"remoteId": "7cc6565354858f39a794bf64aa2c2761",
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/91"
},
"sortField": "PAT
Empty Trash ¶
DELETE /content/trash
Empties the Trash.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - Trash emptied. |
| 401 |
Error - The user is not authorized to empty all items from Trash. |
Get Trash item ¶
GET /content/trash/{trashItemId}
Returns the item in Trash with the provided ID.
Header parameters
Accept
If set, the item in Trash is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.TrashItem+xml
application/vnd.ez.api.TrashItem+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - The user has no permission to read the item in Trash. |
| 404 |
Error - An item in Trash with the provided ID does not exist. |
Types
| Type | Description |
|---|---|
| TrashItem | This class represents a trash item, which is actually a trashed Location. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<TrashItem media-type="application/vnd.ez.api.TrashItem+xml" href="/api/ezp/v2/content/trash/81">
<id>81</id>
<priority>0</priority>
<hidden>false</hidden>
<invisible>false</invisible>
<ParentLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/42"/>
<pathString>/1/2/42/81/</pathString>
<depth>3</depth>
<childCount>0</childCount>
<remoteId>135e8a84b61848a67be36e9552d2724d</remoteId>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/99"/>
<sortField>PATH</sortField>
<sortOrder>ASC</sortOrder>
<ContentInfo media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/99">
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/99" remoteId="ae2b4568c0d2e7a4a9bca9495e73591a" id="99">
<ContentType media-type="application/vnd.ez.api.Co
file_copy
{
"TrashItem": {
"_media-type": "application/vnd.ez.api.TrashItem+json",
"_href": "/api/ezp/v2/content/trash/87",
"id": 87,
"priority": 0,
"hidden": false,
"invisible": false,
"ParentLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/2/57"
},
"pathString": "/1/2/57/87/",
"depth": 3,
"childCount": 0,
"remoteId": "7cc6565354858f39a794bf64aa2c2761",
"Content": {
"_media-type": "application/vnd.ez.api.Content+json",
"_href": "/api/ezp/v2/content/objects/91"
},
"sortField": "PATH",
"sortOrder": "ASC",
"ContentInfo": {
"_media-type": "application/vnd.ez.api.ContentInfo+json",
"_href": "/api/ezp/v2/content/objects/91",
"Content": {
"_media-type": "application/vnd.ez.api.ContentInfo+json",
Untrash Content item ¶
MOVE /content/trash/{trashItemId}
Restores an item from Trash. MOVE or POST with header X-HTTP-Method-Override MOVE.
Header parameters
Destination
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.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 201 |
Item restored. |
| 401 |
Error - The user is not authorized to restore this item from Trash. |
| 403 |
Error - The provided parent Location does not exist. |
| 404 |
Error - The provided item does not exist in Trash. |
Delete Trash item ¶
DELETE /content/trash/{trashItemId}
Deletes the provided item from Trash.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - item deleted. |
| 401 |
Error - The user is not authorized to delete the provided item. |
| 404 |
Error - The provided item does not exist in Trash. |
/content/urlaliases
List global URL aliases ¶
GET /content/urlaliases
Returns the list of global URL aliases.
Header parameters
Accept
If set, the URL alias list contains only references and is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlAliasRefList+xml
application/vnd.ez.api.UrlAliasRefList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the list of URL aliases. |
| 401 |
Error - The user has no permission to read URL aliases. |
Types
| Type | Description |
|---|---|
| UrlAliasRefList | List of URL alias in the Repository. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlAliasRefList media-type="application/vnd.ez.api.UrlAliasRefList+xml" href="/api/ezp/v2/content/urlaliases">
<UrlAlias media-type="application/vnd.ez.api.UrlAlias+xml" href="/api/ezp/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36" />
</UrlAliasRefList>
file_copy
{
"UrlAliasRefList": {
"_media-type": "application/vnd.ez.api.UrlAliasRefList+json",
"_href": "/api/ezp/v2/content/urlaliases",
"UrlAlias": [
{
"_media-type": "application/vnd.ez.api.UrlAlias+json",
"_href": "/api/ezp/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36"
}
]
}
}
Create URL alias ¶
POST /content/urlaliases
Creates a URL alias.
Header parameters
Accept
If set, the created URL alias is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlAlias+xml
application/vnd.ez.api.UrlAlias+json
|
Content-Type
The URL alias input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlAliasCreate+xml
application/vnd.ez.api.UrlAliasCreate+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
URL alias created. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to create a URL alias. |
| 403 |
Error - A URL alias with the same identifier already exists. |
Types
| Type | Description |
|---|---|
| UrlAliasCreate | |
| UrlAlias | This class represents a URL alias in the Repository. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlAliasCreate type="LOCATION">
<location href='/api/ezp/v2/content/locations/1/2/59' />
<path>example-global</path>
<languageCode>eng-GB</languageCode>
<alwaysAvailable>true</alwaysAvailable>
<forward>true</forward>
</UrlAliasCreate>
file_copy
{
"UrlAliasCreate": {
"_type": "GLOBAL",
"resource": "module:content/view/full",
"path": "example-global",
"languageCode": "eng-GB",
"alwaysAvailable": "true",
"forward": "true"
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlAlias media-type="application/vnd.ez.api.UrlAlias+xml" href="/api/ezp/v2/content/urlaliases/0-deca3dadca45c3dff7861274b8e67ed7" id="0-deca3dadca45c3dff7861274b8e67ed7" type="LOCATION">
<location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/59"/>
<path>/example-urlalias</path>
<languageCodes>eng-GB</languageCodes>
<alwaysAvailable>true</alwaysAvailable>
<isHistory>false</isHistory>
<forward>true</forward>
<custom>true</custom>
</UrlAlias>
file_copy
{
"UrlAlias": {
"_media-type": "application/vnd.ez.api.UrlAlias+json",
"_href": "/api/ezp/v2/content/urlaliases/0-f530173ad554787c1fe30dc929d98360",
"_id": "0-f530173ad554787c1fe30dc929d98360",
"_type": "RESOURCE",
"resource": "content/view/full",
"path": "/example-global",
"languageCodes": "eng-GB",
"alwaysAvailable": true,
"isHistory": false,
"forward": true,
"custom": true
}
}
Get URL alias ¶
GET /content/urlaliases/{urlAliasId}
Returns the URL alias with the given ID.
Header parameters
Accept
If set, the URL alias is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlAlias+xml
application/vnd.ez.api.UrlAlias+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the URL alias. |
| 401 |
Error - The user is not authorized to read URL aliases. |
| 404 |
Error - The URL alias does not exist. |
Types
| Type | Description |
|---|---|
| UrlAlias | This class represents a URL alias in the Repository. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlAlias media-type="application/vnd.ez.api.UrlAlias+xml" href="/api/ezp/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36" id="0-2cecdff5f90b8595d76b68c417b09f36" type="RESOURCE">
<resource>content/view/full</resource>
<path>/example-global</path>
<languageCodes>eng-GB</languageCodes>
<alwaysAvailable>true</alwaysAvailable>
<isHistory>false</isHistory>
<forward>true</forward>
<custom>true</custom>
</UrlAlias>
file_copy
{
"UrlAlias": {
"_media-type": "application/vnd.ez.api.UrlAlias+json",
"_href": "/api/ezp/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36",
"_id": "0-2cecdff5f90b8595d76b68c417b09f36",
"_type": "RESOURCE",
"resource": "content/view/full",
"path": "/example-global",
"languageCodes": "eng-GB",
"alwaysAvailable": true,
"isHistory": false,
"forward": true,
"custom": true
}
}
Delete URL alias ¶
DELETE /content/urlaliases/{urlAliasId}
Deletes the provided URL alias.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - URL alias deleted. |
| 401 |
Error - The user is not authorized to delete a URL alias. |
| 404 |
Error - The URL alias does not exist. |
/content/urlwildcards
List URL wildcards ¶
GET /content/urlwildcards
Returns a list of URL wildcards.
Header parameters
Accept
If set, the URL wildcard is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlWildcardList+xml
application/vnd.ez.api.UrlWildcardList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns a list of URL wildcards. |
| 401 |
Error - The user has no permission to read URL wildcards. |
Types
| Type | Description |
|---|---|
| UrlWildcardList | List of URL alias in the Repository. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlWildcardList media-type="application/vnd.ez.api.UrlWildcardList+xml" href="/api/ezp/v2/content/urlwildcards">
<UrlWildcard media-type="application/vnd.ez.api.UrlWildcard+xml" href="/api/ezp/v2/content/urlwildcards/1" id="1">
<sourceUrl>/api/ezp/v2/content/location/2</sourceUrl>
<destinationUrl>/api/ezp/v2/content/location/59</destinationUrl>
<forward>true</forward>
</UrlWildcard>
</UrlWildcardList>
file_copy
{
"UrlWildcardList": {
"_media-type": "application/vnd.ez.api.UrlWildcardList+json",
"_href": "/api/ezp/v2/content/urlwildcards",
"UrlWildcard": [
{
"_media-type": "application/vnd.ez.api.UrlWildcard+json",
"_href": "/api/ezp/v2/content/urlwildcards/1",
"_id": 1,
"sourceUrl": "/api/ezp/v2/content/location/2",
"destinationUrl": "/api/ezp/v2/content/location/59",
"forward": true
}
]
}
}
Create URL wildcard ¶
POST /content/urlwildcards
Creates a new URL wildcard.
Header parameters
Accept
If set, the new URL wildcard is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlWildcard+xml
application/vnd.ez.api.UrlWildcard+json
|
Content-Type
The URL Wildcard input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlWildcardCreate+xml
application/vnd.ez.api.UrlWildcardCreate+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
URL wildcard created. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to create a URL wildcard. |
| 403 |
Error - A URL wildcard with the same identifier already exists. |
Types
| Type | Description |
|---|---|
| UrlWildcardCreate | |
| UrlWildcard | This class represents a URL alias in the Repository. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlWildcardCreate>
<sourceUrl>/api/ezp/v2/content/location/2</sourceUrl>
<destinationUrl>/api/ezp/v2/content/location/59</destinationUrl>
<forward>true</forward>
</UrlWildcardCreate>
file_copy
{
"UrlWildCardCreate": {
"sourceUrl": "/api/ezp/v2/content/location/2",
"destinationUrl": "/api/ezp/v2/content/location/59",
"forward": true
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlWildcard media-type="application/vnd.ez.api.UrlWildcard+xml" href="/api/ezp/v2/content/urlwildcards/1" id="1">
<sourceUrl>/api/ezp/v2/content/location/2</sourceUrl>
<destinationUrl>/api/ezp/v2/content/location/59</destinationUrl>
<forward>true</forward>
</UrlWildcard>
file_copy
{
"UrlWildcard": {
"_media-type": "application/vnd.ez.api.UrlWildcard+json",
"_href": "/api/ezp/v2/content/urlwildcards/6",
"_id": 6,
"sourceUrl": "/api/ezp/v2/content/location/2",
"destinationUrl": "/api/ezp/v2/content/location/59",
"forward": true
}
}
Get URL wildcard ¶
GET /content/urlwildcards/{wildcardId}
Returns the URL wildcard with the given ID.
Header parameters
Accept
If set, the URL wildcard is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UrlWildcard+xml
application/vnd.ez.api.UrlWildcard+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the URL wildcard. |
| 401 |
Error - The user is not authorized to read URL wildcards. |
| 404 |
Error - The URL wildcard does not exist. |
Types
| Type | Description |
|---|---|
| UrlWildcard | This class represents a URL alias in the Repository. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UrlWildcard media-type="application/vnd.ez.api.UrlWildcard+xml" href="/api/ezp/v2/content/urlwildcards/4" id="4">
<sourceUrl>/api/ezp/v2/content/location/2</sourceUrl>
<destinationUrl>/api/ezp/v2/content/location/59</destinationUrl>
<forward>true</forward>
</UrlWildcard>
file_copy
{
"UrlWildcard": {
"_media-type": "application/vnd.ez.api.UrlWildcard+json",
"_href": "/api/ezp/v2/content/urlwildcards/4",
"_id": 4,
"sourceUrl": "/api/ezp/v2/content/location/2",
"destinationUrl": "/api/ezp/v2/content/location/59",
"forward": true
}
}
Delete URL wildcard ¶
DELETE /content/urlwildcards/{wildcardId}
Deletes the given URL wildcard.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - URL wildcard deleted. |
| 401 |
Error - The user is not authorized to delete a URL wildcard. |
| 404 |
Error - The URL wildcard does not exist. |
/content/typegroups
Get Content Type groups ¶
GET /content/typegroups
Returns a list of all Content Type groups. If an identifier is provided, loads the Content Type group for this identifier.
Header parameters
Accept
If set, the Content Type group list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroupList+xml
application/vnd.ez.api.ContentTypeGroupList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| identifier | string | The identifier of the Content Type group. If present, the Content Type group with this identifier is returned. |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns a list of Content Type groups. |
| 307 |
Temporary redirect. |
| 401 |
Error - The user has no permission to read Content Types. |
| 404 |
Error - The Content Type group with the given identifier does not exist. |
Types
| Type | Description |
|---|---|
| ContentTypeGroupList | List of Content Type groups. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeGroupList media-type="application/vnd.ez.api.ContentTypeGroupList+xml" href="/api/ezp/v2/content/typegroups">
<ContentTypeGroup media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/1">
<id>1</id>
<identifier>Content</identifier>
<created>2002-09-05T11:08:48+02:00</created>
<modified>2002-10-06T18:35:06+02:00</modified>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<ContentTypes media-type="application/vnd.ez.api.ContentTypeInfoList+xml" href="/api/ezp/v2/content/typegroups/1/types"/>
</ContentTypeGroup>
<ContentTypeGroup media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/2">
<id>2</id>
<identifier>Users</identifier>
<created>2002-09
file_copy
{
"ContentTypeGroupList": {
"_media-type": "application/vnd.ez.api.ContentTypeGroupList+json",
"_href": "/api/ezp/v2/content/typegroups",
"ContentTypeGroup": [
{
"_media-type": "application/vnd.ez.api.ContentTypeGroup+json",
"_href": "/api/ezp/v2/content/typegroups/1",
"id": 1,
"identifier": "Content",
"created": "2002-09-05T09:08:48+00:00",
"modified": "2002-10-06T16:35:06+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"Modifier": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"ContentTypes": {
"_media-type": "application/vnd.ez.api.ContentTypeInfoList+json",
Create Content Type group ¶
POST /content/typegroups
Creates a new Content Type group.
Header parameters
Accept
If set, the new Content Type group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroup+xml
application/vnd.ez.api.ContentTypeGroup+json
|
Content-Type
The Content Type group input schema encoded in XML or JSON.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroupInput+xml
application/vnd.ez.api.ContentTypeGroupInput+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Content Type group created. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to create this Content Type group. |
| 403 |
Error - A Content Type group with the same identifier already exists. |
Types
| Type | Description |
|---|---|
| ContentTypeGroupInput | |
| ContentTypeGroup | This class represents a Content Type group value. |
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeGroup href="/content/typesgroups/7" media-type="application/vnd.ez.api.ContentTypeGroup+xml">
<id>7</id>
<identifier>newContentTypeGroup</identifier>
<created>2012-02-31T12:45:00</created>
<modified>2012-02-31T12:45:00</modified>
<Creator href="/user/users/13" media-type="application/vnd.ez.api.User+xml"/>
<Modifier href="/user/users/13" media-type="application/vnd.ez.api.User+xml"/>
<ContentTypes href="/content/typegroups/7/types" media-type="application/vnd.ez.api.ContentTypeList+xml"/>
</ContentTypeGroup>
file_copy
{
"ContentTypeGroup": {
"_media-type": "application/vnd.ez.api.ContentTypeGroup+json",
"_href": "/api/ezp/v2/content/typegroups/6",
"id": 6,
"identifier": "newContentTypeGroup",
"created": "2021-08-11T09:44:18+00:00",
"modified": "2021-08-11T09:44:18+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"Modifier": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"ContentTypes": {
"_media-type": "application/vnd.ez.api.ContentTypeInfoList+json",
"_href": "/api/ezp/v2/content/typegroups/6/types"
}
}
}
Get Content Type group ¶
GET /content/typegroups/{contentTypeGroupId}
Returns the Content Type group with provided ID.
Header parameters
Accept
If set, the Content Type group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroup+xml
application/vnd.ez.api.ContentTypeGroup+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Content Type group. |
| 401 |
Error - The user is not authorized to read this Content Type group. |
| 404 |
Error - The Content Type group does not exist. |
Types
| Type | Description |
|---|---|
| ContentTypeGroup | This class represents a Content Type group value. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeList media-type="application/vnd.ez.api.ContentTypeList+xml" href="/api/ezp/v2/content/typegroups/1/types">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2">
<id>2</id>
<status>DEFINED</status>
<identifier>article</identifier>
<names>
<value languageCode="eng-GB">Article</value>
</names>
<descriptions>
<value languageCode="eng-GB"></value>
</descriptions>
<creationDate>2002-06-18T09:21:38+00:00</creationDate>
<modificationDate>2021-06-28T11:31:22+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/2/groups"/>
<Draft media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2/d
file_copy
{
"ContentTypeList": {
"_media-type": "application/vnd.ez.api.ContentTypeList+json",
"_href": "/api/ezp/v2/content/typegroups/1/types",
"ContentType": [
{
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/2",
"id": 2,
"status": "DEFINED",
"identifier": "article",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Article"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": null
}
]
},
"creationDate": "2002-06-18T09:21:38+00:00",
Update Content Type group ¶
PATCH /content/typegroups/{contentTypeGroupId}
Updates a Content Type group. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated Content Type group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroup+xml
application/vnd.ez.api.ContentTypeGroup+json
|
Content-Type
The Content Type group input schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroupInput+xml
application/vnd.ez.api.ContentTypeGroupInput+json
|
If-Match
ETag causes patching only if the specified ETag is the current one. Otherwise a 412 is returned.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
Content Type group updated. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to create this Content Type group. |
| 403 |
Error - A Content Type group with the given identifier already exists. |
| 412 |
Error - The current ETag does not match the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| ContentTypeGroupInput | |
| ContentTypeGroup | This class represents a Content Type group value. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeGroup media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/1">
<id>4</id>
<identifier>updatedIdentifer</identifier>
<created>2002-09-05T11:08:48+02:00</created>
<modified>2019-02-22T14:42:55+01:00</modified>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<ContentTypes media-type="application/vnd.ez.api.ContentTypeInfoList+xml" href="/api/ezp/v2/content/typegroups/1/types"/>
</ContentTypeGroup>
file_copy
{
"ContentTypeGroup": {
"_media-type": "application/vnd.ez.api.ContentTypeGroup+json",
"_href": "/api/ezp/v2/content/typegroups/4",
"id": 4,
"identifier": "updatedIdentifer",
"created": "2021-08-11T09:44:18+00:00",
"modified": "2021-08-11T10:10:04+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"Modifier": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"ContentTypes": {
"_media-type": "application/vnd.ez.api.ContentTypeInfoList+json",
"_href": "/api/ezp/v2/content/typegroups/6/types"
}
}
}
Delete Content Type group ¶
DELETE /content/typegroups/{contentTypeGroupId}
Deletes the provided Content Type group.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - Content Type group deleted. |
| 401 |
Error - The user is not authorized to delete this Content Type group. |
| 403 |
Error - The Content Type group is not empty. |
| 404 |
Error - The Content Type group does not exist. |
List Content Types for group ¶
GET /content/typegroups/{contentTypeGroupId}/types
Returns a list of Content Types in the provided group.
Header parameters
Accept
If set, the list of Content Type info objects or Content Types (including Field definitions) is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeInfoList+xml
application/vnd.ez.api.ContentTypeInfoList+json
application/vnd.ez.api.ContentTypeList+xml
application/vnd.ez.api.ContentTypeList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns a list on Content Types. |
| 401 |
Error - The user has no permission to read the Content Types. |
Types
| Type | Description |
|---|---|
| ContentTypeInfoList | List of Content Type information. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeInfoList media-type="application/vnd.ez.api.ContentTypeInfoList+xml" href="/api/ezp/v2/content/typegroups/1/types">
<ContentTypeInfo media-type="application/vnd.ez.api.ContentTypeInfo+xml" href="/api/ezp/v2/content/types/2">
<id>2</id>
<status>DEFINED</status>
<identifier>article</identifier>
<names>
<value languageCode="eng-GB">Article</value>
</names>
<descriptions/>
<creationDate>2002-06-18T11:21:38+02:00</creationDate>
<modificationDate>2004-04-20T11:56:29+02:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/2/groups"/>
<Draft media-type="application/vnd.ez.api.ContentTyp
file_copy
{
"ContentTypeList": {
"_media-type": "application/vnd.ez.api.ContentTypeList+json",
"_href": "/api/ezp/v2/content/types",
"ContentType": [
{
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/2",
"id": 2,
"status": "DEFINED",
"identifier": "article",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Article"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": null
}
]
},
"creationDate": "2002-06-18T09:21:38+00:00",
Create Content Type ¶
POST /content/typegroups/{contentTypeGroupId}/types
Creates a new Content Type draft in the given Content Type group.
Header parameters
Accept
If set, the new Content Type or draft is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentType+xml
application/vnd.ez.api.ContentType+json
|
Content-Type
The Content Type Create schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeCreate+xml
application/vnd.ez.api.ContentTypeCreate+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| publish | boolean | If true, the Content Type is published after creating (default false). |
Possible responses
| Code | Description |
|---|---|
| 201 |
Content Type created. |
| 400 |
Error - The input does not match the input schema definition. Validation on a Field definition fails. Validation of the Content Type fails, e.g. multiple Fields of a same singular Field Type are provided. Publish is set to true and the input is not complete e.g. no Field definitions are provided. |
| 401 |
Error - The user is not authorized to create this Content Type. |
| 403 |
Error - A Content Type with same identifier already exists. |
Types
| Type | Description |
|---|---|
| ContentTypeCreate | |
| ContentType |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeCreate>
<identifier>newContentType</identifier>
<names>
<value languageCode="eng-US">New Content Type</value>
</names>
<descriptions>
<value languageCode="eng-US">This is a description</value>
</descriptions>
<remoteId>remoteId-qwert548</remoteId>
<urlAliasSchema><title></urlAliasSchema>
<nameSchema><title></nameSchema>
<isContainer>true</isContainer>
<mainLanguageCode>eng-US</mainLanguageCode>
<defaultAlwaysAvailable>true</defaultAlwaysAvailable>
<defaultSortField>PATH</defaultSortField>
<defaultSortOrder>ASC</defaultSortOrder>
<FieldDefinitions>
<FieldDefinition>
<identifier>title</identifier>
<fieldType>ezstring</fieldType>
<fieldGroup>content</fieldGroup>
<position>1</position>
<isTranslatable>true</isTranslatable>
<isRequired>true</isRequired>
<isInfoCollector>false</isInfoCollector>
<defaultValue>New Title</defaultValue>
<isS
file_copy
{
"ContentTypeCreate": {
"identifier": "new_content_type",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "New Content Type"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "This is a description"
}
]
},
"remoteId": "remoteId-qwerty548",
"urlAliasSchema": "<title>",
"nameSchema": "<title>",
"isContainer": true,
"mainLanguageCode": "eng-GB",
"defaultAlwaysAvailable": true,
"defaultSortField": "PATH",
"defaultSortOrder": "ASC",
"FieldDefinitions": {
"FieldDefinition": [
{
"identifier": "title",
"fieldType": "ezstring",
"fieldGroup": "content",
"position": 1,
"isTranslatable": true,
"isRequired": true,
"isInfoCollector": false,
"defaultValue": "New Title",
"isSearchable": true,
"names":
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/20/draft">
<id>20</id>
<status>DRAFT</status>
<identifier>newContentType</identifier>
<names>
<value languageCode="eng-GB">New Content Type</value>
</names>
<descriptions>
<value languageCode="eng-GB">This is a description</value>
</descriptions>
<creationDate>2019-02-26T09:39:58+01:00</creationDate>
<modificationDate>2019-02-26T09:39:58+01:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/20/groups"/>
<Draft media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/20/draft"/>
<remoteId>remoteId-qwert548<
/content/types
/content/types
List Content Types ¶
GET /content/types
Returns a list of Content Types.
Header parameters
Accept
If set, the list of Content Type info objects or Content Types (including Field definitions) is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeInfoList+xml
application/vnd.ez.api.ContentTypeInfoList+json
application/vnd.ez.api.ContentTypeList+xml
application/vnd.ez.api.ContentTypeList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| identifier | string | Retrieves the Content Type for the given identifer. |
| remoteId | string | Retrieves the Content Type for the given remote ID. |
| limit | string | Only 'limit' items will be returned, starting with the offset. |
| offset | string | Offset of the result set. |
| orderby | string | One of (name|lastmodified). |
| sort | string | One of (asc|desc). |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns a list of Content Types. |
| 401 |
Error - The user has no permission to read the Content Types. |
Types
| Type | Description |
|---|---|
| ContentTypeInfoList | List of Content Type information. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeList media-type="application/vnd.ez.api.ContentTypeList+xml" href="/api/ezp/v2/content/typegroups/1/types">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2">
<id>2</id>
<status>DEFINED</status>
<identifier>article</identifier>
<names>
<value languageCode="eng-GB">Article</value>
</names>
<descriptions/>
<creationDate>2002-06-18T09:21:38+00:00</creationDate>
<modificationDate>2004-04-20T09:56:29+00:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/2/groups"/>
<Draft media-type="application/vnd.ez.api.ContentType+xml" href="/ap
file_copy
{
"ContentTypeList": {
"_media-type": "application/vnd.ez.api.ContentTypeList+json",
"_href": "/api/ezp/v2/content/typegroups/1/types",
"ContentType": [
{
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/2",
"id": 2,
"status": "DEFINED",
"identifier": "article",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Article"
}
]
},
"descriptions": {
"value": []
},
"creationDate": "2002-06-18T09:21:38+00:00",
"modificationDate": "2004-04-20T09:56:29+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
Get Content Type ¶
GET /content/types/{contentTypeId}
Returns the Content Type with the provided ID.
Header parameters
Accept
If set, the Content Type is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentType+xml
application/vnd.ez.api.ContentType+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Content Type. |
| 401 |
Error - The user is not authorized to read this Content Type. |
| 404 |
Error - The Content Type does not exist. |
Types
| Type | Description |
|---|---|
| ContentType |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2">
<id>2</id>
<status>DEFINED</status>
<identifier>article</identifier>
<names>
<value languageCode="eng-GB">Article</value>
</names>
<descriptions/>
<creationDate>2002-06-18T11:21:38+02:00</creationDate>
<modificationDate>2004-04-20T11:56:29+02:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/2/groups"/>
<Draft media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2/draft"/>
<remoteId>c15b600eb9198b1924063b5a68758232</remoteId>
<urlAliasSchema></urlAliasSchema>
<nameSchema><short_title|title></nam
file_copy
{
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/2",
"id": 2,
"status": "DEFINED",
"identifier": "article",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Article"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": null
}
]
},
"creationDate": "2002-06-18T09:21:38+00:00",
"modificationDate": "2021-06-28T11:31:22+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"Modifier": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
Copy Content Type ¶
COPY /content/types/{contentTypeId}
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.
Possible responses
| Code | Description |
|---|---|
| 201 |
Copy of the Content Type created. |
| 401 |
Error - The user is not authorized to copy this Content Type. |
Create Draft ¶
POST /content/types/{contentTypeId}
Creates a draft and updates it with the given data.
Header parameters
Accept
If set, the new Content Type draft is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeInfo+xml
application/vnd.ez.api.ContentTypeInfo+json
|
Content-Type
The Content Type Update schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeUpdate+xml
application/vnd.ez.api.ContentTypeUpdate+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Draft created. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to create the draft. |
| 403 |
Error - A Content Type with the given new identifier already exists. A draft already exists. |
Types
| Type | Description |
|---|---|
| ContentTypeUpdate | |
| ContentTypeInfo | This class stores Content Type information. |
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeInfo media-type="application/vnd.ez.api.ContentTypeInfo+xml" href="/api/ezp/v2/content/types/3/draft">
<id>3</id>
<status>DRAFT</status>
<identifier>user_group</identifier>
<names>
<value languageCode="eng-GB">User group</value>
</names>
<descriptions/>
<creationDate>2002-06-18T11:21:38+02:00</creationDate>
<modificationDate>2019-02-25T14:41:53+01:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/3/groups"/>
<Draft media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/3/draft"/>
<remoteId>25b4268cdcd01921b808a0d854b877ef</remoteId>
<urlAliasSchema></urlAliasSchema>
<nameSchema><name>
file_copy
{
"ContentTypeInfo": {
"_media-type": "application/vnd.ez.api.ContentTypeInfo+json",
"_href": "/api/ezp/v2/content/types/1/draft",
"id": 1,
"status": "DRAFT",
"identifier": "folder",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Folder"
}
]
},
"descriptions": {
"value": []
},
"creationDate": "2002-06-18T09:21:38+00:00",
"modificationDate": "2021-08-11T11:17:58+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"Modifier": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"Groups": {
"_media-type": "application/vnd.ez.api.ContentTypeGroupRefList+json",
"_href": "/
Delete Content Type ¶
DELETE /content/types/{contentTypeId}
Deletes the provided Content Type.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - Content Type deleted. |
| 401 |
Error - The user is not authorized to delete this Content Type. |
| 403 |
Error - There are object instances of this Content Type. |
| 404 |
Error - The Content Type does not exist. |
/content/types/{contentTypeId}/fieldDefinitions/{fieldDefinitionId}
Get Field definition ¶
GET /content/types/{contentTypeId}/fieldDefinitions/{fieldDefinitionId}
Returns the Field definition by the given ID.
Header parameters
Accept
If set, the Field definition is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.FieldDefinition+xml
application/vnd.ez.api.FieldDefinition+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Field definition. |
| 401 |
Error - The user is not authorized to read the Content Type. |
| 404 |
Error - The Content Type does not exist. |
Types
| Type | Description |
|---|---|
| FieldDefinition | This class represents a Field definition. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<FieldDefinition media-type="application/vnd.ez.api.FieldDefinition+xml" href="/api/ezp/v2/content/types/2/fieldDefinitions/195">
<id>195</id>
<identifier>image</identifier>
<fieldType>ezimageasset</fieldType>
<fieldGroup>content</fieldGroup>
<position>7</position>
<isTranslatable>false</isTranslatable>
<isRequired>false</isRequired>
<isInfoCollector>false</isInfoCollector>
<defaultValue>
<value key="destinationContentId"/>
<value key="alternativeText"/>
<value key="source"/>
</defaultValue>
<isSearchable>false</isSearchable>
<names>
<value languageCode="eng-GB">Image</value>
</names>
<descriptions>
<value languageCode="eng-GB"></value>
</descriptions>
<fieldSettings/>
<validatorConfiguration/>
</FieldDefinition>
file_copy
{
"FieldDefinition": {
"_media-type": "application/vnd.ez.api.FieldDefinition+json",
"_href": "/api/ezp/v2/content/types/2/fieldDefinitions/195",
"id": 195,
"identifier": "image",
"fieldType": "ezimageasset",
"fieldGroup": "content",
"position": 7,
"isTranslatable": false,
"isRequired": false,
"isInfoCollector": false,
"defaultValue": {
"destinationContentId": null,
"alternativeText": null,
"source": null
},
"isSearchable": false,
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Image"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": null
}
]
},
"fieldSettings": [],
"valid
Get Content Type draft ¶
GET /content/types/{contentTypeId}/draft
Returns the draft of the Content Type with the provided ID.
Header parameters
Accept
If set, the Content Type is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentType+xml
application/vnd.ez.api.ContentType+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Content Type. |
| 401 |
Error - The user is not authorized to read this Content Type. |
| 404 |
Error - The Content Type does not exist or does not have a draft. |
Types
| Type | Description |
|---|---|
| ContentType |
Update Content Type draft ¶
PATCH /content/types/{contentTypeId}/draft
Updates metadata of a draft. This method does not handle Field definitions. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the new Content Type draft is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeInfo+xml
application/vnd.ez.api.ContentTypeInfo+json
|
Content-Type
The Content Type update schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeUpdate+xml
application/vnd.ez.api.ContentTypeUpdate+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
Draft metadata updated. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to update the draft. |
| 403 |
Error - A Content Type with the given new identifier already exists. |
| 404 |
Error - There is no draft for this Content Type. |
Types
| Type | Description |
|---|---|
| ContentTypeUpdate | |
| ContentTypeInfo | This class stores Content Type information. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeUpdate>
<names>
<value languageCode="eng-GB">Updated Content Type name</value>
</names>
<descriptions>
<value languageCode="eng-GB">This is an updated Content Type description</value>
</descriptions>
</ContentTypeUpdate>
file_copy
{
"ContentTypeUpdate": {
"names": {
"value": [ {
"_languageCode": "eng-GB",
"#text": "Updated Content Type name"
} ]
},
"descriptions": {
"value": [ {
"_languageCode": "eng-GB",
"#text": "This is an updated Content Type description"
} ]
}
}
}
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeInfo media-type="application/vnd.ez.api.ContentTypeInfo+xml" href="/api/ezp/v2/content/types/14/draft">
<id>14</id>
<status>DRAFT</status>
<identifier>new_content_type</identifier>
<names>
<value languageCode="eng-GB">Updated Content Type name</value>
</names>
<descriptions>
<value languageCode="eng-GB">This is an updated Content Type description</value>
</descriptions>
<creationDate>2019-02-06T10:56:36+01:00</creationDate>
<modificationDate>2019-02-25T12:15:51+01:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/14/groups"/>
<Draft media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/14/
file_copy
{
"ContentTypeInfo": {
"_media-type": "application/vnd.ez.api.ContentTypeInfo+json",
"_href": "/api/ezp/v2/content/types/2/draft",
"id": 2,
"status": "DRAFT",
"identifier": "article",
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Updated Content Type name"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "This is an updated Content Type description"
}
]
},
"creationDate": "2002-06-18T09:21:38+00:00",
"modificationDate": "2021-08-11T11:58:24+00:00",
"Creator": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
},
"Modifier": {
"_media-type": "application/vnd.ez.api.User+j
Publish Content Type draft ¶
PUBLISH /content/types/{contentTypeId}/draft
Publishes a Content Type draft. PUBLISH or POST with header X-HTTP-Method-Override PUBLISH.
Possible responses
| Code | Description |
|---|---|
| 200 |
Content Type draft published. |
| 401 |
Error - The user is not authorized to publish this Content Type draft. |
| 403 |
Error - The Content Type draft is not complete, e.g. there is no Field definition provided. |
| 404 |
Error - If there is no draft or Content Type with the given ID. |
Types
| Type | Description |
|---|---|
| ContentType |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/14">
<id>14</id>
<status>DEFINED</status>
<identifier>copy_of_article_14</identifier>
<names>
<value languageCode="eng-GB">Updated Content Type name</value>
</names>
<descriptions>
<value languageCode="eng-GB">This is an updated Content Type description</value>
</descriptions>
<creationDate>2019-02-06T10:56:36+01:00</creationDate>
<modificationDate>2019-02-25T12:15:51+01:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Modifier media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<Groups media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/types/14/groups"/>
<Draft media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/14/draft"/>
Delete Content Type draft ¶
DELETE /content/types/{contentTypeId}/draft
Deletes the provided Content Type draft.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - Content Type draft deleted. |
| 401 |
Error - The user is not authorized to delete this Content Type draft. |
| 404 |
Error - The Content Type draft does not exist. |
Get Draft Field definition list ¶
GET /content/types/{contentTypeId}/draft/fieldDefinitions
Returns all Field definitions of the provided Content Type Draft.
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - return a list of Field definitions. |
| 404 |
Error - The Content Type draft does not exist. |
Add Content Type Draft Field definition ¶
POST /content/types/{contentTypeId}/draft/fieldDefinitions
Creates a new Field definition for the given Content Type.
Header parameters
Accept
If set, the new Field definition is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.FieldDefinition+xml
application/vnd.ez.api.FieldDefinition+json
|
Content-Type
The Field Definition Create schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.FieldDefinitionCreate+xml
application/vnd.ez.api.FieldDefinitionCreate+json
|
Possible responses
| Code | Description |
|---|---|
| 201 |
Field definition created. |
| 400 |
Error - The input does not match the input schema definition or validation on the Field definition fails. |
| 401 |
Error - The user is not authorized to add a Field definition. |
| 403 |
Error - A Field definition with the same identifier already exists in the given Content Type. The Field definition is of singular type, already existing in the given Content Type. The Field definition you want to add is of a type that can't be added to a Content Type that already has content instances. |
Types
| Type | Description |
|---|---|
| FieldDefinitionCreate | |
| FieldDefinition | This class represents a Field definition. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<FieldDefinitionCreate>
<identifier>name</identifier>
<fieldType>ezstring</fieldType>
<isRequired>true</isRequired>
<validatorConfiguration>
<value key="StringLengthValidator">
<value key="maxStringLength">32</value>
<value key="minStringLength">8</value>
</value>
</validatorConfiguration>
</FieldDefinitionCreate>
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<FieldDefinition media-type="application/vnd.ez.api.FieldDefinition+xml" href="/api/ezp/v2/content/types/14/draft/fieldDefinitions/221">
<id>221</id>
<identifier>name2</identifier>
<fieldType>ezstring</fieldType>
<fieldGroup></fieldGroup>
<position>0</position>
<isTranslatable>true</isTranslatable>
<isRequired>true</isRequired>
<isInfoCollector>false</isInfoCollector>
<defaultValue/>
<isSearchable>true</isSearchable>
<names/>
<descriptions/>
<fieldSettings/>
<validatorConfiguration>
<value key="StringLengthValidator">
<value key="maxStringLength">32</value>
<value key="minStringLength">8</value>
</value>
</validatorConfiguration>
</FieldDefinition>
Get Content Type Draft Field definition ¶
GET /content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}
Returns the Field definition by the given ID.
Header parameters
Accept
If set, the Field definition is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.FieldDefinition+xml
application/vnd.ez.api.FieldDefinition+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns the Field definition. |
| 401 |
Error - The user is not authorized to read the Content Type draft. |
| 404 |
Error - The Content Type or draft does not exist. |
Types
| Type | Description |
|---|---|
| FieldDefinition | This class represents a Field definition. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<FieldDefinition media-type="application/vnd.ez.api.FieldDefinition+xml" href="/api/ezp/v2/content/types/2/fieldDefinitions/195">
<id>195</id>
<identifier>image</identifier>
<fieldType>ezimageasset</fieldType>
<fieldGroup>content</fieldGroup>
<position>7</position>
<isTranslatable>false</isTranslatable>
<isRequired>false</isRequired>
<isInfoCollector>false</isInfoCollector>
<defaultValue>
<value key="destinationContentId"/>
<value key="alternativeText"/>
<value key="source"/>
</defaultValue>
<isSearchable>false</isSearchable>
<names>
<value languageCode="eng-GB">Image</value>
</names>
<descriptions>
<value languageCode="eng-GB"></value>
</descriptions>
<fieldSettings/>
<validatorConfiguration/>
</FieldDefinition>
file_copy
{
"FieldDefinition": {
"_media-type": "application/vnd.ez.api.FieldDefinition+json",
"_href": "/api/ezp/v2/content/types/2/fieldDefinitions/195",
"id": 195,
"identifier": "image",
"fieldType": "ezimageasset",
"fieldGroup": "content",
"position": 7,
"isTranslatable": false,
"isRequired": false,
"isInfoCollector": false,
"defaultValue": {
"destinationContentId": null,
"alternativeText": null,
"source": null
},
"isSearchable": false,
"names": {
"value": [
{
"_languageCode": "eng-GB",
"#text": "Image"
}
]
},
"descriptions": {
"value": [
{
"_languageCode": "eng-GB",
"#text": null
}
]
},
"fieldSettings": [],
"valid
Update Content Type Draft Field definition ¶
PATCH /content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}
Updates the attributes of a Field definition.
Header parameters
Accept
If set, the updated Field definition is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.FieldDefinition+xml
application/vnd.ez.api.FieldDefinition+json
|
Content-Type
The Field definition update schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.FieldDefinitionUpdate+xml
application/vnd.ez.api.FieldDefinitionUpdate+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - attributes updated. |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to update the Field definition. |
| 403 |
Error - A Field definition with the given identifier already exists in the given Content Type. |
Types
| Type | Description |
|---|---|
| FieldDefinitionUpdate | |
| FieldDefinition | This class represents a Field definition. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<FieldDefinitionUpdate>
<fieldGroup>new_field_group</fieldGroup>
<position>10</position>
</FieldDefinitionUpdate>
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<FieldDefinition media-type="application/vnd.ez.api.FieldDefinition+xml" href="/api/ezp/v2/content/types/15/draft/fieldDefinitions/197">
<id>197</id>
<identifier>author</identifier>
<fieldType>ezauthor</fieldType>
<fieldGroup>new_field_group</fieldGroup>
<position>10</position>
<isTranslatable>true</isTranslatable>
<isRequired>false</isRequired>
<isInfoCollector>false</isInfoCollector>
<defaultValue/>
<isSearchable>false</isSearchable>
<names>
<value languageCode="eng-GB">Author</value>
</names>
<descriptions/>
<fieldSettings>
<value key="defaultAuthor">1</value>
</fieldSettings>
<validatorConfiguration/>
</FieldDefinition>
Delete Content Type Draft Field definition ¶
DELETE /content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}
Deletes the provided Field definition.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - Field definition deleted. |
| 401 |
Error - The user is not authorized to delete this Content Type. |
| 403 |
Error - There is no draft of the Content Type assigned to the authenticated user. |
Get groups of Content Type ¶
GET /content/types/{contentTypeId}/groups
Returns the Content Type group to which Content Type belongs to.
Header parameters
Accept
If set, the Content Type group list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroupRefList+xml
application/vnd.ez.api.ContentTypeGroupRefList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - The user is not authorized to read this Content Type. |
| 404 |
Error - The Content Type does not exist. |
Types
| Type | Description |
|---|---|
| ContentTypeGroupRefList | List of Content Type groups references. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeGroupRefList media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/typegroups/2/types">
<ContentTypeGroupRef media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/1"/>
</ContentTypeGroupRefList>
file_copy
{
"ContentTypeGroupRefList": {
"_media-type": "application/vnd.ez.api.ContentTypeGroupRefList+json",
"_href": "/api/ezp/v2/content/typegroups/2/types",
"ContentTypeGroupRef": [
{
"_media-type": "application/vnd.ez.api.ContentTypeGroup+json",
"_href": "/api/ezp/v2/content/typegroups/1"
}
]
}
}
Link group to Content Type ¶
POST /content/types/{contentTypeId}/groups
Links a Content Type group to the Content Type and returns the updated group list.
Header parameters
Accept
If set, the updated Content Type group list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroupRefList+xml
application/vnd.ez.api.ContentTypeGroupRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| group | string | The URI of the group to which the Content Type should be linked to. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - The input does not match the input schema definition. |
| 401 |
Error - The user is not authorized to add a group. |
| 403 |
Error - The Content Type is already assigned to the group. |
Types
| Type | Description |
|---|---|
| ContentTypeGroupRefList | List of Content Type groups references. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeGroupRefList media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/typegroups/15/types">
<ContentTypeGroupRef media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/1">
<unlink href="/api/ezp/v2/content/types/15/groups/1" method="DELETE"/>
</ContentTypeGroupRef>
<ContentTypeGroupRef media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/3">
<unlink href="/api/ezp/v2/content/types/15/groups/3" method="DELETE"/>
</ContentTypeGroupRef>
<ContentTypeGroupRef media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/2">
<unlink href="/api/ezp/v2/content/types/15/groups/2" method="DELETE"/>
</ContentTypeGroupRef>
</ContentTypeGroupRefList>
/content/types/{contentTypeId}/groups/{id}
Unlink group from Content Type ¶
DELETE /content/types/{contentTypeId}/groups/{id}
Removes the given group from the Content Type and returns the updated group list.
Header parameters
Accept
If set, the updated Content Type group list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentTypeGroupRefList+xml
application/vnd.ez.api.ContentTypeGroupRefList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - The user is not authorized to delete this Content Type. |
| 403 |
Error - Content Type cannot be unlinked from the only remaining group. |
| 404 |
Error - The resource does not exist. |
Types
| Type | Description |
|---|---|
| ContentTypeGroup | This class represents a Content Type group value. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeGroupRefList media-type="application/vnd.ez.api.ContentTypeGroupRefList+xml" href="/api/ezp/v2/content/typegroups/15/types">
<ContentTypeGroupRef media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/1">
<unlink href="/api/ezp/v2/content/types/15/groups/1" method="DELETE"/>
</ContentTypeGroupRef>
<ContentTypeGroupRef media-type="application/vnd.ez.api.ContentTypeGroup+xml" href="/api/ezp/v2/content/typegroups/2">
<unlink href="/api/ezp/v2/content/types/15/groups/2" method="DELETE"/>
</ContentTypeGroupRef>
</ContentTypeGroupRefList>
file_copy
{
"ContentTypeGroupRefList": {
"_media-type": "application/vnd.ez.api.ContentTypeGroupRefList+json",
"_href": "/api/ezp/v2/content/typegroups/2/types",
"ContentTypeGroupRef": [
{
"_media-type": "application/vnd.ez.api.ContentTypeGroup+json",
"_href": "/api/ezp/v2/content/typegroups/1",
"unlink": {
"_href": "/api/ezp/v2/content/types/2/groups/1",
"_method": "DELETE"
}
},
{
"_media-type": "application/vnd.ez.api.ContentTypeGroup+json",
"_href": "/api/ezp/v2/content/typegroups/2",
"unlink": {
"_href": "/api/ezp/v2/content/types/2/groups/2",
"_method": "DELETE"
}
}
]
}
}
/content/assets
/content/assets/images/{assetId}/{assetSource}
Fetch image asset value ¶
GET /content/assets/images/{assetId}/{assetSource}
Fetches the image asset value object. Depending on the provider, the asset metadata object can contain different parameters.
Header parameters
Accept
If set, the value XML object with image asset metadata is returned.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Asset+xml
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to read this image asset. |
| 404 |
Error - asset Id/asset source pair does not match any image asset. |
Types
| Type | Description |
|---|---|
| Asset | Asset value object |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Asset media-type="application/vnd.ez.api.Asset+xml" href="/api/ezp/v2/content/assets/images/UtrE5DcgEyg/unsplash">
<uri>https://images.unsplash.com/photo-1544568100-847a948585b9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjE1MDk5MH0</uri>
<assetId>UtrE5DcgEyg</assetId>
<assetSource>unsplash</assetSource>
<assetMetadata>
<alternativeText>medium-coated brown dog during daytime</alternativeText>
<width>5184</width>
<height>3888</height>
<created_at>2018-12-11T17:46:12-05:00</created_at>
<updated_at>2020-10-23T23:08:44-04:00</updated_at>
<author>Jamie Street</author>
<author_link_html>https://unsplash.com/@jamie452?utm_source=Ibexa+Platform+DAM+Connector&utm_medium=referral&utm_campaign=api-credit</author_link_html>
</assetMetadata>
</Asset>
Searching content ¶
/views
Search content ¶
POST /views
Executes a query and returns a View including the results.
View input reflects the criteria model of the public PHP API.
Refer to Search Criteria Reference
Header parameters
Accept
The view in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.View+xml
application/vnd.ez.api.View+json
application/vnd.ez.api.View+xml; version=1.1
application/vnd.ez.api.View+json; version=1.1
|
Content-Type
The view input in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ViewInput+xml
application/vnd.ez.api.ViewInput+json
application/vnd.ez.api.ViewInput+xml; version=1.1
application/vnd.ez.api.ViewInput+json; version=1.1
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - the input does not match the input schema definition. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<ViewInput>
<identifier>TitleView</identifier>
<Query>
<Filter>
<ContentTypeIdentifierCriterion>image</ContentTypeIdentifierCriterion>
<SectionIdentifierCriterion>media</SectionIdentifierCriterion>
<DateMetadataCriterion>
<Target>modified</Target>
<Value>1675681020</Value>
<Operator>gte</Operator>
</DateMetadataCriterion>
</Filter>
<limit>10</limit>
<offset>0</offset>
<SortClauses>
<ContentName>ascending</ContentName>
</SortClauses>
<Aggregations>
<Aggregation>
<ContentTypeTermAggregation>
<name>some name</name>
</ContentTypeTermAggregation>
</Aggregation>
</Aggregations>
</Query>
</ViewInput>
file_copy
{
"ViewInput": {
"identifier": "TitleView",
"Query": {
"Filter": {
"ContentTypeIdentifierCriterion": "image",
"SectionIdentifierCriterion": "media",
"DateMetadataCriterion": {
"Target": "modified",
"Value": 1675681020,
"Operator": "gte"
}
},
"limit": 10,
"offset": 0,
"SortClauses": {
"ContentName": "ascending"
},
"Aggregations": [
{
"ContentTypeTermAggregation": {
"name": "some name"
}
}
]
}
}
}
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<View href="/views/TitleView" media-type="application/vnd.ez.api.View+xml; version=1.1">
<identifier>TitleView</identifier>
<User href="/user/users/14" media-type="vnd.ez.api.User+xml"/>
<public>false</public>
<LocationQuery>
<Filter>
<ParentLocationIdCriterion>2</ParentLocationIdCriterion>
</Filter>
<limit>10</limit>
<offset>0</offset>
<SortClauses>
<ContentName>ascending</ContentName>
</SortClauses>
<FacetBuilders>
<contentTypeFacetBuilder/>
</FacetBuilders>
</LocationQuery>
<Result href="/content/views/view1234/results"
media-type="application/vnd.ez.api.ViewResult+xml" count="34" time="31" maxScore="1.0">
<searchHits>
<searchHit score="1.0" index="installid1234567890">
<hightlight/>
<value>
<Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2">
<id>2</id>
<priority>0</priori
Calendar ¶
/calendar/event
Calendar list ¶
GET /calendar/event
Calendar event list.
Header parameters
Accept
If set, the calendar event list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ContentInfo+xml
application/vnd.ez.api.ContentInfo+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| start | datetime | Query start date. |
| end | datetime | Query end date. |
| types | string | The types of events that are displayed. |
| languages | string | Language code. Restricts the output of translatable Fields to the given languages. |
| count | string | Number of parameters that are returned in the list. |
| cursor | string | Starting point of calendar event list. It should be taken from the URL. |
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| ContentInfo | This class provides all version independent information of the Content item. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<EventList media-type="application/vnd.ez.api.EventList+xml" currentPage="/api/ezp/v2/calendar/event?start=1597104000&end=1598745600&count=10">
<totalCount>5</totalCount>
</EventList>
file_copy
{
"EventList": {
"_media-type": "application/vnd.ez.api.EventList+json",
"_currentPage": "/api/ezp/v2/calendar/event?start=1597104000&end=1598745600&count=10",
"totalCount": 5,
"events": []
}
}
/calendar/event/grouped-by-day
Calendar list grouped by day ¶
GET /calendar/event/grouped-by-day
Calendar event list grouped by day.
Header parameters
Accept
If set, the calendar event list grouped by day is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.ScheduledVersion+xml
application/vnd.ez.api.ScheduledVersion+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| start | integer | Query start date. |
| end | integer | Query end date. |
| types | string | The types of events that are displayed. |
| languages | string | Language code. Restricts the output of event list to the given languages. |
| count | integer | Number of parameters that are returned in the list. |
| cursor | string | Starting point of calendar event list. It should be taken from the URL. |
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| ContentInfo | This class provides all version independent information of the Content item. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<EventGroupList media-type="application/vnd.ez.api.EventGroupList+xml">
<EventGroup media-type="application/vnd.ez.api.EventGroup+xml" currentPage="/api/ezp/v2/calendar/event?start=1597104000&end=1597190400&count=10">
<DateRange media-type="application/vnd.ez.api.DateRange+xml">
<startDate>1597104000</startDate>
<endDate>1597190400</endDate>
</DateRange>
<totalCount>0</totalCount>
</EventGroup>
<EventGroup media-type="application/vnd.ez.api.EventGroup+xml" currentPage="/api/ezp/v2/calendar/event?start=1597190400&end=1597276800&count=10">
<DateRange media-type="application/vnd.ez.api.DateRange+xml">
<startDate>1597190400</startDate>
<endDate>1597276800</endDate>
</DateRange>
<totalCount>0</totalCount>
</EventGroup>
<EventGroup media-type="application/vnd.ez.api.EventGroup+xml" currentPage="/api/ezp/v2/calendar/event?st
file_copy
{
"EventGroupList": {
"_media-type": "application/vnd.ez.api.EventGroupList+json",
"groups": [
{
"_media-type": "application/vnd.ez.api.EventGroup+json",
"_currentPage": "/api/ezp/v2/calendar/event?start=1597104000&end=1597190400&count=10",
"DateRange": {
"_media-type": "application/vnd.ez.api.DateRange+json",
"startDate": "1597104000",
"endDate": "1597190400"
},
"totalCount": 0,
"events": []
},
{
"_media-type": "application/vnd.ez.api.EventGroup+json",
"_currentPage": "/api/ezp/v2/calendar/event?start=1597190400&end=1597276800&count=10",
"DateRange": {
"_media-type": "application/vnd.ez.api.DateRange+json",
"startDate": "1597190400",
"endDate": "1597276800"
/calendar/event/{eventType}
Calendar action ¶
POST /calendar/event/{eventType}
A calendar action that e.g. reschedules or unschedules calendar events. The event type should always be copied from an event.
Header parameters
Content-Type
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.calendar.future_publication.UnscheduleAction+json
|
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - the action has been unscheduled. |
Types
| Type | Description |
|---|---|
| RoleAssignInput |
file_copy
{
"UnscheduleAction": {
"events": [
"future_publication:2"
]
}
}
Managing users ¶
/user/groups
/user/groups
Load User Groups ¶
GET /user/groups
Loads User Groups for either an an ID or a remote ID or a Role.
Header parameters
Accept
UserGroupList - If set, the User Group List is returned in XML or JSON format. UserGroupRefList - If set, the link list of User Group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroupList+xml
application/vnd.ez.api.UserGroupList+json
application/vnd.ez.api.UserGroupRefList+xml
application/vnd.ez.api.UserGroupRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| roleId | string | Lists User Groups assigned to the given Role (e.g. GET /user/groups?roleId=1). |
| id | string | Retrieves the User Groups for the given ID. |
| remoteID | string | Retrieves the User Groups for the given remote ID. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user has no permission to read User Groups. |
Types
| Type | Description |
|---|---|
| UserGroupList |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroupList media-type="application/vnd.ez.api.UserGroupList+xml" href="/api/ezp/v2/user/groups">
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/13/15" id="14" remoteId="1bb4fe25487f05527efa8bfd394cecc7">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/4"/>
<name>Administrator User</name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/14/versions"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/5/13/15"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/14/locations"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/us
file_copy
{
"UserGroupList": {
"_media-type": "application/vnd.ez.api.UserGroupList+json",
"_href": "/api/ezp/v2/user/groups",
"UserGroup": [
{
"_media-type": "application/vnd.ez.api.UserGroup+json",
"_href": "/api/ezp/v2/user/groups/1/5/13/15",
"_id": 14,
"_remoteId": "1bb4fe25487f05527efa8bfd394cecc7",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/4"
},
"name": "Administrator User",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/14/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
/user/groups/root
Get root User Group ¶
GET /user/groups/root
Redirects to the root User Group.
Possible responses
| Code | Description |
|---|---|
| 301 |
Moved permanently. |
Load User Group ¶
GET /user/groups/{path}
Loads User Groups for the given {path}.
Header parameters
Accept
If set, the new User Group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroup+xml
application/vnd.ez.api.UserGroup+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - loads User Groups. |
| 401 |
Error - the user has no permission to read User Groups. |
| 404 |
Error - the User Group does not exist. |
Types
| Type | Description |
|---|---|
| UserGroup | This class represents a User group. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/13" id="12" remoteId="9b47a45624b023b1a76c73b74d704acf">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/3"/>
<name>Administrator users</name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/12/versions"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/5/13"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/12/locations"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<publishDate>2002-10-06T16:12:55+00:00</publishDate>
<lastModificationDate>2002-10-06T16:12:55+00:00</lastModificationDa
file_copy
{
"UserGroup": {
"_media-type": "application/vnd.ez.api.UserGroup+json",
"_href": "/api/ezp/v2/user/groups/1/5/13",
"_id": 12,
"_remoteId": "9b47a45624b023b1a76c73b74d704acf",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/3"
},
"name": "Administrator users",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/12/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
},
"MainLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/5/13"
},
"Locations": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_hr
Update User Group ¶
PATCH /user/groups/{path}
Updates a User Group. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the new User Group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroup+xml
application/vnd.ez.api.UserGroup+json
|
Content-Type
The UserGroupUpdate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroupUpdate+json
application/vnd.ez.api.UserGroupUpdate+xml
|
If-Match
Performs the PATCH only if the specified ETag is the current one. Otherwise a 412 is returned.
| Property | Value |
|---|---|
| Type | string |
| Examples |
ETag
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - updated User Group. |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to update the User Group. |
| 412 |
Error - if the current ETag does not match with the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| UserGroupUpdate | |
| UserGroup | This class represents a User group. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/13" id="12" remoteId="9b47a45624b023b1a76c73b74d704acf">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/3"/>
<name>Administrator users</name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/12/versions"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/5/13"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/12/locations"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<publishDate>2002-10-06T16:12:55+00:00</publishDate>
<lastModificationDate>2002-10-06T16:12:55+00:00</lastModificationDa
file_copy
{
"UserGroup": {
"_media-type": "application/vnd.ez.api.UserGroup+json",
"_href": "/api/ezp/v2/user/groups/1/5/13",
"_id": 12,
"_remoteId": "9b47a45624b023b1a76c73b74d704acf",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/3"
},
"name": "Administrator users",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/12/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
},
"MainLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/5/13"
},
"Locations": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_hr
Delete User Group ¶
DELETE /user/groups/{path}
The given User Group is deleted.
Possible responses
| Code | Description |
|---|---|
| 204 |
No content - the given User Group is deleted. |
| 401 |
Error - the user is not authorized to delete this Content Type. |
| 403 |
Error - the User Group is not empty. |
Move User Group ¶
MOVE /user/groups/{path}
Moves the User Group to another parent. MOVE or POST with header X-HTTP-Method-Override MOVE.
Header parameters
Destination
A parent group resource to which the Location is moved.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 201 |
Created - moves the User Group to another parent. |
| 401 |
Error - the user is not authorized to update the User Group. |
| 403 |
Error - the new parent does not exist. |
| 404 |
Error - the User Group does not exist. |
Load Users of Group ¶
GET /user/groups/{path}/users
Loads the Users of the Group with the given ID.
Header parameters
Accept
UserList - If set, the User list returned in XML or JSON format. UserRefList - If set, the link list of Users returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserList+xml
application/vnd.ez.api.UserList+json
application/vnd.ez.api.UserRefList+xml
application/vnd.ez.api.UserRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| limit | string | Only 'limit' items will be returned started by offset. |
| offset | string | Offset of the result set. |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - the Users of the Group with the given ID. |
| 401 |
Error - the user has no permission to read User Groups. |
| 404 |
Error - the User Group does not exist. |
Types
| Type | Description |
|---|---|
| UserRefList | Returns a list of the users. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserRefList media-type="application/vnd.ez.api.UserRefList+xml" href="/api/ezp/v2/user/groups/13/users">
<User media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/113"/>
<User media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
</UserRefList>
file_copy
{
"UserRefList": {
"_media-type": "application/vnd.ez.api.UserRefList+json",
"_href": "/api/ezp/v2/user/groups/13/users",
"User": [
{
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/113"
},
{
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14"
}
]
}
}
Create User ¶
POST /user/groups/{path}/users
Creates a new User in the given Group.
Header parameters
Accept
If set, the new User is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.User+xml
application/vnd.ez.api.User+json
|
Content-Type
The UserCreate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserCreate+json
application/vnd.ez.api.UserCreate+xml
|
Possible responses
| Code | Description |
|---|---|
| 201 | |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to create this User. |
| 403 |
Error - a User with the same login already exists. |
| 404 |
Error - the Group with the given ID does not exist. |
Types
| Type | Description |
|---|---|
| UserCreate | |
| User | This class represents a User value. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserCreate>
<mainLanguageCode>eng-GB</mainLanguageCode>
<remoteId>remoteId-qwert426</remoteId>
<login>yura</login>
<email>[email protected]</email>
<password>Secrepassword5!</password>
<fields>
<field>
<fieldDefinitionIdentifier>first_name</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>Yura</fieldValue>
</field>
<field>
<fieldDefinitionIdentifier>last_name</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>Rajzer</fieldValue>
</field>
</fields>
</UserCreate>
file_copy
{
"UserCreate": {
"mainLanguageCode": "eng-GB",
"remoteId": "remoteId-qwert426",
"login": "yura",
"email": "[email protected]",
"password": "Password1!",
"fields": {
"field": [
{
"fieldDefinitionIdentifier": "first_name",
"languageCode": "eng-GB",
"fieldValue": "Yura"
},
{
"fieldDefinitionIdentifier": "last_name",
"languageCode": "eng-GB",
"fieldValue": "Rajzer"
}
]
}
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<User media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/59" id="59" remoteId="remoteId-qwert426">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/4"/>
<name>Yura Rajzer</name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/59/versions"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/5/65/67"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/59/locations"/>
<Groups media-type="application/vnd.ez.api.UserGroupRefList+xml" href="/api/ezp/v2/user/users/59/groups"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<publishDate>2019-02-27T11:23:42+01:00</publishDate>
<lastModificationDate>2019-02-2
file_copy
{
"User": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/57",
"_id": 57,
"_remoteId": "remoteId-qwert426",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/4"
},
"name": "Yura Rajzer",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/57/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
},
"MainLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/5/13/58"
},
"Locations": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/content/objects/5
Load subgroups ¶
GET /user/groups/{path}/subgroups
Returns a list of the subgroups.
Header parameters
Accept
UserGroupList - If set, the User Group list is returned in XML or JSON format. UserGroupRefList - If set, the link list of User Groups is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroupList+xml
application/vnd.ez.api.UserGroupList+json
application/vnd.ez.api.UserGroupRefList+xml
application/vnd.ez.api.UserGroupRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| limit | string | The number of Locations returned. |
| offset | string | The offset of the result set. |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - list of the subgroups. |
| 401 |
Error - the user has no permission to read User Groups. |
| 404 |
Error - the User Group does not exist. |
Types
| Type | Description |
|---|---|
| UserGroupRefList | Returns a list of the sub groups. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroupRefList media-type="application/vnd.ez.api.UserGroupRefList+xml" href="/api/ezp/v2/user/groups/13/subgroups">
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/13/112"/>
</UserGroupRefList>
file_copy
{
"UserGroupRefList": {
"_media-type": "application/vnd.ez.api.UserGroupRefList+json",
"_href": "/api/ezp/v2/user/groups/13/subgroups",
"UserGroup": [
{
"_media-type": "application/vnd.ez.api.UserGroup+json",
"_href": "/api/ezp/v2/user/groups/1/5/13/112"
}
]
}
}
Create User Group ¶
POST /user/groups/{path}/subgroups
Creates a new User Group under the given parent. To create a top level group use '/user/groups/subgroups'.
Header parameters
Accept
If set, the new User Group is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroup+xml
application/vnd.ez.api.UserGroup+json
|
Content-Type
The UserGroupCreate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroupCreate+json
application/vnd.ez.api.UserGroupCreate+xml
|
Possible responses
| Code | Description |
|---|---|
| 201 | |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to create this User Group. |
Types
| Type | Description |
|---|---|
| UserGroupCreate | |
| UserGroup | This class represents a User group. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroupCreate>
<mainLanguageCode>eng-GB</mainLanguageCode>
<remoteId>remoteId-qwert098</remoteId>
<fields>
<field>
<fieldDefinitionIdentifier>name</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>UserGroup</fieldValue>
</field>
<field>
<fieldDefinitionIdentifier>description</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>This is the description of the user group</fieldValue>
</field>
</fields>
</UserGroupCreate>
file_copy
{
"UserGroupCreate": {
"mainLanguageCode": "eng-GB",
"remoteId": "remoteId-qwert098",
"fields": {
"field": [
{
"fieldDefinitionIdentifier": "name",
"languageCode": "eng-GB",
"fieldValue": "UserGroup2"
},
{
"fieldDefinitionIdentifier": "description",
"languageCode": "eng-GB",
"fieldValue": "This is the description of the user group"
}
]
}
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/79" id="85" remoteId="remoteId-qwert098">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/3"/>
<name>UserGroup2</name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/85/versions"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/5/79"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/85/locations"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<publishDate>2021-08-09T09:03:35+00:00</publishDate>
<lastModificationDate>2021-08-09T09:03:35+00:00</lastModificationDate>
<mainLanguageCod
file_copy
{
"UserGroup": {
"_media-type": "application/vnd.ez.api.UserGroup+json",
"_href": "/api/ezp/v2/user/groups/1/5/81",
"_id": 87,
"_remoteId": "remoteId-qwert098",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/3"
},
"name": "UserGroup2",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/87/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
},
"MainLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/5/81"
},
"Locations": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/conten
Load Roles for User Group ¶
GET /user/groups/{path}/roles
Returns a list of all Roles assigned to the given User Group.
Header parameters
Accept
If set, the Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignmentList+xml
application/vnd.ez.api.RoleAssignmentList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - the user has no permission to read Roles. |
Types
| Type | Description |
|---|---|
| RoleAssignmentList | This value object represents a list of assignments of a User or User group to a role including a limitation. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/groups/1/42/44/roles/1">
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/1"/>
</RoleAssignment>
Assign Role to User Group ¶
POST /user/groups/{path}/roles
Assigns a Role to a User Group.
Header parameters
Accept
If set, the updated Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignmentList+xml
application/vnd.ez.api.RoleAssignmentList+json
|
Content-Type
The RoleAssignInput schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignInput+json
application/vnd.ez.api.RoleAssignInput+xml
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - validation of limitation in RoleAssignInput fails. |
| 401 |
Error - the user is not authorized to assign this Role. |
Types
| Type | Description |
|---|---|
| RoleAssignInput | |
| RoleAssignmentList | This value object represents a list of assignments of a User or User group to a role including a limitation. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignInput>
<Role href="/api/ezp/v2/user/roles/10" media-type="application/vnd.ez.api.RoleAssignInput+xml"/>
<limitation identifier="Section">
<values>
<ref href="/api/ezp/v2/content/sections/1" media-type="application/vnd.ez.api.Section+xml" />
<ref href="/api/ezp/v2/content/sections/4" media-type="application/vnd.ez.api.Section+xml" />
</values>
</limitation>
</RoleAssignInput>
file_copy
{
"RoleAssignInput": {
"Role": {
"_href": "/api/ezp/v2/user/roles/2",
"media-type": "application/vnd.ez.api.RoleAssignInput+json",
"self-closing": "true"
},
"Limitation": {
"identifier": "Section",
"values": {
"ref": [
{
"_href": "/api/ezp/v2/content/sections/1",
"media-type": "application/vnd.ez.api.Section+json",
"self-closing": "true"
},
{
"_href": "/api/ezp/v2/content/sections/4",
"media-type": "application/vnd.ez.api.Section+json",
"self-closing": "true"
}
]
}
}
}
}
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignmentList media-type="application/vnd.ez.api.RoleAssignmentList+xml" href="/api/ezp/v2/user/groups/1/5/65/roles">
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/groups/1/5/65/roles/3">
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="1"/>
</values>
</limitation>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/3"/>
</RoleAssignment>
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/groups/1/5/65/roles/10">
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="1"/>
</values>
</limitation>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/10"/>
</RoleAssignment>
<RoleAssignment media-type="application/vnd.ez.api.RoleAssi
file_copy
{
"RoleAssignmentList": {
"_media-type": "application/vnd.ez.api.RoleAssignmentList+json",
"_href": "/api/ezp/v2/user/groups/1/12/2/roles",
"RoleAssignment": [
{
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/groups/1/12/2/roles/2",
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/2"
}
}
]
}
}
Load User Group Role Assignment ¶
GET /user/groups/{path}/roles/{roleId}
Returns a Role assignment of the given User Group.
Header parameters
Accept
If set, the Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignment+xml
application/vnd.ez.api.RoleAssignment+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - returns a Role assignment of the given User Group. |
| 401 |
Error - the user has no permission to read Roles. |
Types
| Type | Description |
|---|---|
| RoleAssignment | This value object represents an assignment of a User or User group to a role including a limitation. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/groups/1/11/12/roles/1">
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/1"/>
</RoleAssignment>
file_copy
{
"RoleAssignment": {
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/groups/1/11/12/roles/1",
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/1"
}
}
}
Unassign Role from User Group ¶
DELETE /user/groups/{path}/roles/{roleId}
The given Role is removed from the User or User Group.
Header parameters
Accept
If set, the updated Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignmentList+xml
application/vnd.ez.api.RoleAssignmentList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to delete this Role assignment. |
Types
| Type | Description |
|---|---|
| RoleAssignmentList | This value object represents a list of assignments of a User or User group to a role including a limitation. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignmentList media-type="application/vnd.ez.api.RoleAssignmentList+xml" href="/api/ezp/v2/user/groups/1/5/65/roles">
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/groups/1/5/65/roles/3">
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="1"/>
</values>
</limitation>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/3"/>
</RoleAssignment>
</RoleAssignmentList>
file_copy
{
"RoleAssignmentList": {
"_media-type": "application/vnd.ez.api.RoleAssignmentList+json",
"_href": "/api/ezp/v2/user/groups/1/57/58/roles",
"RoleAssignment": [
{
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/groups/1/57/58/roles/3",
"limitation": {
"_identifier": "Section",
"values": {
"ref": [
{
"_media-type": "application/vnd.ez.api.ref+json",
"_href": "1"
}
]
}
},
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/3"
}
}
]
}
}
/user/users
List Users ¶
GET /user/users
Load Users either for a given remote ID or Role.
Header parameters
Accept
UserList - If set, the User list is returned in XML or JSON format. UserRefList - If set, the link list of Users is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserList+xml
application/vnd.ez.api.UserList+json
application/vnd.ez.api.UserRefList+xml
application/vnd.ez.api.UserRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| roleId | string | Lists Users assigned to the given Role (e.g. GET /user/users?roleId=/user/roles/1). |
| remoteId | string | Retrieves the User for the given remote ID (e.g. GET /user/users?remoteId=55dd9713db75145f374bbd0b4f60ad29). |
| login | string | Retrieves the User for the given login (e.g. GET /user/users?login=editor). |
| string | Lists Users with the given email (e.g. GET /user/[email protected]). |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Loads Users either for a given remote ID or Role. |
| 404 |
If there are no visible Users matching the filter. |
Types
| Type | Description |
|---|---|
| UserRefList | Returns a list of the users. |
| UserList | This class represents a list of users. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserRefList media-type="application/vnd.ez.api.UserRefList+xml" href="/api/ezp/v2/user/users">
<User media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
</UserRefList>
file_copy
{
"UserList": {
"_media-type": "application/vnd.ez.api.UserList+json",
"_href": "/api/ezp/v2/user/users",
"User": [
{
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/14",
"_id": 14,
"_remoteId": "1bb4fe25487f05527efa8bfd394cecc7",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/4"
},
"name": "Administrator User",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/14/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
},
Verify Users ¶
HEAD /user/users
Verifies if there are Users matching given filter.
Query parameters
| Property | Type | Value |
|---|---|---|
| roleId | string | Checks if there are Users directly assigned to the given Role (e.g. HEAD /user/users?roleId=/user/roles/1). |
| remoteId | string | Checks if there is a User for the given remote ID (e.g. HEAD /user/users?remoteId=55dd9713db75145f374bbd0b4f60ad29). |
| login | string | Checks if there is a User for the given login (e.g. HEAD /user/users?login=editor). |
| string | Checks if there is a User with the given email (e.g. HEAD /user/[email protected]). |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - verifies if there are Users matching the given filter. |
| 404 |
Error - there are no visible Users matching the filter. |
Load User ¶
GET /user/users/{userId}
Loads User with the given ID.
Header parameters
Accept
If set, the User is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.User+xml
application/vnd.ez.api.User+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - the User with the given ID. |
| 401 |
Error - the user has no permission to read Users. |
| 404 |
Error - the User does not exist. |
Types
| Type | Description |
|---|---|
| UserList | This class represents a list of users. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserList media-type="application/vnd.ez.api.UserList+xml" href="/api/ezp/v2/user/users">
<User media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/79" id="79" remoteId="bcf0764b417f05af21852a1f03fb1f13">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/4"/>
<name>Jose Vargas</name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/79/versions"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/5/12/79"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/79/locations"/>
<Groups media-type="application/vnd.ez.api.UserGroupRefList+xml" href="/api/ezp/v2/user/users/79/groups"/>
file_copy
{
"UserList": {
"_media-type": "application/vnd.ez.api.UserList+json",
"_href": "/api/ezp/v2/user/users",
"User": [
{
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/79",
"_id": 79,
"_remoteId": "bcf0764b417f05af21852a1f03fb1f13",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/4"
},
"name": "Jose Vargas",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/79/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
},
"Ma
Update User ¶
PATCH /user/users/{userId}
Updates a User.
Header parameters
Accept
If set, the updated User is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.User+xml
application/vnd.ez.api.User+json
|
Content-Type
The UserUpdate schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserUpdate+json
application/vnd.ez.api.UserUpdate+xml
|
If-Match
Performs a PATCH only if the specified ETag is the current one.
| Property | Value |
|---|---|
| Type | string |
| Examples |
ETag
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - User updated. |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to update the User. |
| 404 |
Error - the User does not exist. |
| 412 |
Error - the current ETag does not match with the provided one in the If-Match header. |
Types
| Type | Description |
|---|---|
| UserUpdate | |
| User | This class represents a User value. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<User media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/79" id="79" remoteId="bcf0764b417f05af21852a1f03fb1f13">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/4"/>
<name>Jose Vargas</name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/79/versions"/>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/2"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/5/12/79"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/79/locations"/>
<Groups media-type="application/vnd.ez.api.UserGroupRefList+xml" href="/api/ezp/v2/user/users/79/groups"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/10"/>
<publishDate>2021-06-29T08:23:42+
file_copy
{
"User": {
"_media-type": "application/vnd.ez.api.User+json",
"_href": "/api/ezp/v2/user/users/79",
"_id": 79,
"_remoteId": "bcf0764b417f05af21852a1f03fb1f13",
"ContentType": {
"_media-type": "application/vnd.ez.api.ContentType+json",
"_href": "/api/ezp/v2/content/types/4"
},
"name": "Jose Vargas",
"Versions": {
"_media-type": "application/vnd.ez.api.VersionList+json",
"_href": "/api/ezp/v2/content/objects/79/versions"
},
"Section": {
"_media-type": "application/vnd.ez.api.Section+json",
"_href": "/api/ezp/v2/content/sections/2"
},
"MainLocation": {
"_media-type": "application/vnd.ez.api.Location+json",
"_href": "/api/ezp/v2/content/locations/1/5/12/79"
},
"Locations": {
"_media-type": "application/vnd.ez.api.LocationList+json",
"_href": "/api/ezp/v2/co
Delete User ¶
DELETE /user/users/{userId}
Deletes the given User.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content. |
| 401 |
Error - the user is not authorized to delete this User. |
| 403 |
Error - the user is the same as the authenticated User. |
| 404 |
Error - the User does not exist. |
Load Groups of User ¶
GET /user/users/{userId}/groups
Returns a list of User Groups the User belongs to. The returned list includes the resources for unassigning a User Group if the User is in multiple groups.
Header parameters
Accept
If set, the link list of User Groups is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroupRefList+xml
application/vnd.ez.api.UserGroupRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| offset | integer | The offset of the result set. |
| limit | integer | The number of Locations returned. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user has no permission to read User Groups. |
| 404 |
Error - the user does not exist. |
Types
| Type | Description |
|---|---|
| UserGroupRefList | Returns a list of the sub groups. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroupRefList media-type="application/vnd.ez.api.UserGroupRefList+xml" href="/api/ezp/v2/user/users/55/groups">
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/12">
<unassign href="/api/ezp/v2/user/users/55/groups/12" method="DELETE"/>
</UserGroup>
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/14">
<unassign href="/api/ezp/v2/user/users/55/groups/14" method="DELETE"/>
</UserGroup>
</UserGroupRefList>
Assign User Group ¶
POST /user/users/{userId}/groups
Assigns the User to a User Group.
Header parameters
Accept
If set, the link list of User Groups is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroupRefList+xml
application/vnd.ez.api.UserGroupRefList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| group | string | The new parent group resource of the User. |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to assign User Groups. |
| 403 |
Error - the new User Group does not exist or the User is already in this group. |
| 404 |
Error - the User does not exist. |
Types
| Type | Description |
|---|---|
| UserGroupRefList | Returns a list of the sub groups. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroupRefList media-type="application/vnd.ez.api.UserGroupRefList+xml" href="/api/ezp/v2/user/users/115/groups">
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/12">
<unassign href="/api/ezp/v2/user/users/79/groups/12" method="DELETE"/>
</UserGroup>
<UserGroup media-type="application/vnd.ez.api.UserGroup+xml" href="/api/ezp/v2/user/groups/1/5/13">
<unassign href="/api/ezp/v2/user/users/115/groups/13" method="DELETE"/>
</UserGroup>
</UserGroupRefList>
file_copy
{
"UserGroupRefList": {
"_media-type": "application/vnd.ez.api.UserGroupRefList+json",
"_href": "/api/ezp/v2/user/users/115/groups",
"UserGroup": [
{
"_media-type": "application/vnd.ez.api.UserGroup+json",
"_href": "/api/ezp/v2/user/groups/1/5/12",
"unassign": {
"_href": "/api/ezp/v2/user/users/115/groups/12",
"_method": "DELETE"
}
},
{
"_media-type": "application/vnd.ez.api.UserGroup+json",
"_href": "/api/ezp/v2/user/groups/1/5/13",
"unassign": {
"_href": "/api/ezp/v2/user/users/115/groups/13",
"_method": "DELETE"
}
}
]
}
}
/user/users/{userId}/groups/{groupId}
Unassign User Group ¶
DELETE /user/users/{userId}/groups/{groupId}
Unassigns the User from a User Group.
Header parameters
Accept
If set, the link list of User Groups is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.UserGroupRefList+xml
application/vnd.ez.api.UserGroupRefList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to unassign User Groups. |
| 403 |
Error - the User is not in the given group. |
| 404 |
Error - the User does not exist. |
Types
| Type | Description |
|---|---|
| UserGroupRefList | Returns a list of the sub groups. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<UserGroupRefList href="/user/users/45/groups"
media-type="application/vnd.ez.api.UserGroupRefList">
<UserGroup href="/user/groups/1/5/34" media-type="application/vnd.ez.api.UserGroup">
<unassign href="/user/users/45/groups/34" method="DELETE" />
</UserGroup>
<UserGroup href="/user/groups/1/5/88" media-type="application/vnd.ez.api.UserGroup">
<unassign href="/user/users/45/groups/88" method="DELETE" />
</UserGroup>
</UserGroupRefList>
Load Roles for User ¶
GET /user/users/{userId}/roles
Returns a list of all Roles assigned to the given User.
Header parameters
Accept
If set, the Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignmentList+xml
application/vnd.ez.api.RoleAssignmentList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - the user has no permission to read Roles. |
Types
| Type | Description |
|---|---|
| RoleAssignmentList | This value object represents a list of assignments of a User or User group to a role including a limitation. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignmentList media-type="application/vnd.ez.api.RoleAssignmentList+xml" href="/api/ezp/v2/user/users/115/roles">
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/users/115/roles/2">
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="1"/>
</values>
</limitation>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/2"/>
</RoleAssignment>
</RoleAssignmentList>
file_copy
{
"RoleAssignmentList": {
"_media-type": "application/vnd.ez.api.RoleAssignmentList+json",
"_href": "/api/ezp/v2/user/users/115/roles",
"RoleAssignment": [
{
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/users/115/roles/2",
"limitation": {
"_identifier": "Section",
"values": {
"ref": [
{
"_media-type": "application/vnd.ez.api.ref+json",
"_href": "1"
}
]
}
},
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/2"
}
}
]
}
}
Assign Role to User ¶
POST /user/users/{userId}/roles
Assigns a Role to a user.
Header parameters
Accept
If set, the updated Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignmentList+xml
application/vnd.ez.api.RoleAssignmentList+json
|
Content-Type
The RoleAssignInput schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignInput+json
application/vnd.ez.api.RoleAssignInput+xml
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - validation of limitation in RoleAssignInput fails. |
| 401 |
Error - the user is not authorized to assign this Role. |
Types
| Type | Description |
|---|---|
| RoleAssignInput | |
| RoleAssignmentList | This value object represents a list of assignments of a User or User group to a role including a limitation. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignInput>
<Role href="/api/ezp/v2/user/roles/2" media-type="application/vnd.ez.api.RoleAssignInput+xml"/>
<limitation identifier="Section">
<values>
<ref href="/api/ezp/v2/content/sections/1" media-type="application/vnd.ez.api.Section+xml" />
<ref href="/api/ezp/v2/content/sections/2" media-type="application/vnd.ez.api.Section+xml" />
</values>
</limitation>
</RoleAssignInput>
file_copy
{
"RoleAssignInput": {
"Role": {
"_href": "/api/ezp/v2/user/roles/2",
"_media-type": "application/vnd.ez.api.RoleAssignInput+xml",
"self-closing": "true"
},
"limitation": {
"_identifier": "Section",
"values": {
"ref": [
{
"_href": "/api/ezp/v2/content/sections/1",
"media-type": "application/vnd.ez.api.Section+xml",
"self-closing": "true"
},
{
"_href": "/api/ezp/v2/content/sections/2",
"_media-type": "application/vnd.ez.api.Section+xml",
"self-closing": "true"
}
]
}
}
}
}
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignmentList media-type="application/vnd.ez.api.RoleAssignmentList+xml" href="/api/ezp/v2/user/users/115/roles">
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/users/115/roles/2">
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="1"/>
</values>
</limitation>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/2"/>
</RoleAssignment>
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/users/115/roles/2">
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="2"/>
</values>
</limitation>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/2"/>
</RoleAssignment>
</RoleAss
file_copy
{
"RoleAssignmentList": {
"_media-type": "application/vnd.ez.api.RoleAssignmentList+json",
"_href": "/api/ezp/v2/user/users/115/roles",
"RoleAssignment": [
{
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/users/115/roles/2",
"limitation": {
"_identifier": "Section",
"values": {
"ref": [
{
"_media-type": "application/vnd.ez.api.ref+json",
"_href": "2"
}
]
}
},
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/2"
}
},
{
"_media-type": "application/vnd.ez.api.RoleAssign
Load User Role Assignment ¶
GET /user/users/{userId}/roles/{roleId}
Returns a Role assignment to the given User.
Header parameters
Accept
If set, the Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignment+xml
application/vnd.ez.api.RoleAssignment+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Role assignment to the given User Group. |
| 401 |
Error - the user has no permission to read Roles. |
Types
| Type | Description |
|---|---|
| RoleAssignment | This value object represents an assignment of a User or User group to a role including a limitation. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignment media-type="application/vnd.ez.api.RoleAssignment+xml" href="/api/ezp/v2/user/users/113/roles/3">
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="6"/>
</values>
</limitation>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/3"/>
</RoleAssignment>
file_copy
{
"RoleAssignment": {
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/users/113/roles/3",
"limitation": {
"_identifier": "Section",
"values": {
"ref": [
{
"_media-type": "application/vnd.ez.api.ref+json",
"_href": "6"
}
]
}
},
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/3"
}
}
}
Unassign Role from User ¶
DELETE /user/users/{userId}/roles/{roleId}
The given Role is removed from the user.
Header parameters
Accept
If set, the updated Role assignment list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleAssignmentList+xml
application/vnd.ez.api.RoleAssignmentList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user is not authorized to delete this Content Type. |
Types
| Type | Description |
|---|---|
| RoleAssignmentList | This value object represents a list of assignments of a User or User group to a role including a limitation. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleAssignmentList href="/user/groups/1/5/65/roles" media-type="application/vnd.ez.api.RoleAssignmentList+xml">
<RoleAssignment href="/user/groups/1/5/65/roles/5" media-type="application/vnd.ez.api.RoleAssignment+xml">
<Role href="/user/roles/5" media-type="application/vnd.ez.api.Role+xml"/>
</RoleAssignment>
<RoleAssignment href="/user/groups/1/5/65/roles/11" media-type="application/vnd.ez.api.RoleAssignment+xml">
<limitation identifier="Section">
<values>
<ref href="/content/sections/1" media-type="application/vnd.ez.api.Section+xml" />
<ref href="/content/sections/4" media-type="application/vnd.ez.api.Section+xml" />
</values>
</limitation>
<Role href="/user/roles/11" media-type="application/vnd.ez.api.Role+xml"/>
</RoleAssignment>
</RoleAssignmentList>
file_copy
{
"RoleAssignmentList": {
"_media-type": "application/vnd.ez.api.RoleAssignmentList+json",
"_href": "/api/ezp/v2/user/users/57/roles",
"RoleAssignment": [
{
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/users/57/roles/1",
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/1"
}
},
{
"_media-type": "application/vnd.ez.api.RoleAssignment+json",
"_href": "/api/ezp/v2/user/users/57/roles/2",
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/2"
}
}
]
}
}
/user/roles
Load Roles ¶
GET /user/roles
Returns a list of all Roles.
Header parameters
Accept
If set, the user list returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleList+xml
application/vnd.ez.api.RoleList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| identifier | string | Restricts the result to a list containing the Role with the given identifier. If the Role is not found an empty list is returned. |
| offset | integer | The offset of the result set. |
| limit | integer | Only limit items will be returned started by offset. |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - list of all Roles. |
| 401 |
Error - the user has no permission to read Roles. |
Types
| Type | Description |
|---|---|
| RoleList | This class represents a list roles. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<RoleList media-type="application/vnd.ez.api.RoleList+xml" href="/api/ezp/v2/user/roles">
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/1">
<identifier>Anonymous</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/1/policies"/>
</Role>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/2">
<identifier>Administrator</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/2/policies"/>
</Role>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/3">
<identifier>Editor</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/3/policies"/>
</Role>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/4">
<identifi
file_copy
{
"RoleList": {
"_media-type": "application/vnd.ez.api.RoleList+json",
"_href": "/api/ezp/v2/user/roles",
"Role": [
{
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/1",
"identifier": "Anonymous",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/1/policies"
}
},
{
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/2",
"identifier": "Administrator",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/2/policies"
}
},
{
"_media-type": "application/vnd.ez.api.Role+json",
Create Role or Role draft ¶
POST /user/roles
Creates a new Role or Role draft.
Header parameters
Accept
If set, the new user is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Role+xml
application/vnd.ez.api.Role+json
application/vnd.ez.api.RoleDraft+xml
application/vnd.ez.api.RoleDraft+json
|
Content-Type
The RoleInput schema encoded in XML or JSON.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleInput+json
application/vnd.ez.api.RoleInput+xml
|
Query parameters
| Property | Type | Value |
|---|---|---|
| publish | boolean | If true the Role is published after creation. |
Possible responses
| Code | Description |
|---|---|
| 201 | |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to create a Role or a Role draft. |
Types
| Type | Description |
|---|---|
| Role | This class represents a role. |
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/19">
<identifier>NewRole</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/19/policies"/>
</Role>
file_copy
{
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/21",
"identifier": "NewRole",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/21/policies"
}
}
}
Load Role ¶
GET /user/roles/{id}
Loads a Role for the given ID.
Header parameters
Accept
If set, the user list returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Role+xml
application/vnd.ez.api.Role+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Role for the given ID. |
| 401 |
Error - the user has no permission to read Roles. |
| 404 |
Error - the Role does not exist. |
Types
| Type | Description |
|---|---|
| Role | This class represents a role. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/21">
<identifier>NewRole</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/21/policies"/>
</Role>
file_copy
{
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/21",
"identifier": "NewRole",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/21/policies"
}
}
}
Create Role Draft ¶
POST /user/roles/{id}
Creates a new Role draft from an existing Role.
Header parameters
Accept
If set, the new user is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Role+xml
application/vnd.ez.api.Role+json
|
Content-Type
The RoleInput schema encoded in XML or JSON.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleInput+json
application/vnd.ez.api.RoleInput+xml
|
Possible responses
| Code | Description |
|---|---|
| 201 | |
| 401 |
Error - the user is not authorized to create a Role or a Role draft |
Types
| Type | Description |
|---|---|
| RoleDraft | This class represents a draft of a role, extends Role. |
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Role href="/user/roles/11" media-type="application/vnd.ez.api.RoleDraft+xml">
<identifier>MyRole</identifier>
<Policies href="/user/roles/11/policies" media-type="application/vnd.ez.api.PolicyList+xml"/>
</Role>
file_copy
{
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/6",
"identifier": "Editor",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/6/policies"
}
}
}
Update Role ¶
PATCH /user/roles/{id}
Updates a Role. PATCH or POST with header X-HTTP-Method-Override PATCH
Header parameters
Accept
If set, the new user is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Role+xml
application/vnd.ez.api.Role+json
|
Content-Type
The RoleInput schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleInput+json
application/vnd.ez.api.RoleInput+xml
|
If-Match
ETag Causes to patch only if the specified ETag is the current one. Otherwise a 412 is returned.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Role updated |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to update the Role. |
| 412 |
Error - the current ETag does not match with the provided one in the If-Match header. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/5">
<identifier>NewIdentifier</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/5/policies"/>
</Role>
file_copy
{
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/21",
"identifier": "NewIdentifier",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/21/policies"
}
}
}
Delete Role ¶
DELETE /user/roles/{id}
The given Role and all assignments to Users or User Groups are deleted.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content. |
| 401 |
Error - the User is not authorized to delete this Role. |
Load Role draft ¶
GET /user/roles/{id}/draft
Loads a Role draft by original Role ID.
Header parameters
Accept
If set, the User list returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Role+xml
application/vnd.ez.api.Role+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Role draft by original Role ID. |
| 401 |
Error - the user has no permission to read Roles. |
| 404 |
Error - there is no draft or Role with the given ID. |
Types
| Type | Description |
|---|---|
| Role | This class represents a role. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/27">
<identifier>Anonymous</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/27/policies"/>
</Role>
file_copy
{
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/27",
"identifier": "Anonymous",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/27/policies"
}
}
}
Update Role draft ¶
PATCH /user/roles/{id}/draft
Updates a Role draft. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated Role is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Role+xml
application/vnd.ez.api.Role+json
|
Content-Type
The RoleInput schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.RoleInput+json
application/vnd.ez.api.RoleInput+xml
|
If-Match
Performs a PATCH only if the specified ETag is the current one. Otherwise a 412 is returned.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Role draft updated. |
| 400 |
Error - the input does not match the input schema definition. |
| 401 |
Error - the user is not authorized to update the Role. |
| 404 |
Error - there is no draft or Role with the given ID. |
| 412 |
Error - the current ETag does not match with the one provided in the If-Match header. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Role media-type="application/vnd.ez.api.Role+xml" href="/api/ezp/v2/user/roles/9">
<identifier>UpdatedIdentifier</identifier>
<Policies media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/9/policies"/>
</Role>
file_copy
{
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/6",
"identifier": "UpdatedIdentifier",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/6/policies"
}
}
}
Publish Role draft ¶
PUBLISH /user/roles/{id}/draft
Publishes a Role draft. PUBLISH or POST with header X-HTTP-Method-Override PUBLISH.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content. |
| 401 |
Error - the user is not authorized to publish this Content Type draft. |
| 403 |
Error - the Content Type draft is not complete e.g. there is no Field definition provided. |
| 404 |
Error - there is no draft or Role with the given ID. |
Delete Role draft ¶
DELETE /user/roles/{id}/draft
The given Role draft is deleted.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content. |
| 401 |
Error - the user is not authorized to delete this Role. |
Load Policies ¶
GET /user/roles/{id}/policies
Loads Policies for the given Role.
Header parameters
Accept
If set, the Policy list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.PolicyList+xml
application/vnd.ez.api.PolicyList+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user has no permission to read Roles. |
| 404 |
Error - the Role does not exist. |
Types
| Type | Description |
|---|---|
| PolicyList | List of policies. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<PolicyList media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/roles/1/policies">
<Policy media-type="application/vnd.ez.api.Policy+xml" href="/api/ezp/v2/user/roles/1/policies/349">
<id>349</id>
<module>content</module>
<function>read</function>
<limitations>
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="1"/>
<ref media-type="application/vnd.ez.api.ref+xml" href="3"/>
<ref media-type="application/vnd.ez.api.ref+xml" href="6"/>
</values>
</limitation>
</limitations>
</Policy>
<Policy media-type="application/vnd.ez.api.Policy+xml" href="/api/ezp/v2/user/roles/1/policies/350">
<id>350</id>
<module>user</module>
<function>login</function>
<limitations>
<limitation iden
file_copy
{
"PolicyList": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/1/policies",
"Policy": [
{
"_media-type": "application/vnd.ez.api.Policy+json",
"_href": "/api/ezp/v2/user/roles/1/policies/349",
"id": 349,
"module": "content",
"function": "read",
"limitations": {
"limitation": [
{
"_identifier": "Section",
"values": {
"ref": [
{
"_media-type": "application/vnd.ez.api.ref+json",
"_href": "1"
},
{
"_media-type": "application/vnd.ez.api.ref+json",
Delete Policies ¶
DELETE /user/roles/{id}/policies
All Policies of the given Role are deleted.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - all Policies of the given Role are deleted. |
| 401 |
Error - the user is not authorized to delete this Content Type. |
Create Policy ¶
POST /user/roles/{id}/policies
Creates a Policy
Header parameters
Accept
If set, the updated Policy is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Policy+xml
application/vnd.ez.api.Policy+json
|
Content-Type
If set, the updated Policy is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.PolicyCreate+xml
application/vnd.ez.api.PolicyCreate+json
|
Possible responses
| Code | Description |
|---|---|
| 201 | |
| 400 |
Error - the input does not match the input schema definition or validation of limitation in PolicyCreate fails. |
| 401 |
Error - the user is not authorized to create the Policy. |
| 404 |
Error - the Role does not exist. |
Types
| Type | Description |
|---|---|
| PolicyCreate | |
| Policy | This class represents a policy value. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<PolicyCreate>
<module>content</module>
<function>create</function>
<limitations>
<limitation identifier="Class">
<values>
<ref href="/api/ezp/v2/content/types/13"/>
</values>
</limitation>
<limitation identifier="ParentClass">
<values>
<ref href="/api/ezp/v2/content/types/12"/>
</values>
</limitation>
</limitations>
</PolicyCreate>
Code: 201
file_copy
<Policy href="/user/roles/11/policies/55" media-type="application/vnd.ez.api.Policy+xml">
<id>55</id>
<module>content</module>
<function>create</function>
<limitations>
<limitation identifier="Class">
<values>
<ref href="/content/types/13"/>
</values>
</limitation>
<limitation identifier="ParentClass">
<values>
<ref href="/content/types/12"/>
</values>
</limitation>
</limitations>
</Policy>
Update Policy ¶
PATCH /user/roles/{id}/policies/{id}
Updates a Policy. PATCH or POST with header X-HTTP-Method-Override PATCH.
Header parameters
Accept
If set, the updated Policy is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Policy+xml
application/vnd.ez.api.Policy+json
|
Content-Type
If set, the updated Policy is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.PolicyUpdate+xml
application/vnd.ez.api.PolicyUpdate+json
|
If-Match
Causes to patch only if the specified ETag is the current one. Otherwise a 412 is returned.
| Property | Value |
|---|---|
| Type | string |
| Examples |
ETag
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 400 |
Error - the input does not match the input schema definition or validation of limitation in PolicyUpdate fails. |
| 401 |
Error - the user is not authorized to update the Policy. |
| 404 |
Error - the Role does not exist. |
| 412 |
Error - the current ETag does not match with the one provided in the If-Match header. |
Types
| Type | Description |
|---|---|
| PolicyUpdate | |
| Policy | This class represents a policy value. |
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<PolicyUpdate>
<limitations>
<limitation identifier="Class">
<values>
<ref href="/content/types/14"/>
</values>
</limitation>
<limitation identifier="ParentClass">
<values>
<ref href="/content/types/10"/>
</values>
</limitation>
</limitations>
</PolicyUpdate>
Code: 200
file_copy
<Policy href="/user/roles/11/policies/55" media-type="application/vnd.ez.api.Policy+xml">
<id>55</id>
<module>content</module>
<function>create</function>
<limitations>
<limitation identifier="Class">
<values>
<ref href="/content/types/14"/>
</values>
</limitation>
<limitation identifier="ParentClass">
<values>
<ref href="/content/types/10"/>
</values>
</limitation>
</limitations>
</Policy>
Load Policy ¶
GET /user/roles/{id}/policies/{id}
Loads a Policy for the given module and function.
Header parameters
Accept
If set, the Policy is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Policy+xml
application/vnd.ez.api.Policy+json
|
If-None-Match
ETag
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - the user has no permission to read Roles. |
| 404 |
Error - the Role or Policy does not exist. |
Types
| Type | Description |
|---|---|
| Policy | This class represents a policy value. |
Code: 200
file_copy
<Policy href="/user/roles/11/policies/45" media-type="application/vnd.ez.api.Policy+xml">
<id>45</id>
<module>content</module>
<function>create</function>
<limitations>
<limitation identifier="Class">
<values>
<ref href="/content/types/10" media-type="application/vnd.ez.api.ContentType+xml" />
<ref href="/content/types/11" media-type="application/vnd.ez.api.ContentType+xml" />
<ref href="/content/types/12" media-type="application/vnd.ez.api.ContentType+xml" />
</values>
</limitation>
<limitation identifier="ParentClass">
<values>
<ref href="/content/types/4" media-type="application/vnd.ez.api.ContentType+xml" />
</values>
</limitation>
</limitations>
</Policy>
file_copy
{
"Policy": {
"_media-type": "application/vnd.ez.api.Policy+json",
"_href": "/api/ezp/v2/user/roles/1/policies/352",
"id": 352,
"module": "user",
"function": "register"
}
}
Delete Policy ¶
DELETE /user/roles/{id}/policies/{id}
Deletes given Policy.
Possible responses
| Code | Description |
|---|---|
| 204 |
No Content - the given Policy is deleted. |
| 401 |
Error - the user is not authorized to delete this Content Type. |
| 404 |
Error - the Role or Policy does not exist. |
/user/policies
/user/policies
List Policies for User ¶
GET /user/policies
Search all Policies which are applied to a given User.
Header parameters
Accept
If set, the Policy list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.PolicyList+xml
application/vnd.ez.api.PolicyList+json
|
Query parameters
| Property | Type | Value |
|---|---|---|
| userId | string | The User ID. |
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - Policies which are applied to a given User. |
| 401 |
Error - the user has no permission to read Roles. |
Types
| Type | Description |
|---|---|
| PolicyList | List of policies. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<PolicyList media-type="application/vnd.ez.api.PolicyList+xml" href="/api/ezp/v2/user/policies">
<Policy media-type="application/vnd.ez.api.Policy+xml" href="/api/ezp/v2/user/roles/1/policies/349">
<id>349</id>
<module>content</module>
<function>read</function>
<limitations>
<limitation identifier="Section">
<values>
<ref media-type="application/vnd.ez.api.ref+xml" href="1"/>
<ref media-type="application/vnd.ez.api.ref+xml" href="3"/>
<ref media-type="application/vnd.ez.api.ref+xml" href="6"/>
</values>
</limitation>
</limitations>
</Policy>
<Policy media-type="application/vnd.ez.api.Policy+xml" href="/api/ezp/v2/user/roles/1/policies/350">
<id>350</id>
<module>user</module>
<function>login</function>
<limitations>
<limitation identifier="
file_copy
{
"PolicyList": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/policies",
"Policy": [
{
"_media-type": "application/vnd.ez.api.Policy+json",
"_href": "/api/ezp/v2/user/roles/1/policies/349",
"id": 349,
"module": "content",
"function": "read",
"limitations": {
"limitation": [
{
"_identifier": "Section",
"values": {
"ref": [
{
"_media-type": "application/vnd.ez.api.ref+json",
"_href": "1"
},
{
"_media-type": "application/vnd.ez.api.ref+json",
/user/sessions
/user/sessions
Create session (login a User) ¶
POST /user/sessions
Performs a login for the user or checks if session exists and returns the session and session cookie. The client will need to remember both session name/ID and CSRF token as this is for security reasons not exposed via GET.
Header parameters
Accept
If set, the session is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Session+xml
application/vnd.ez.api.Session+json
|
Content-Type
The SessionInput schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.SessionInput+xml
application/vnd.ez.api.SessionInput+json
|
Cookie
Only needed for session's checking {sessionName}={sessionID}.
| Property | Value |
|---|---|
| Type | string |
X-CSRF-Token
Only needed for session's checking. The {csrfToken} needed on all unsafe http methods with session.
| Property | Value |
|---|---|
| Type | string |
Possible responses
Types
| Type | Description |
|---|---|
| SessionInput | |
| Session | Value for session. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Session href="/user/sessions/sessionID" media-type="application/vnd.ez.api.Session+xml">
<name>eZSSID</name>
<identifier>go327ij2cirpo59pb6rrv2a4el2</identifier>
<csrfToken>23lkneri34ijajedfw39orj3j93</csrfToken>
<User href="/user/users/14" media-type="vnd.ez.api.User+xml"/>
</Session>
file_copy
{
"Session": {
"name": "eZSSID",
"identifier": "go327ij2cirpo59pb6rrv2a4el2",
"csrfToken": "23lkneri34ijajedfw39orj3j93",
"User": {
"_href": "/user/users/14",
"_media-type": "application/vnd.ez.api.User+json"
}
}
}
Code: 201
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Session href="/user/sessions/sessionID" media-type="application/vnd.ez.api.Session+xml">
<name>eZSSID</name>
<identifier>go327ij2cirpo59pb6rrv2a4el2</identifier>
<csrfToken>23lkneri34ijajedfw39orj3j93</csrfToken>
<User href="/user/users/14" media-type="vnd.ez.api.User+xml"/>
</Session>
file_copy
{
"Session": {
"name": "eZSSID",
"identifier": "go327ij2cirpo59pb6rrv2a4el2",
"csrfToken": "23lkneri34ijajedfw39orj3j93",
"User": {
"_href": "/user/users/14",
"_media-type": "application/vnd.ez.api.User+json"
}
}
}
/user/sessions/{sessionId}
Delete session (logout a User) ¶
DELETE /user/sessions/{sessionId}
The user session is removed i.e. the user is logged out.
Header parameters
Cookie
{sessionName}={sessionID}
| Property | Value |
|---|---|
| Type | string |
X-CSRF-Token
The {csrfToken} needed on all unsafe http methods with session.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 204 |
OK - session deleted. |
| 404 |
Error - the session does not exist. |
/user/sessions/{sessionId}/refresh
Refresh session ¶
POST /user/sessions/{sessionId}/refresh
Get the session's User information.
Header parameters
Cookie
{sessionName}={sessionID}
| Property | Value |
|---|---|
| Type | string |
X-CSRF-Token
The {csrfToken} needed on all unsafe http methods with session.
| Property | Value |
|---|---|
| Type | string |
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 404 |
Error - the session does not exist. |
Types
| Type | Description |
|---|---|
| Session | Value for session. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<Session href="user/sessions/go327ij2cirpo59pb6rrv2a4el2/refresh" media-type="application/vnd.ez.api.Session+xml">
<name>eZSSID</name>
<identifier>go327ij2cirpo59pb6rrv2a4el2</identifier>
<csrfToken>23lkneri34ijajedfw39orj3j93</csrfToken>
<User href="/user/users/14" media-type="vnd.ez.api.User+xml"/>
</Session>
file_copy
{
"Session": {
"name": "eZSSID",
"identifier": "go327ij2cirpo59pb6rrv2a4el2",
"csrfToken": "23lkneri34ijajedfw39orj3j93",
"User": {
"_href": "/user/users/14",
"_media-type": "application/vnd.ez.api.User+json"
}
}
}
/user/token
/user/token/jwt
Create JWT token ¶
POST /user/token/jwt
Creates JWT authentication token.
Header parameters
Accept
If set, the token is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.JWT+xml
application/vnd.ez.api.JWT+json
|
Content-Type
The SessionInput schema encoded in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.JWTInput+xml
application/vnd.ez.api.JWTInput+json
|
Possible responses
| Code | Description |
|---|---|
| 200 | |
| 401 |
Error - Unauthorized |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<JWT media-type="application/vnd.ez.api.JWT+xml" token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDI4NDA3NjEsImV4cCI6MTYwMjg0NDM2MSwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiYWRtaW4ifQ.LsmdVjad7wMwVQUo4vSftT0zHbJyArOMd23b417E2jI"/>
file_copy
{
"JWT": {
"_media-type": "application/vnd.ez.api.JWT+json",
"_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDI4NDA3ODAsImV4cCI6MTYwMjg0NDM4MCwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiYWRtaW4ifQ.0LHa799HwSwwfDBZd2V0q2xHwGt86PpyZamKnXHQyYI"
}
}
Services ¶
/services/countries
Countries list ¶
GET /services/countries
Gives access to an ISO-3166 formatted list of world countries. It is useful when presenting a country options list from any application.
Header parameters
Accept
If set, the country list is returned in XML or JSON format.
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.CountriesLis+xml
application/vnd.ez.api.CountriesLis+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| CountryList | This class is representing an ISO-3166 formatted list of world countries. |
Code: 200
file_copy
<?xml version="1.0" encoding="UTF-8"?>
<CountryList media-type="application/vnd.ez.api.CountryList+xml">
<Country media-type="application/vnd.ez.api.Country+xml" id="AF">
<name>Afghanistan</name>
<Alpha2>AF</Alpha2>
<Alpha3>AFG</Alpha3>
<IDC>93</IDC>
</Country>
<Country media-type="application/vnd.ez.api.Country+xml" id="AX">
<name>Åland</name>
<Alpha2>AX</Alpha2>
<Alpha3>ALA</Alpha3>
<IDC>358</IDC>
</Country>
<Country media-type="application/vnd.ez.api.Country+xml" id="AL">
<name>Albania</name>
<Alpha2>AL</Alpha2>
<Alpha3>ALB</Alpha3>
<IDC>355</IDC>
</Country>
<Country media-type="application/vnd.ez.api.Country+xml" id="DZ">
<name>Algeria</name>
<Alpha2>DZ</Alpha2>
<Alpha3>DZA</Alpha3>
<IDC>213</IDC>
</Country>
<Country media-type="application/vnd.ez.api.Country+xml" id="AS">
<name>American Samoa</name>
<Alp
eCommerce API ¶
/commerce/basket
/commerce/basket
Read list of baskets ¶
GET /commerce/basket
Returns baskets for the current user. Only "storedBasket" and "wishList" types are handled. Others will return validation error.
Query parameters
| Property | Type | Value |
|---|---|---|
| type | string | Either "storedBasket" or "wishList". "storedBasket" is assumed if not passed. |
Types
| Type | Description |
|---|---|
| BasketListResponse | |
| ValidationResponse |
Code: 200
file_copy
{
"BasketListResponse": {
"_media-type": "application\/vnd.ez.api.BasketListResponse+json",
"basketList": [
{
"_media-type": "application\/vnd.ez.api.stdClass+json",
"basketId": 5,
"state": "new",
"type": "storedBasket",
"sessionId": "mrt02u8u2rbh6aeeibm7rj0i1j",
"userId": 14,
"basketName": "test",
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json"
},
"totals": [
{
"_media-type": "application\/vnd.ez.api.BasketTotals+json"
},
{
"_media-type": "application\/vnd.ez.api.BasketTotals+json"
}
],
"totalsSum": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json"
},
"dateLastPriceCalculation": {
"_media-type": "application\/vnd.ez.api.DateTime
/commerce/basket/current
Get current basket ¶
GET /commerce/basket/current
Returns a Basket instance for the current session. If there isn't one, a new one will be created.
Header parameters
Accept
| Property | Value |
|---|---|
| Type | string |
| Examples |
application/vnd.ez.api.Basket+json
|
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| Basket |
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
/commerce/basket/current/{basketId}
Copy basket to user session ¶
COPY /commerce/basket/current/{basketId}
Adds basket lines into current basket in user session, if any, using basket stored in permanent storage.
Types
| Type | Description |
|---|---|
| Basket | |
| ValidationResponse |
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
Code: 400
file_copy
{
"ValidationResponse": {
"_media-type": "application\/vnd.ez.api.ValidationResponse+json",
"messages": {
"_error": [
"Access denied"
]
}
}
}
/commerce/basket/current/referencenumber
/commerce/basket/current/remark
/commerce/basket/current/party/{partyType}
Update party information in the basket ¶
PATCH /commerce/basket/current/party/{partyType}
Updates party (buyer, delivery, invoice) information in the basket.
Types
| Type | Description |
|---|---|
| PartyTypeInput | |
| Basket | |
| ValidationResponse |
file_copy
{
"PartyData": {
"_data-type":"invoice",
"_media-type":"application/vnd.ez.api.Party+json",
"PartyIdentification":[],
"PartyName":[
{
"_media-type":"application/vnd.ez.api.PartyPartyName+json",
"Name":"Testerin"
},
{
"_media-type":"application/vnd.ez.api.PartyPartyName+json",
"Name":""
}
],
"PostalAddress":{
"_media-type":"application/vnd.ez.api.PartyPostalAddress+json",
"StreetName":"Teststr. 11",
"AdditionalStreetName":"",
"BuildingNumber":null,
"CityName":"Testingen",
"PostalZone":"1111",
"CountrySubentity":"Dummy",
"CountrySubentityCode":null,
"AddressLine":[],
"Country":{
"_media-type":"application/vnd.ez.api.PartyPostalAddressCountry+json",
"IdentificationCode":"NO",
"Name":null
},
"Department":null,
"SesExtension":{}
},
"Contact":{
"_media-type":"application/vnd.ez.api.Contact+json",
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
/commerce/basket/current/shippingmethod
Update shipping information in current basket ¶
PATCH /commerce/basket/current/shippingmethod
Updates shipping information in the current basket.
Types
| Type | Description |
|---|---|
| ShippingMethodData | |
| Basket | |
| ValidationResponse |
file_copy
{
"ShippingMethodData": {
"shippingMethod": "mail"
}
}
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
/commerce/basket/current/paymentmethod
Update payment information in current basket ¶
PATCH /commerce/basket/current/paymentmethod
Updates payment information in the current basket.
Types
| Type | Description |
|---|---|
| PaymentMethodData | |
| Basket | |
| ValidationResponse |
file_copy
{
"PaymentMethodData": {
"paymentMethod": "invoice"
}
}
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
/commerce/basket/current/voucher
Update and check voucher in current basket ¶
PATCH /commerce/basket/current/voucher
Updates and checks voucher in current basket.
Types
| Type | Description |
|---|---|
| VoucherData | |
| Basket | |
| ValidationResponse |
file_copy
{
"VoucherData": {
"voucherCode": "1234567"
}
}
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
/commerce/basket/current/line
Add products to current basket ¶
POST /commerce/basket/current/line
Adds products to the current basket.
Types
| Type | Description |
|---|---|
| BasketLineData | |
| Basket | |
| ValidationResponse |
file_copy
{
"BasketLineData": [
{
"sku":"1000",
"quantity":"3",
"isVariant":"0",
"variantCode":""
}
]
}
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
Code: 400
file_copy
{
"ValidationResponse": {
"_media-type": "application\/vnd.ez.api.ValidationResponse+json",
"messages": {
"_error": [
"Product with the sku: foo not found"
]
}
}
}
Get Basket by ID ¶
GET /commerce/basket/{basketId}
Gets basket by ID.
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| Basket |
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 7,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "storedBasket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": "sbnla08g8seeoua51v46jns3vc",
"userId": 14,
"basketName": "foo",
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 07:40:00"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 07:40:00"
},
"shop": null,
"requirePriceUpdate": false,
"totals": null,
"totalsSum": null,
"currency": null,
"totalsSumNet": null,
"totalsSumGross": null,
"additionalLines": null,
"lines": [],
"dateLastPriceCalculation": null,
"shippingMethod": null,
"pay
Delete Basket by ID (removed) ¶
DELETE /commerce/basket/{basketId}
Deletes basket by ID. Removed as of Ibexa DXP 4.4, use DELETE /cart/{identifier} instead.
Possible responses
| Code | Description |
|---|---|
| 200 |
OK - The basket has been deleted |
| 400 |
Error - The basket does not exist |
| 403 |
Error - Access denied |
/commerce/basket/{basketId}/name
Update the name of the stored basket ¶
PATCH /commerce/basket/{basketId}/name
Updates the name of the stored basket.
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| BasketHeaderData | |
| Basket |
file_copy
{
"BasketHeaderData": {
"value": "foobar"
}
}
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
/commerce/basket/{basketId}/note
Update the note of the stored basket ¶
PATCH /commerce/basket/{basketId}/note
Updates the note of the stored basket.
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| BasketHeaderData | |
| Basket |
file_copy
{
"BasketHeaderData": {
"value": "foobar"
}
}
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
/commerce/basket/{basketId}/line
Add products to stored basket ¶
POST /commerce/basket/{basketId}/line
Adds products to the stored basket.
Types
| Type | Description |
|---|---|
| BasketLineData | |
| Basket | |
| ValidationResponse |
file_copy
{
"BasketLineData": [
{
"sku":"1000",
"quantity":"3",
"isVariant":"0",
"variantCode":""
}
]
}
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
Code: 400
file_copy
{
"ValidationResponse": {
"_media-type": "application\/vnd.ez.api.ValidationResponse+json",
"messages": {
"_error": [
"Product with the sku: foo not found"
]
}
}
}
/commerce/basket/{basketId}/line/{lineId}
Delete a line from a stored basket ¶
DELETE /commerce/basket/{basketId}/line/{lineId}
Types
| Type | Description |
|---|---|
| Basket | |
| ValidationResponse |
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
Code: 400
file_copy
{
"ValidationResponse": {
"_media-type": "application\/vnd.ez.api.ValidationResponse+json",
"messages": {
"_error": [
"msg.invalid_basket_line_data"
]
}
}
}
/commerce/basket/{basketName}
Create a new persisted basket ¶
POST /commerce/basket/{basketName}
Creates a new persisted basket.
Types
| Type | Description |
|---|---|
| Basket | |
| ValidationResponse |
Code: 200
file_copy
{
"Basket": {
"_media-type": "application\/vnd.ez.api.Basket+json",
"basketId": 1,
"originId": null,
"erpOrderId": null,
"guid": null,
"state": "new",
"type": "basket",
"erpFailCounter": null,
"erpFailErrorLog": null,
"sessionId": null,
"userId": 14,
"basketName": null,
"invoiceParty": null,
"deliveryParty": null,
"buyerParty": null,
"remark": null,
"dateCreated": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:33:26"
},
"dateLastModified": {
"_media-type": "application\/vnd.ez.api.DateTime+json",
"string": "2021-03-12 10:35:22"
},
"shop": "MAIN",
"requirePriceUpdate": false,
"totals": {
"lines": {
"_media-type": "application\/vnd.ez.api.BasketTotals+json",
"name": "lines",
"totalNet": 0,
"totalGross": 0,
"vatList": {
"19": 0
},
"groupType": "order",
"curre
Code: 400
file_copy
{
"ValidationResponse": {
"_media-type": "application\/vnd.ez.api.ValidationResponse+json",
"messages": {
"_error": [
"msg.duplicate_basket_name_not_allowed"
]
}
}
}
/commerce/checkout
/commerce/checkout/paymentmethods
Get list of payment methods ¶
GET /commerce/checkout/paymentmethods
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| PaymentMethodDataResponse |
Code: 200
file_copy
{
"PaymentMethodDataResponse": {
"_media-type": "application\/vnd.ez.api.PaymentMethodDataResponse+json",
"paymentMethods": {
"paypal": "paypal",
"invoice": "invoice"
},
"defaultMethod": "invoice"
}
}
/commerce/checkout/shippingmethods
Get list of shipping methods ¶
GET /commerce/checkout/shippingmethods
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| ShippingMethodDataResponse |
Code: 200
file_copy
{
"ShippingMethodDataResponse": {
"_media-type": "application\/vnd.ez.api.ShippingMethodDataResponse+json",
"shippingMethods": {
"standard": "standard",
"expressDel": "express_delivery"
},
"defaultMethod": "standard",
"shippingMethodsSorted": []
}
}
/commerce/customer/addresses/shipping
/commerce/customer/addresses/shipping
Get list of shipping addresses ¶
GET /commerce/customer/addresses/shipping
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| ShippingAddressesResponse |
Code: 200
file_copy
{
"ShippingAddressesResponse": {
"_media-type": "application\/vnd.ez.api.ShippingAddressesResponse+json",
"Parties": [
{
"_media-type": "application\/vnd.ez.api.Party+json",
"PartyIdentification": [],
"PartyName": [],
"PostalAddress": {
"_media-type": "application\/vnd.ez.api.PartyPostalAddress+json",
"StreetName": null,
"AdditionalStreetName": null,
"BuildingNumber": null,
"CityName": null,
"PostalZone": null,
"CountrySubentity": null,
"CountrySubentityCode": null,
"AddressLine": [],
"Country": {
"_media-type": "application\/vnd.ez.api.PartyPostalAddressCountry+json",
"IdentificationCode": null,
"Name": null
},
"Department": null,
"SesExtension": {}
},
"Contact": {
"_media-type": "application\/vnd.ez.api.Contact+json",
"ID": null,
/commerce/customerprice
/commerce/customerprice
Get customer prices for products ¶
POST /commerce/customerprice
Gets customer prices for the requested products.
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| CustomerPriceData | |
| PriceResponse |
file_copy
{
"PriceResponse": {
"_media-type": "application\/vnd.ez.api.PriceResponse+json",
"priceResponse": {
"_media-type": "application\/vnd.ez.api.priceResponse+json"
}
}
}
Code: 200
file_copy
{
"PriceResponse": {
"_media-type": "application\/vnd.ez.api.PriceResponse+json",
"priceResponse": {
"_media-type": "application\/vnd.ez.api.priceResponse+json"
}
}
}
/commerce/common/check_sku_file/{mode}
/commerce/common/check_sku_file/{mode}
Add to basket from CSV or Excel ¶
POST /commerce/common/check_sku_file/{mode}
Adds to basket a line from a CSV or Excel file.
/commerce/country
/commerce/country
Gets list of countries. ¶
GET /commerce/country
Possible responses
| Code | Description |
|---|---|
| 200 |
Types
| Type | Description |
|---|---|
| CountrySelectionResponse |
Code: 200
file_copy
{
"CountrySelectionResponse": {
"_media-type": "application\/vnd.ez.api.CountrySelectionResponse+json",
"countryOptions": {
"DZ": "Algeria",
"AU": "Australia",
"AT": "Austria",
"BE": "Belgium",
"BR": "Brazil",
"BG": "Bulgaria",
"CA": "Canada",
"CY": "Cyprus",
"CZ": "Czechia",
"DK": "Denmark",
"EE": "Estonia",
"SZ": "Eswatini",
"FI": "Finland",
"FR": "France",
"DE": "Germany",
"GR": "Greece",
"HU": "Hungary",
"IS": "Iceland",
"IN": "India",
"ID": "Indonesia",
"IE": "Ireland",
"IT": "Italy",
"KE": "Kenya",
"LV": "Latvia",
"LT": "Lithuania",
"MO": "Macao SAR China",
"MY": "Malaysia",
"MT": "Malta",
"MX": "Mexico",
"MZ": "Mozambique",
"NL": "Netherlands",
"NZ": "New Zealand",
"NG": "Nigeria",
"NO": "Norway",
"PH": "Philippines",
"PL": "Poland",
"PT": "Portugal",