+

Search Tips   |   Advanced Search

REST API and content associations

If we are creating or extending an application and want to manage content associations with that application, we can use portal remote APIs. These APIs retrieve a list of content associations and then create, update, or delete associations.

Based on the Representational State Transfer (REST) architecture, the APIs represent information about content associations as Atom feeds. To perform actions, you send HTTP requests to specific URLs.


Retrieve all content associations

This request returns a feed containing all content associations available in the system.


Retrieve content associations for a specific web content page

This request returns a feed containing the content associations defined for a specific web content page.


Modify content associations

This request updates the content associations defined for a specific web content page.


Delete content associations

This request deletes either all content associations for a specific web content page or an individual content association to specific content item.


Example Atom feed document

<?xml version="1.0" encoding="UTF-8"?>
<atom:feed xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:app="http://www.w3.org/2007/app" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:contentmappings="http://www.ibm.com/xmlns/prod/content-mappings/v1.0" xmlns:atom="http://www.w3.org/2005/Atom" xml:base="http://www.example.com:10039/wps/mypoc/!ut/p/contentmapping/objecttype%3aCONTENT_NODE">
 <atom:title>Content Mappings Feed</atom:title>
 <atom:author>
  <atom:name>WebSphere Portal</atom:name>
 </atom:author>
 <atom:link href="/wps/mycontenthandler/!ut/p/contentmapping/objecttype%3aCONTENT_NODE?max-results=2" rel="self" type="application/atom+xml"/>
 <atom:id>contentmapping:objecttype%3aCONTENT_NODE</atom:id>
 <atom:updated>2009-08-25T12:10:51.641Z</atom:updated>
 <atom:entry>
  <atom:id>contentmapping:oid6_2QC68B1A0GVJE0IOA0R0Q02040</atom:id>
  <atom:title>6_2QC68B1A0GVJE0IOA0R0Q02040</atom:title>
  <atom:link href="/wps/mycontenthandler/!ut/p/contentmapping/oid6_2QC68B1A0GVJE0IOA0R0Q02040" rel="self" type="application/atom+xml"/>
  <atom:link href="/wps/mycontenthandler/!ut/p/contentmapping/oid6_2QC68B1A0GVJE0IOA0R0Q02040" rel="edit" type="application/atom+xml"/>
  <atom:link href="/wps/myportal/!ut/p/c4/04_SB8K8xLLM9MSSzPy8xBz9CP0os3ijQGczCydDRwP3MC9XA09_R4Mgg0ADIwMTA_2CbEdFAHZmm-M!/" type="text/html"/>
  <atom:updated>2009-08-25T12:10:51.805Z</atom:updated>
  <atom:content type="application/xml">
   <contentmappings:content-mapping-info id="6_2QC68B1A0GVJE0IOA0R0Q02040">
    <contentmappings:content-mapping content-id="f40429bb-0cb5-4c0f-8080-cfb66f0e9b91" default="true"/>
   </contentmappings:content-mapping-info>
  </atom:content>
 </atom:entry>
 <atom:entry>
  <atom:id>contentmapping:oid6_2QC68B1A00VBC0IOSHU0A220O6</atom:id>
  <atom:title>cnCTFPortlet</atom:title>
  <atom:link href="/wps/mycontenthandler/!ut/p/contentmapping/oid6_2QC68B1A00VBC0IOSHU0A220O6" rel="self" type="application/atom+xml"/>
  <atom:link href="/wps/mycontenthandler/!ut/p/contentmapping/oid6_2QC68B1A00VBC0IOSHU0A220O6" rel="edit" type="application/atom+xml"/>
  <atom:link href="/wps/myportal/!ut/p/c4/04_SB8K8xLLM9MSSzPy8xBz9CP0os3ijQGczCydDRwODMCdnA0__YI9QA0cjIwN_M_2CbEdFAB2I97c!/" type="text/html"/>
  <atom:updated>2009-08-25T12:10:51.810Z</atom:updated>
  <atom:content type="application/xml">
   <contentmappings:content-mapping-info id="6_2QC68B1A00VBC0IOSHU0A220O6">
    <contentmappings:content-mapping content-id="6f0b7a804d426a9a8d53ede9170f1e3d" default="true"/>
    <contentmappings:content-mapping content-id="291410004ce29075b879f90c4ec954a0" default="false"/>
   </contentmappings:content-mapping-info>
  </atom:content>
 </atom:entry>
 <atom:link href="/wps/mypoc/!ut/p/contentmapping/objecttype%3aCONTENT_NODE?mode=download&start-index=2&max-results=2" rel="next" type="application/atom+xml"/>
</atom:feed>


Parent: Content associations reference