Insert/Move Items

Lists and in-boxes cannot contain duplicate items, so inserting items at a particular position and moving items to a new position are identical operations. You do it in exactly the same way as adding items to the top of a list/inbox, but instead of sending your POST request to the list pool URI, you must send it to the URI of one of the handles in the list pool:

curl --include -u user:password -X POST -H "Content-Type: text/uri-list" \
> http://host-ip-address/webservice/escenic/list-pool/handle/583347 --upload-file uri-list.txt
HTTP/1.1 100 Continue

HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
X-ECE-Active-Connections: 1
Location: http://host-ip-address/webservice/escenic/list-pool/handle/16774
ETag: "2003719864"
Vary: Accept
Content-Type: application/atom+xml
Content-Length: 2580
Date: Mon, 04 Apr 2016 13:22:40 GMT

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>Escenic Content Engine</name>
  </author>
  <id>http://host-ip-address/webservice/escenic/list-pool/handle/16774</id>
  <link rel="self" href="http://host-ip-address/webservice/escenic/list-pool/handle/16774" type="application/atom+xml"/>
  <updated>2016-04-04T13:22:41.591Z</updated>
  <title type="text">My List</title>
  <link rel="http://www.vizrt.com/types/relation/changelog" href="http://host-ip-address/webservice/escenic/changelog/list/15585" type="application/atom+xml"/>
  <link rel="http://www.vizrt.com/types/relation/home-section" href="http://host-ip-address/webservice/escenic/section/1" type="application/atom+xml" title="Home"/>
  <entry>
    <id>http://host-ip-address/webservice/escenic/list-pool/handle/16799</id>
    <updated>2016-04-04T13:22:41.593Z</updated>
    <title type="text">(type=1 ,id=1093403 ,pubId=-1)</title>
    <link rel="edit" href="http://host-ip-address/webservice/escenic/list-pool/handle/16799" type="application/atom+xml"/>
    <link rel="self" href="http://host-ip-address/webservice/escenic/list-pool/handle/16799" type="application/atom+xml"/>
    <link rel="about" href="http://host-ip-address/webservice/escenic/content/1093403" 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/demo/model/content-type/com.escenic.poolentry">
        <vdf:field name="com.escenic.priority">
          <vdf:value>-1</vdf:value>
        </vdf:field>
        <vdf:field name="com.escenic.pinned">
          <vdf:value>false</vdf:value>
        </vdf:field>
      </vdf:payload>
    </content>
  </entry>
  <entry>
    <id>http://host-ip-address/webservice/escenic/list-pool/handle/16800</id>
    <updated>2016-04-04T13:22:41.594Z</updated>
    <title type="text">(type=1 ,id=1093556 ,pubId=-1)</title>
    <link rel="edit" href="http://host-ip-address/webservice/escenic/list-pool/handle/16800" type="application/atom+xml"/>
    <link rel="self" href="http://host-ip-address/webservice/escenic/list-pool/handle/16800" type="application/atom+xml"/>
    <link rel="about" href="http://host-ip-address/webservice/escenic/content/1093556" 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/demo/model/content-type/com.escenic.poolentry">
        <vdf:field name="com.escenic.priority">
          <vdf:value>-1</vdf:value>
        </vdf:field>
        <vdf:field name="com.escenic.pinned">
          <vdf:value>false</vdf:value>
        </vdf:field>
      </vdf:payload>
    </content>
  </entry>
</feed>

The response is exactly the same as if you had added the entries to the top of the list pool. In this case, however, they will have been inserted immediately after the handle to which you sent the POST request.

Note that you can get the response in the form of an XHTML document rather than an Atom feed by including an accept header in your request:

curl --include -u user:password -X POST -H "Content-Type: text/uri-list" -H "Accept: application/xhtml+xml"\
> http://host-ip-address/webservice/escenic/list-pool/listID --upload-file uri-list.txt