REST content formats
When using REST with components, use these content formats. These examples can be used as templates for our own REST solutions.
Numeric components
- Double:
<content type="application/vnd.ibm.wcm+xml"> <wcm:double>1.01</wcm:double> </content>
- Integer:
<content type="application/vnd.ibm.wcm+xml"> <wcm:integer>20</wcm:integer> </content>
Date components
<content type="application/vnd.ibm.wcm+xml"> <wcm:date type="DateTime">2013-09-30T14:00:00.000Z</wcm:date> </content>
Image components
<content type="application/vnd.ibm.wcm+xml"> <wcm:image xmlns="http://www.ibm.com/xmlns/wcm"> <dimension height="16" width="16" border="0"/> <altText></altText> <tagName></tagName> <resourceUri type="image/gif">/wps/wcm/myconnect/5e7dd2e9-8a94-4964-a8d4-3a467be462ca/loading.gif?MOD=AJPERES</resourceUri> </wcm:image> </content>
Style sheet components
<content type="application/vnd.ibm.wcm+xml"> <wcm:stylesheet xmlns="http://www.ibm.com/xmlns/wcm"> <mediaType>Unspecified</mediaType> <type>Preferred</type> <title>master</title> <resourceUri>/wps/wcm/myconnect/d9109bd5-112a-4179-b05b-8a1e938648e0/master.css?MOD=AJPERES</resourceUri> </wcm:stylesheet> </content>
File resource components
<content type="application/vnd.ibm.wcm+xml"> <wcm:resourceUri type="unknown/unknown"> /wps/wcm/myconnect/9f9f248c-b52c-43ff-bded-81cb243d3606/bwTagging.js?MOD=AJPERES </wcm:resourceUri> </content>
HTML components
<content type="text/html"> <![CDATA[<div class="lotusui30"> <h2 style="display:block;"> <div> <div class="lotusLeft"> [EditableProperty context="current" type="content" format="div" field="title"] [Property context="current" type="content" field="title"] [/EditableProperty] </div> </div> </h2> </div> ]]> </content>