<div dir="ltr">Thanks, I'll try that next. I've started to read through the Perl (I'm a bit rusty) to understand the details too. When I solve it I'll post something to the list hear as I notice this crops up everyone year or two.<div><br></div><div>All the best,</div><div><br></div><div>Robert Doiel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 10, 2018 at 3:27 AM, Christopher Gutteridge <span dir="ltr"><<a href="mailto:cjg@ecs.soton.ac.uk" target="_blank">cjg@ecs.soton.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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/<wbr>creators</p><div><div class="h5">
<p><br>
</p>
<br>
<div class="m_2537407255355470240moz-cite-prefix">On 08/01/2018 23:46,
<a class="m_2537407255355470240moz-txt-link-abbreviated" href="mailto:rsdoiel@caltech.edu" target="_blank">rsdoiel@caltech.edu</a> wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<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/##<wbr>###/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" target="_blank">http://lemurprints.local/<wbr>authors/rest/eprint/1/<wbr>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> > PUT /authors/rest/eprint/1/<wbr>creators/1/id.txt
HTTP/1.1</div>
<div> > Host: lemurprints.local</div>
<div> > Authorization: Basic ZXBhdXRvbWF0aW9uOnRlc3RyZXBv</div>
<div> > User-Agent: curl/7.57.0</div>
<div> > Accept: */*</div>
<div> > Content-Length: 9</div>
<div> > Content-Type: application/x-www-form-<wbr>urlencoded</div>
<div> ></div>
<div> * upload completely sent off: 9 out of 9 bytes</div>
<div> < HTTP/1.1 501 Method PUT Not Implemented</div>
<div> < Date: Mon, 08 Jan 2018 23:36:53 GMT</div>
<div> < Server: Apache/2.4.7 (Ubuntu)</div>
<div> < Content-Length: 0</div>
<div> < Connection: close</div>
<div> <</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" target="_blank">http://lemurprints.local/<wbr>authors/rest/eprint/1/<wbr>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> > PUT /authors/rest/eprint/1/<wbr>refereed.txt HTTP/1.1</div>
<div> > Host: lemurprints.local</div>
<div> > Authorization: Basic ZXBhdXRvbWF0aW9uOnRlc3RyZXBv</div>
<div> > User-Agent: curl/7.57.0</div>
<div> > Accept: */*</div>
<div> > Content-Length: 4</div>
<div> > Content-Type: application/x-www-form-<wbr>urlencoded</div>
<div> ></div>
<div> * upload completely sent off: 4 out of 4 bytes</div>
<div> < HTTP/1.1 200 OK</div>
<div> < Date: Mon, 08 Jan 2018 23:42:56 GMT</div>
<div> < Server: Apache/2.4.7 (Ubuntu)</div>
<div> < Cache-Control: no-store, no-cache, must-revalidate</div>
<div> < Vary: Accept-Encoding</div>
<div> < Transfer-Encoding: chunked</div>
<div> < Content-Type: text/plain; charset=UTF-8</div>
<div> <</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="m_2537407255355470240mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>*** Options: <a class="m_2537407255355470240moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" target="_blank">http://mailman.ecs.soton.ac.<wbr>uk/mailman/listinfo/eprints-<wbr>tech</a>
*** Archive: <a class="m_2537407255355470240moz-txt-link-freetext" href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.<wbr>php/</a>
*** EPrints community wiki: <a class="m_2537407255355470240moz-txt-link-freetext" href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="m_2537407255355470240moz-txt-link-freetext" href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre class="m_2537407255355470240moz-signature" cols="72">--
Christopher Gutteridge -- <a class="m_2537407255355470240moz-txt-link-freetext" href="http://users.ecs.soton.ac.uk/cjg" target="_blank">http://users.ecs.soton.ac.uk/<wbr>cjg</a>
University of Southampton Open Data Service: <a class="m_2537407255355470240moz-txt-link-freetext" href="http://data.southampton.ac.uk/" target="_blank">http://data.southampton.ac.uk/</a>
You should read our Web & Data Innovation blog: <a class="m_2537407255355470240moz-txt-link-freetext" href="http://blogs.ecs.soton.ac.uk/webteam/" target="_blank">http://blogs.ecs.soton.ac.uk/<wbr>webteam/</a>
</pre>
</font></span></div>
</blockquote></div><br></div>