+

Search Tips   |   Advanced Search

Use REST with Web Content Manager items

This topic provides an overview of the options available when working with Web Content Manager items, including the types of items that can be created and updated, and other important information related to the process of creating and updating web content items using REST.


Item types

The following item types can be created, read, updated and deleted using the Web Content Manager REST service:

The following element types can also be created, read, updated and deleted in site areas and content items using the Web Content Manager REST service:


Content representations


Content Negotiation

When a resource supports multiple representations with different content types, clients can use content negotiation to request a specific representation. For example, entry documents are available in application/atom+xml; type=entry and application/json. There are two ways a client can specify the media type that the client can accept:


Example entry

This is an example in application/atom+xml format:

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:wcm="namespace">
    <id>3aabfe14-cc9e-4eb5-ad06-d4fc8fd2f1df</id>
    <title>SampleHTMLComponent</title>
    <link rel="edit" href="/wps/mycontenthandler/!ut/p/wcmrest/LibraryHTMLComponent/3aabfe14-cc9e-4eb5-ad06-d4fc8fd2f1df"/>
    <link rel="edit-media" type="text/html" href="/wps/mycontenthandler/!ut/p/wcmrest/LibraryHTMLComponent/3aabfe14-cc9e-4eb5-ad06-d4fc8fd2f1df"/>
    <link rel="library" href="/wps/mycontenthandler/!ut/p/wcmrest/item/c98d11e1-7f2a-480e-9aac-40eb1949cbda"/>
    <link rel="create-draft" href="/wps/mycontenthandler/!ut/p/wcmrest/item/3aabfe14-cc9e-4eb5-ad06-d4fc8fd2f1df/create-draft"/>
    <link rel="change-to-draft" href="/wps/mycontenthandler/!ut/p/wcmrest/item/3aabfe14-cc9e-4eb5-ad06-d4fc8fd2f1df/change-to-draft"/>
    <link rel="versions" href="/wps/mycontenthandler/!ut/p/wcmrest/item/3aabfe14-cc9e-4eb5-ad06-d4fc8fd2f1df/versions"/>
    <link rel="add-attachment" href="/wps/mycontenthandler/!ut/p/wcmrest/LibraryHTMLComponent/3aabfe14-cc9e-4eb5-ad06-d4fc8fd2f1df/attachments"/>
    <updated>2011-05-30T02:05:44.574Z</updated>
    <author>
        <wcm:distinguishedName>uid=wpsadmin,o=defaultWIMFileBasedRealm</wcm:distinguishedName>
        <uri>/wps/mycontenthandler/!ut/p/digest!wtpqWRz_9ePiiVHk1Rw2cw/um/users/profiles/Z9eAeH1C2JG561RC6JM47H9E4MMG6PHO6JM4C5JD0JMOC6BEEJS464JDG3I56K1</uri>
        <name>wpsadmin</name>
    </author>
    <wcm:owner>
        <wcm:distinguishedName>uid=wpsadmin,o=defaultWIMFileBasedRealm</wcm:distinguishedName>
        <uri>/wps/mycontenthandler/!ut/p/digest!wtpqWRz_9ePiiVHk1Rw2cw/um/users/profiles/Z9eAeH1C2JG561RC6JM47H9E4MMG6PHO6JM4C5JD0JMOC6BEEJS464JDG3I56K1</uri>
        <name>wpsadmin</name>
    </wcm:owner>
    <wcm:name>SampleHTMLComponent</wcm:name>
    <wcm:type>LibraryHTMLComponent</wcm:type>
    <wcm:state>PUBLISHED</wcm:state>
   </entry>


Parent: Work with web content items using REST