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/62">
        <Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/62">
            <id>62</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/62/</pathString>
            <depth>2</depth>
            <childCount>0</childCount>
            <remoteId>5f1bb9f8ea33374082372d6970eccc4b</remoteId>
            <Children media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/2/62/children"/>
            <Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/
                            
View more

file_copy

                                {
    "BookmarkList": {
        "_media-type": "application/vnd.ez.api.BookmarkList+json",
        "count": 1,
        "items": [
            {
                "_media-type": "application/vnd.ez.api.Bookmark+json",
                "__href": "/api/ezp/v2/bookmark/2",
                "Location": {
                    "_media-type": "application/vnd.ez.api.Location+json",
                    "_href": "/api/ezp/v2/content/locations/1/2",
                    "id": 2,
                    "priority": 0,
                    "hidden": false,
                    "invisible": false,
                    "ParentLocation": {
                        "_media-type": "application/vnd.ez.api.Location+json",
                        "_href": "/api/ezp/v2/content/locations/1"
                    },
                    "pathString": "/1/2/",
                    "depth": 1,
                    "childCount": 4,
                    "remoteId": "f3e90596361e31d496d4026eb624c983",
         
                            
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
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
                            
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
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.
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="d2b6b7f5d0935c45456a80d3a154f2e7" id="54">
    <ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/2"/>
    <Name>test</Name>
    <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>515</id>
                <versionNo>1</versionNo>
                <status>PUBLISHED</status>
                <modificationDate>2018-09-27T13:31:25+02:00</modificationDate>
                <Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/
                            
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.
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/4">
    <VersionInfo>
        <id>551</id>
        <versionNo>4</versionNo>
        <status>PUBLISHED</status>
        <modificationDate>2019-02-20T11:32:12+01:00</modificationDate>
        <Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
        <creationDate>2019-02-20T11:32:06+01: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">7777</value>
        </names>
        <Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/a
                            
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.
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/6">
    <VersionInfo>
        <id>553</id>
        <versionNo>6</versionNo>
        <status>DRAFT</status>
        <modificationDate>2019-02-20T12:35:10+01:00</modificationDate>
        <Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
        <creationDate>2019-02-20T12:35:10+01: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">7777</value>
        </names>
        <Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/e
                            
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.
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>522</id>
            <versionNo>1</versionNo>
            <status>ARCHIVED</status>
            <modificationDate>2019-02-20T11:30:15+01:00</modificationDate>
            <Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
            <creationDate>2018-11-09T14:50:16+01: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

/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.
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>550</id>
        <versionNo>3</versionNo>
        <status>ARCHIVED</status>
        <modificationDate>2019-02-20T11:32:12+01:00</modificationDate>
        <Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
        <creationDate>2019-02-20T11:31:34+01: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">7777</value>
        </names>
        <Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/ap
                            
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.
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/6">
    <VersionInfo>
        <id>555</id>
        <versionNo>6</versionNo>
        <status>DRAFT</status>
        <modificationDate>2019-02-22T14:55:11+01:00</modificationDate>
        <Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
        <creationDate>2019-02-22T14:55:11+01: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">777</value>
        </names>
        <Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ez
                            
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.
Code: 200

file_copy

                                <?xml version="1.0" encoding="UTF-8"?>
<Relations media-type="application/vnd.ez.api.RelationList+xml" href="/api/ezp/v2/content/objects/61/versions/6/relations">
    <Relation media-type="application/vnd.ez.api.Relation+xml" href="/api/ezp/v2/content/objects/61/versions/6/relations/2">
        <SourceContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/61"/>
        <DestinationContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/86"/>
        <RelationType>COMMON</RelationType>
    </Relation>
    <Relation media-type="application/vnd.ez.api.Relation+xml" href="/api/ezp/v2/content/objects/61/versions/6/relations/3">
        <SourceContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/61"/>
        <DestinationContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/61"/>
        <RelationType>COMMON</RelationType>
  
                            
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"?>
<RelationCreate>
  <Destination href="/api/ezp/v2/content/objects/86"/>
</RelationCreate>

                            
View more
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/86/versions/1/relations/1">
    <SourceContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/86"/>
    <DestinationContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/86"/>
    <RelationType>COMMON</RelationType>
</Relation>

                            
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.

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.

Types
Type Description
Relation Class representing a relation between content.
Code: 200

file_copy

                                <?xml version="1.0" encoding="UTF-8"?>
<Relation media-type="application/vnd.ez.api.Relation+xml" href="/api/ezp/v2/content/objects/86/versions/1/relations/1">
    <SourceContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/86"/>
    <DestinationContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/86"/>
    <RelationType>COMMON</RelationType>
</Relation>

                            
View more
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
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/69">
    <id>69</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/69/</pathString>
    <depth>3</depth>
    <childCount>0</childCount>
    <remoteId>0e8d6b87fe3b1588533b636a8549cc0c</remoteId>
    <Children media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/locations/1/2/42/69/children"/>
    <Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/61"/>
    <sortField>PATH</sortField>
    <sortOrder>ASC</sortOrder>
    <UrlAliases media-type="application/vnd.ez.api.UrlAliasRefList+xml" href="/api/ezp/v2/content/locations/1/2/42/69/urlaliases"/>
    <ContentInfo media-type="application/vnd.ez.
                            
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).
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/61/locations">
    <Location media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/62"/>
</LocationList>

                            
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.
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/4">
       
                            
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.
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>testgroup<
                            
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
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/6">
    <id>6</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/6/objectstates"/>
    <names>
        <value languageCode="eng-GB">Custom State</value>
    </names>
    <descriptions>
        <value languageCode="eng-GB">Custom Object state</value>
    </descriptions>
</ObjectStateGroup>

                            
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.
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/6">
    <id>6</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/6/objectstates"/>
    <names>
        <value languageCode="eng-GB">Custom State</value>
    </names>
    <descriptions>
        <value languageCode="eng-GB">Custom Object state</value>
    </descriptions>
</ObjectStateGroup>

                            
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
ObjectStateGroupUpdate
ObjectStateGroup This class represents an Object state group value.

file_copy

                                <?xml version="1.0" encoding="UTF-8"?>
<ObjectStateGroup>
    <names>
        <value languageCode="eng-GB">New Custom State name</value>
    </names>
</ObjectStateGroup>

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

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">
       
                            
View more
Create Object state

POST /content/objectstategroups/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>

                            
View more
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/6/objectstates/6">
    <id>6</id>
    <identifier>new-state</identifier>
    <priority>0</priority>
    <ObjectStateGroup media-type="application/vnd.ez.api.ObjectStateGroup+xml" href="/api/ezp/v2/content/objectstategroups/6"/>
    <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>

                            
View more

/content/objectstategroups/objectstates/{objectStateId}

Get Object state

GET /content/objectstategroups/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/6"/>
<defaultLanguageCode>eng-GB</defaultLanguageCode>
<languageCodes>eng-GB</languageCodes>
<names>
    <value languageCode="eng-GB">Locked</value>
</names>
<descriptions>
    <value languageCode="eng-GB"></value>
</descriptions>
</ObjectState>

                            
View more
Update Object state

PATCH /content/objectstategroups/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>

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

                            
View more
Delete Object state

DELETE /content/objectstategroups/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"?>
<LocationList href="/content/objects/23/locations" media-type="application/vnd.ez.api.LocationList+xml">
  <Location href="/content/locations/1/2/56" media-type="application/vnd.ez.api.Location+xml"/>
  <Location href="/content/locations/1/4/73/133" media-type="application/vnd.ez.api.Location+xml"/>
</LocationList>

                            
View more

/content/locations/{path}

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

/content/locations/{path}/{locationId}

Update Location

PATCH /content/locations/{path}/{locationId}

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>

                            
View more
Code: 200

file_copy

                                <?xml version="1.0" encoding="UTF-8"?>
<Location href="/content/locations/1/5/73/133" media-type="application/vnd.ez.api.Location+xml">
  <id>133</id>
  <priority>3</priority>
  <hidden>true</hidden>
  <invisible>true</invisible>
  <ParentLocation href="/content/locations/1/5/73" media-type="application/vnd.ez.api.Location+xml"/>
  <pathString>/1/5/73/133</pathString>
  <depth>4</depth>
  <childCount>0</childCount>
  <remoteId>remoteId-qwert999</remoteId>
  <Children href="/content/locations/1/5/73/133/children" media-type="application/vnd.ez.api.LocationList+xml"/>
  <Content href="/content/objects/23" media-type="application/vnd.ez.api.Content+xml"/>
  <sortField>CLASS</sortField>
  <sortOrder>ASC</sortOrder>
</Location>

                            
View more
Swap Location

SWAP /content/locations/{path}/{locationId}

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

List Views

GET /content/views

Returns a list of View URIs. The list includes a public View and a private View of the authenticated user. - DEPRECATED

Header parameters

Accept

The view link list in XML or JSON format.

Property Value
Type string
Examples application/vnd.ez.api.RefList+xml application/vnd.ez.api.RefList+json
Possible responses
Code Description
200

OK - list of View URIs.

/content/views/{identifier}

Get View

GET /content/views/{identifier}

Returns the View - DEPRECATED.

Header parameters

Accept

The View results in XML or JSON format.

Property Value
Type string
Examples application/vnd.ez.api.View+xml application/vnd.ez.api.View+json
Possible responses
Code Description
200

OK - returns the View.

401

Error - the View is not public and from another user.

Delete View

DELETE /content/views/{identifier}

The given View is deleted - DEPRECATED.

Possible responses
Code Description
204

No content - the given View is deleted.

401

Error - the user is not authorized to delete this View.

404

Error - the View does not exist.

/content/views/{identifier}/results

Get results of existing View

GET /content/views/{identifier}/results

Returns result of the View - DEPRECATED.

Header parameters

Accept

The View excluding results in XML or JSON format.

Property Value
Type string
Examples application/vnd.ez.api.ViewResult+xml application/vnd.ez.api.ViewResult+json
Possible responses
Code Description
200

OK - result of the View.

401

Error - the View is not public and from another user.

/content/sections

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

                            
View more
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/4">
        <sectionId>4</sectionId>
        <identifier>setup</identifier>
        <name>Setup
                            
View more

/content/sections/{sectionId}