Quickr: Usando REST e ATOM: Difference between revisions

From Wiki
No edit summary
Line 1: Line 1:
Documento em Rascunho (Draft)
Documento em Rascunho (Draft)


== Getting the list of libraries - Quickr/Portal ==
== URLs ==
 
=== Getting the list of libraries - Quickr/Portal ===


'''Request'''
'''Request'''
Line 23: Line 25:
http://www.ibm.com/developerworks/lotus/library/quickr-rest/
http://www.ibm.com/developerworks/lotus/library/quickr-rest/


== Getting the list of folders and documents - Quickr/Portal ==
=== Getting the list of folders and documents - Quickr/Portal ===
'''Request'''
'''Request'''
Line 31: Line 33:
http://www.ibm.com/developerworks/lotus/library/quickr-rest/
http://www.ibm.com/developerworks/lotus/library/quickr-rest/


== Retrieving the list of places - Quickr/Domino ==
=== Retrieving the list of places - Quickr/Domino ===


'''Request'''  
'''Request'''  
Line 37: Line 39:
/myqcs/rest/places/feed
/myqcs/rest/places/feed


== Retrieving the information of an individual place ==
=== Retrieving the information of an individual place ===


GET /myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry
GET /myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry
Listing 2. Atom entry document for the individual place information
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http://mikebook.cn.ibm.com" xmlns="http://www.w3.org/2005/Atom"
xmlns:td="urn:ibm.com/td">
<id>6B6E24213DA1364C882573A70002B497</id>
<link href="/myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry"
rel="self" />
<link href="http://mikebook.cn.ibm.com/mikeplace" rel="alternate"/> <link
href="/myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry" rel="current"/>
<link href="/myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry"
rel="edit"/>
<updated>2007-12-03T23:29:36Z</updated>
<author>
<name></name>
<email></email>
</author>
<td:loginuser>
<name>qp</name>
<email></email>
</td:loginuser>
<title>Mike Place</title>
<td:placename>mikeplace</td:placename>
<td:logincounts>0</td:logincounts>
<td:placesize>2540</td:placesize>
<td:lastaccessed></td:lastaccessed>
<td:numdocs>3</td:numdocs>
<td:numdrafts>0</td:numdrafts>
<td:numattachs>0</td:numattachs>
<td:numcustomforms>0</td:numcustomforms>
<td:numofflineinstalls>0</td:numofflineinstalls>
<td:nummanagers>1</td:nummanagers>
<td:numauthors>0</td:numauthors>
<td:numreaders>0</td:numreaders>
<td:lastweekuses>0</td:lastweekuses>
<td:lastweekreads>0</td:lastweekreads>
<td:lastweekwrites>0</td:lastweekwrites>
<td:lastmonthuses>0</td:lastmonthuses>
<td:lastmonthreads>0</td:lastmonthreads>
<td:lastmonthwrites>0</td:lastmonthwrites>
<td:servername>mikebook.cn.ibm.com</td:servername>
<td:islocked>0</td:islocked>
<td:sizePolicyStatus>ok</td:sizePolicyStatus>
<td:sizePolicyAction>unlock</td:sizePolicyAction>
<td:agePolicyStatus>ok</td:agePolicyStatus>
<td:agePolicyAction>unlock</td:agePolicyAction>
<td:policy>
<td:policyName>Policy1</td:policyName>
<td:policyID>A54BE63EA15F4898882573A70003B39D</td:policyID>
<td:policySize>
<td:max>1</td:max>
<td:warn>1</td:warn>
</td:policySize>
<td:policyAge>
<td:max>1</td:max>
<td:warn>1</td:warn>
</td:policyAge>
</td:policy>
</entry>




== Locking a place ==
=== Locking a place ===


'''Request'''
'''Request'''
PUT /myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry
* PUT /myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry
 
 
Listing 3. Atom Put operations for locking a place
 
HTTP '''Request''':
Method:POST
URL: http://mikebook.cn.ibm.com/myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry
Content-Type:application/x-www-form-urlencoded
x-method-override: PUT
 
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom'>
<td:lock xmlns='urn:ibm.com/td'>true</td:lock>
</entry>
 
 
Atencao para as seguintes entradas
 
x-method-override: PUT
 
<td:lock xmlns='urn:ibm.com/td'>true</td:lock>
 
== Listando as policies ==
=== Listando as policies ===


The URL for creating a policy operations look like this one:
The URL for creating a policy operations look like this one:
Line 138: Line 58:
http://www.ibm.com/developerworks/lotus/library/quickr-admin/
http://www.ibm.com/developerworks/lotus/library/quickr-admin/
== Assigning a policy to a place ==
=== Assigning a policy to a place ===




 
* PUT http://mikebook.cn.ibm.com/myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry
http://mikebook.cn.ibm.com/myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry


The APP Put operations are used to assign the policy
The APP Put operations are used to assign the policy


Listing 5. Atom Put operations for assigning a policy to a place
POST http://mikebook.cn.ibm.com/myqcs/rest/place/
6B6E24213DA1364C882573A70002B497/entry HTTP/1.0
Accept: */*
Accept-Language: zh-cn
x-method-override: PUT
Content-Type: application/x-www-form-urlencoded
Pragma: no-cache
Host: mikebook.cn.ibm.com
Content-Length: 331
Authorization: Basic cXA6cXA=
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom>
<published>2007-12-04T01:02:26Z</published>
<updated>2007-12-04T01:02:26Z</updated>
<td:policy_uuid xmlns='urn:ibm.com/td'>A54BE63EA15F4898882573A70003B39D</td:policy_uuid>
<td:policy_title xmlns='urn:ibm.com/td'>Policy1</td:policy_title>
</entry>


== '''Return''' Members ==
=== Return Members ===


GET /lotus/mycontenthandler/!ut/p/ai/applications/<placeid>/members
GET /lotus/mycontenthandler/!ut/p/ai/applications/<placeid>/members




Listing 1. Sample Application-Members Entry extract
memberUrl = this.serverRoot + “/mycontenthander/!ut/p/ai/applications” + this.placeId + “/members”
<atom:entry>
<atom:id>ai:applications/1F_18M131M41OUAC0II8RDHR42007</atom:id>
<atom:title xml:lang=en>My Application Title</atom:title>
...
<atom:link ca:rel="application-members"
href="/lotus/mycontenthandler/!
ut/p/ai/applications/<placeid>/members"
rel="related" type=......" />
...
</atom:entry>


== Artigos ==


Listing 2. Structure of Members feed
* [http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v615/caitai/i_r_app_rest_svcs.html Application REST services]
<atom:feed ....>
<atom:author>
<atom:name>IBM WebSphere Portal/6.1.0.3</atom:name>
</atom:author>
<atom:title>IBM WebSphere Portal Application Infrastructure Feed</atom:title>
<atom:link href="/lotus/mycontenthandler/!ut/p/ai/applications/1F_18M131M41OUAC0II8RDHR42007/members" rel="self"... />
<atom:id>ai:applications/1F_18M131M41OUAC0II8RDHR42007/members</atom:id>
<atom:updated>2010-06-19T22:20:06.171Z</atom:updated>
<opensearch:totalResults>12</opensearch:totalResults>


* [http://www-10.lotus.com/ldd/lqwiki.nsf/dx/02142009072014PMWEB2EP.htm Simple Example of Using a REST Service to Post a Blog Entry]


* [http://www-10.lotus.com/ldd/lqwiki.nsf/dx/update-a-place Update a place TECHNICAL PREVIEW]


Table 2. Elements of Members feed ATOM document
* [http://www-10.lotus.com/ldd/lqwiki.nsf/dx/remove-member-from-a-place Remove member from a place TECHNICAL PREVIEW]
atom:author Author of the ATOM document
atom:title Title of the document. Includes a link to the document itself.
atom:id ID of the document. This can be used as a Piece Of Content (POC)
URL to access the feed.
atom:updated Date the feed is updated.
opensearch:totalResults Number of results in the entire feed. If the feed is split into pages, then
this number is the total entries across all pages, not just the current
page.




memberUrl = this.serverRoot + “/mycontenthander/!ut/p/ai/applications” + this.placeId + “/members”
== Outros ==


== Outros ==
/dm/atom/libraries/feed?pagesize=1000
/dm/atom/libraries/feed?pagesize=1000



Revision as of 13:23, 29 January 2013

Documento em Rascunho (Draft)

URLs

Getting the list of libraries - Quickr/Portal

Request

  • GET /dm/atom/introspection

Return

<?xml version="1.0" encoding="utf-8"?>
<service>
  <workspace title="Teamspace Documents">
     	  <collection title="Architecture Documents" href="http://quickrserver/library/5d06ab0044ed8129bd5ebd4caeec5df1/feed">
  	<accept>application/*,image/*,*/*</accept>
  	  </collection>
  	  <collection title="Design Documents" href="http://quickrserver/library/3c06ab0044ed8129bd5ebd4cbeec5dc4/feed">
  		<accept>application/*,image/*,*/*</accept>
  	  </collection>
  	 </workspace>
</service>

http://www.ibm.com/developerworks/lotus/library/quickr-rest/

Getting the list of folders and documents - Quickr/Portal

Request

  • /dm/atom/library/5d06ab0044ed8129bd5ebd4caeec5df1/feed

http://www.ibm.com/developerworks/lotus/library/quickr-rest/

Retrieving the list of places - Quickr/Domino

Request

/myqcs/rest/places/feed

Retrieving the information of an individual place

GET /myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry


Locking a place

Request

  • PUT /myqcs/rest/place/6B6E24213DA1364C882573A70002B497/entry

Listando as policies

The URL for creating a policy operations look like this one: http://mikebook.cn.ibm.com/myqcs/rest/policy/feed


http://www.ibm.com/developerworks/lotus/library/quickr-admin/

Assigning a policy to a place

The APP Put operations are used to assign the policy


Return Members

GET /lotus/mycontenthandler/!ut/p/ai/applications/<placeid>/members


memberUrl = this.serverRoot + “/mycontenthander/!ut/p/ai/applications” + this.placeId + “/members”

Artigos


Outros

/dm/atom/libraries/feed?pagesize=1000

/myqcs/rest/place/" + sId + "/members"

/myqcs/rest/places/feed?libID=