<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I think you might have to put a whole field at a time, but it's
      many years since I've looked at this so it may have changed!</p>
    <p>I'm guessing you can get the syntax via: GET
      /authors/rest/eprint/1/creators</p>
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 08/01/2018 23:46,
      <a class="moz-txt-link-abbreviated" href="mailto:rsdoiel@caltech.edu">rsdoiel@caltech.edu</a> wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:EMEW3|f0235c4528f2c0d8ae72d498a48d6890u07NlX14eprints-tech-bounces|ecs.soton.ac.uk|CAAzzH7B-YZuq+jKnhoz2c91Z1y1qyf563AuUA7ivjXDkVNuGPQ@mail.gmail.com">
      <div dir="ltr">
        <div>CRUD operations on the EPrints 3.3.15 REST API</div>
        <div><br>
        </div>
        <div>Happy New years everyone,</div>
        <div><br>
        </div>
        <div>I have a question about using the REST API to update an
          EPrints collection (EPrints 3.3.15).</div>
        <div>I'd like to update the value of the ID field for
          /rest/eprint/#####/creators/#####/id.txt</div>
        <div>and when I try to put (id.txt currently is empty) I get an
          error</div>
        <div>like</div>
        <div><br>
        </div>
        <div>    curl -v -u epautomation:testrepo -d "Moore-R-L" -X PUT
          <a
            href="http://lemurprints.local/authors/rest/eprint/1/creators/1/id.txt"
            moz-do-not-send="true">http://lemurprints.local/authors/rest/eprint/1/creators/1/id.txt</a></div>
        <div>    *   Trying 172.28.128.4...</div>
        <div>    * TCP_NODELAY set</div>
        <div>    * Connected to lemurprints.local (172.28.128.4) port 80
          (#0)</div>
        <div>    * Server auth using Basic with user 'epautomation'</div>
        <div>    &gt; PUT /authors/rest/eprint/1/creators/1/id.txt
          HTTP/1.1</div>
        <div>    &gt; Host: lemurprints.local</div>
        <div>    &gt; Authorization: Basic ZXBhdXRvbWF0aW9uOnRlc3RyZXBv</div>
        <div>    &gt; User-Agent: curl/7.57.0</div>
        <div>    &gt; Accept: */*</div>
        <div>    &gt; Content-Length: 9</div>
        <div>    &gt; Content-Type: application/x-www-form-urlencoded</div>
        <div>    &gt;</div>
        <div>    * upload completely sent off: 9 out of 9 bytes</div>
        <div>    &lt; HTTP/1.1 501 Method PUT Not Implemented</div>
        <div>    &lt; Date: Mon, 08 Jan 2018 23:36:53 GMT</div>
        <div>    &lt; Server: Apache/2.4.7 (Ubuntu)</div>
        <div>    &lt; Content-Length: 0</div>
        <div>    &lt; Connection: close</div>
        <div>    &lt;</div>
        <div>    * Closing connection 0</div>
        <div><br>
        </div>
        <div>Doing a similar command to changed the "referred" field
          does work (flipping the value from TRUE to FALSE).</div>
        <div><br>
        </div>
        <div>    curl -v -u epautomation:testrepo -d "TRUE" -X PUT <a
            href="http://lemurprints.local/authors/rest/eprint/1/refereed.txt"
            moz-do-not-send="true">http://lemurprints.local/authors/rest/eprint/1/refereed.txt</a></div>
        <div>    *   Trying 172.28.128.4...</div>
        <div>    * TCP_NODELAY set</div>
        <div>    * Connected to lemurprints.local (172.28.128.4) port 80
          (#0)</div>
        <div>    * Server auth using Basic with user 'epautomation'</div>
        <div>    &gt; PUT /authors/rest/eprint/1/refereed.txt HTTP/1.1</div>
        <div>    &gt; Host: lemurprints.local</div>
        <div>    &gt; Authorization: Basic ZXBhdXRvbWF0aW9uOnRlc3RyZXBv</div>
        <div>    &gt; User-Agent: curl/7.57.0</div>
        <div>    &gt; Accept: */*</div>
        <div>    &gt; Content-Length: 4</div>
        <div>    &gt; Content-Type: application/x-www-form-urlencoded</div>
        <div>    &gt;</div>
        <div>    * upload completely sent off: 4 out of 4 bytes</div>
        <div>    &lt; HTTP/1.1 200 OK</div>
        <div>    &lt; Date: Mon, 08 Jan 2018 23:42:56 GMT</div>
        <div>    &lt; Server: Apache/2.4.7 (Ubuntu)</div>
        <div>    &lt; Cache-Control: no-store, no-cache, must-revalidate</div>
        <div>    &lt; Vary: Accept-Encoding</div>
        <div>    &lt; Transfer-Encoding: chunked</div>
        <div>    &lt; Content-Type: text/plain; charset=UTF-8</div>
        <div>    &lt;</div>
        <div>    * Connection #0 to host lemurprints.local left intact</div>
        <div><br>
        </div>
        <div>I am probably missing something obvious but any help would
          be appreciated.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div><br>
        </div>
        <div>Robert</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Christopher Gutteridge -- <a class="moz-txt-link-freetext" href="http://users.ecs.soton.ac.uk/cjg">http://users.ecs.soton.ac.uk/cjg</a>

University of Southampton Open Data Service: <a class="moz-txt-link-freetext" href="http://data.southampton.ac.uk/">http://data.southampton.ac.uk/</a>
You should read our Web &amp; Data Innovation blog: <a class="moz-txt-link-freetext" href="http://blogs.ecs.soton.ac.uk/webteam/">http://blogs.ecs.soton.ac.uk/webteam/</a>

</pre>
  </body>
</html>