Message-ID: <43660184.2472.1485837646294.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2471_1461538517.1485837646294" ------=_Part_2471_1461538517.1485837646294 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The eZ Publish 5 REST API allows you to interact with an eZ Publ= ish installation using the HTTP protocol, following a REST interaction model.
The REST API is available at the URI /api/ezp/v2
. The API from eZ Publish 4.x remains av=
ailable at the same URI, /api/=
ezp/v1
. HTTPS is available as long as your server is properly=
configured. Refer to the Getting started page to start using the API.
REST (REpresentationnal State = Transfer) is a web services architecture that follows the HTTP Pro= tocol very closely. The eZ Publish 5 REST API supports both JSON and XM= L, in terms of request format.
The API provides a set of URIs, each of them identifying and providing a=
ccess to operations on a certain resource. For instance, the =
URI /content/objects/59
=
will allow you to interact with the Content with ID 59, while /content/types/1
will=
allow you to interact with the ContentType with ID 1.
It uses HTTP verbs (G=
ET
, PUT
, DELETE
, etc...), as well as HTT=
P headers to specify the type of request. Depending on the used HTTP v=
erb, different actions will be possible. Example:
GET =
/content/objects/2
wil=
l provide you with data about Content #2,PATCH /content/objects/2
w=
ill update the Content #2's metadata (section, main language, main location=
...),DELETE /content/objects/2
=
will delete Content #2,COPY=
/content/objects/2
wi=
ll create a copy of this Content.On top of verbs, HTTP request headers will allow you to personalize the = request's behavior. On every resource, you can use the Accept header to ind= icate which format you want to communicate in, JSON or XML. This header is = also used to specify the response type you want the server to send when mul= tiple ones are available.
Accept: application/vnd.ez.api.Content+x=
ml
to get Content (full data, fields inclu=
ded) as XMLAccept: application/vnd.ez.api.ContentInfo+json
to get ContentInfo (metadata only)=
as JSONMore information
Other headers will be used in HTTP requests for specifying the siteacces= s to interact with, and of course authentication credentials.
Responses returned by the API will also use custom headers to indicate i= nformation about the executed operation.