Pin/unpin an Item
To pin an item in a fixed position in a list, you must retrieve its
handle as described in
Retrieve a List or Inbox, set the
com.escenic.priority
and
com.escenic.pinned
fields in its payload and send
it to its self
URI in a POST
request. You must set com.escenic.priority
to the
required position, and com.escenic.pinned
to
true
.
For example:
<entry xmlns="http://www.w3.org/2005/Atom"> <id>http://host-ip-address/webservice/escenic/list-pool/handle/583347</id> <title type="text">(type=1 ,id=204697 ,pubId=-1)</title> <link rel="edit" href="http://host-ip-address/webservice/escenic/list-pool/handle/583347" type="application/atom+xml"/> <link rel="self" href="http://host-ip-address/webservice/escenic/list-pool/handle/583347" type="application/atom+xml"/> <link rel="about" href="http://host-ip-address/webservice/escenic/content/204697" type="application/atom+xml"/> <content type="application/vnd.vizrt.payload+xml"> <vdf:payload xmlns:vdf="http://www.vizrt.com/types" model="http://host-ip-address/webservice/escenic/publication/dev.nightly/model/com.escenic.poolentry"> <vdf:field name="com.escenic.priority"> <vdf:value>3</vdf:value> </vdf:field> <vdf:field name="com.escenic.pinned"> <vdf:value>true</vdf:value> </vdf:field> </vdf:payload> </content> <link rel="collection" href="http://host-ip-address/webservice/escenic/list-pool/423" type="text/uri-list"/> </entry>
Sending the above entry (called list-pool-item.xml
)
as follows:
curl --include -u user:password -X PUT -H "Content-Type: application/atom+xml; type=entry" \>
http://host-ip-address/webservice/escenic/list-pool/handle/583347 --upload-file list-pool-item.xmlHTTP/1.1 100 Continue HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-ECE-Active-Connections: 1 Content-Length: 0 Date: Fri, 25 Oct 2013 11:08:01 GMT
will pin the entry in position 3. To unpin it, simply repeat the
process, this time ensuring that com.escenic.pinned
is set to false
. In this case, it does not matter
what value the com.escenic.priority
field contains;
its contents will be ignored since the entry is being unpinned.