Skip to content

Instantly share code, notes, and snippets.

@emodric
Created September 21, 2012 18:32
Show Gist options
  • Save emodric/3763117 to your computer and use it in GitHub Desktop.
Save emodric/3763117 to your computer and use it in GitHub Desktop.
REST content
eddie@abyss ~/restScripts/xml/objects [master] $ ./loadContent.sh
GET /content/objects/58 HTTP/1.1
Accept: application/vnd.ez.api.Content+xml
Accept-Encoding: identity, deflate, compress, gzip
Host: localhost:8042
User-Agent: HTTPie/0.2.8-alpha
X-Test-User: 14
HTTP/1.1 200 OK
Accept-Patch: application/vnd.ez.api.ContentUpdate+xml
Content-Length: 2416
Content-Type: application/vnd.ez.api.Content+xml
Date: Fri, 21 Sep 2012 18:32:10 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.4
<?xml version="1.0" encoding="UTF-8"?>
<Content media-type="application/vnd.ez.api.Content+xml" href="/content/objects/58" remoteId="7c013ad2b5221a74704c3d8313c4936a" id="58">
<ContentType media-type="application/vnd.ez.api.ContentType+xml" href="/content/types/21"/>
<Name>Getting Started</Name>
<Versions media-type="application/vnd.ez.api.VersionList+xml" href="/content/objects/58/versions"/>
<CurrentVersion media-type="application/vnd.ez.api.Version+xml" href="/content/objects/58/currentversion">
<Version media-type="application/vnd.ez.api.Version+xml" href="/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="/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="/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="/content/objects/58/versions/1/relations"/>
</Version>
</CurrentVersion>
<Section media-type="application/vnd.ez.api.Section+xml" href="/content/sections/1"/>
<MainLocation media-type="application/vnd.ez.api.Location+xml" href="/content/locations/1/2/60"/>
<Locations media-type="application/vnd.ez.api.LocationList+xml" href="/content/objects/58/locations"/>
<Owner media-type="application/vnd.ez.api.User+xml" href="/user/users/14"/>
<lastModificationDate>2012-03-28T15:03:22+02:00</lastModificationDate>
<publishedDate>2012-03-28T11:33:10+02:00</publishedDate>
<mainLanguageCode>eng-GB</mainLanguageCode>
<alwaysAvailable>false</alwaysAvailable>
</Content>
eddie@abyss ~/restScripts/xml/objects [master] $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment