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.

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 medi
                            
View more

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"
        },
        "createSes
                            
View more

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.

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"/>
            <Con
                            
View more

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,
           
                            
View more

/bookmark/{locationId}

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

/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
                            
View more

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></
                            
View more

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
                            
View more

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>
 
                            
View more

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": {
        
                            
View more
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.

/content/objects/{contentId}

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.

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.ap
                            
View more

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"
                            
View more
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>

                            
View more
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"/>
   
                            
View more
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.

/content/objects/{contentId}/currentversion

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.

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="/a
                            
View more

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": [
                    {
    
                            
View more
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.

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/e
                            
View more

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": [
                    {
        
                            
View more

/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.

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>
        
                            
View more

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",
                    "Versi
                            
View more

/content/objects/{contentId}/versions/{versionNo}

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.

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/e
                            
View more

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": [
                    {
        
                            
View more
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>

                            
View more
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>

                            
View more
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.

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/e
                            
View more

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": [
                    {
        
                            
View more
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.

/content/objects/{contentId}/versions/{versionNo}/relations

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.

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="/a
                            
View more

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": [
                    {
    
                            
View more
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.

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>
                            
View more

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"
    }
}
                            
View more

/content/objects/{contentId}/versions/{versionNo}/relations/{relationId}

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.

/content/objects/{contentId}/locations

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>
                            
View more

file_copy

                                {
    "LocationCreate": {
        "ParentLocation": {
            "_href": "/api/ezp/v2/content/locations/1/59"
        },
     "priority": "0",
            "hidden": false,
            "sortField": "PATH",
            "sortOrder": "ASC"
       
    }
}
                            
View more

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"/>
 
                            
View more

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",
        
                            
View more
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).

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>
                            
View more

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"
            }
        ]
    }
}
                            
View more

/content/objects/{contentId}/objectstates

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 Base struct for content create/update structs.

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>
                            
View more

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"
            }
        ]
    }
}
                            
View more
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.ObjectState+xml application/vnd.ez.api.ObjectState+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.ObjectStateUpdate+xml application/vnd.ez.api.ObjectStateUpdate+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
ObjectStateUpdate
ObjectState This class represents a Object state value.

/content/objectstategroups

/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.

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>accessibil
                            
View more

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"
                        }
                    ]
             
                            
View more
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>
                            
View more

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"
                }
            ]
        }
    }
}

                            
View more

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>

                            
View more

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"
                }
            ]
        }
    }
}
                            
View more

/content/objectstategroups/{objectStateGroupId}

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.

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>
                            
View more

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"
                }
            ]
        }
    }
}
                            
View more
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.

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>

                            
View more

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"
                }
            ]
        }
    }
}
                            
View more
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.

/content/objectstategroups/objectstates

List Object states

GET /content/objectstategroups/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.