Skip to content

Instantly share code, notes, and snippets.

@emodric
Created December 12, 2012 15:36
Show Gist options
  • Save emodric/4268759 to your computer and use it in GitHub Desktop.
Save emodric/4268759 to your computer and use it in GitHub Desktop.
eZ Publish 5 REST API - loading content
eddie@abyss: ~ $ ./restScripts/xml/content/07-loadContent.sh
GET /api/ezp/v2/content/objects/58 HTTP/1.1
Accept: application/vnd.ez.api.Content+xml
Accept-Encoding: gzip, deflate, compress
Host: ezpublish5.local
User-Agent: HTTPie/0.3.0
HTTP/1.0 200 OK
Connection: close
Content-Type: application/vnd.ez.api.Content+xml
Date: Wed, 12 Dec 2012 15:28:21 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.9-1~ppa1~quantal
accept-patch: application/vnd.ez.api.ContentUpdate+xml
cache-control: no-cache
x-debug-token: 50c8a29a52150
<?xml version="1.0" encoding="UTF-8"?>
<Content media-type="application/vnd.ez.api.Content+xml" href="/api/ezp/v2/content/objects/58" remoteId="remoteId123456789" id="58">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/api/ezp/v2/content/types/21"/>
<Name>Getting Started</Name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/api/ezp/v2/content/objects/58/versions"/>
<CurrentVersion media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/58/currentversion">
<Version media-type="application/vnd.ez.api.Version+xml" href="/api/ezp/v2/content/objects/58/versions/1">
<VersionInfo>
<id>505</id>
<versionNo>1</versionNo>
<status>PUBLISHED</status>
<modificationDate>2012-03-28T15:03:22+02:00</modificationDate>
<Creator media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/14"/>
<creationDate>2012-03-28T15:03:20+02:00</creationDate>
<initialLanguageCode>eng-GB</initialLanguageCode>
<languageCodes>eng-GB</languageCodes>
<names>
<value languageCode="eng-GB">Getting Started</value>
</names>
<Content media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/58"/>
</VersionInfo>
<Fields>
<field>
<id>188</id>
<fieldDefinitionIdentifier>name</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>Getting Started</fieldValue>
</field>
<field>
<id>189</id>
<fieldDefinitionIdentifier>page</fieldDefinitionIdentifier>
<languageCode>eng-GB</languageCode>
<fieldValue>O:41:&quot;eZ\Publish\Core\FieldType\Page\Parts\Page&quot;:2:{s:13:&quot;</fieldValue>
</field>
</Fields>
<Relations media-type="application/vnd.ez.api.RelationList+xml" href="/api/ezp/v2/content/objects/58/versions/1/relations">
<Relation media-type="application/vnd.ez.api.Relation+xml" href="/api/ezp/v2/content/objects/58/versions/1/relations/42">
<DestinationContent media-type="application/vnd.ez.api.ContentInfo+xml" href="/api/ezp/v2/content/objects/42" />
<RelationType>COMMON</RelationType>
</Relation>
</Version>
</CurrentVersion>
<Section media-type="application/vnd.ez.api.Section+xml" href="/api/ezp/v2/content/sections/4"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/api/ezp/v2/content/locations/1/2/60"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/api/ezp/v2/content/objects/58/locations"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/api/ezp/v2/user/users/10"/>
<lastModificationDate>2012-09-30T12:30:00+02:00</lastModificationDate>
<publishedDate>2012-09-30T13:30:00+02:00</publishedDate>
<mainLanguageCode>eng-GB</mainLanguageCode>
<alwaysAvailable>false</alwaysAvailable>
</Content>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment