EPrints Technical Mailing List Archive
Message: #07070
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Q: Updating fields using the REST API
- To: <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Q: Updating fields using the REST API
- From: "rsdoiel@caltech.edu" <rsdoiel@library.caltech.edu>
- Date: Mon, 8 Jan 2018 15:46:28 -0800
CRUD operations on the EPrints 3.3.15 REST API
Happy New years everyone,
I have a question about using the REST API to update an EPrints collection (EPrints 3.3.15).
I'd like to update the value of the ID field for /rest/eprint/#####/creators/#####/id.txt
and when I try to put (id.txt currently is empty) I get an error
like
curl -v -u epautomation:testrepo -d "Moore-R-L" -X PUT http://lemurprints.local/authors/rest/eprint/1/creators/1/id.txt
* Trying 172.28.128.4...
* TCP_NODELAY set
* Connected to lemurprints.local (172.28.128.4) port 80 (#0)
* Server auth using Basic with user 'epautomation'
> PUT /authors/rest/eprint/1/creators/1/id.txt HTTP/1.1
> Host: lemurprints.local
> Authorization: Basic ZXBhdXRvbWF0aW9uOnRlc3RyZXBv
> User-Agent: curl/7.57.0
> Accept: */*
> Content-Length: 9
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 9 out of 9 bytes
< HTTP/1.1 501 Method PUT Not Implemented
< Date: Mon, 08 Jan 2018 23:36:53 GMT
< Server: Apache/2.4.7 (Ubuntu)
< Content-Length: 0
< Connection: close
<
* Closing connection 0
Doing a similar command to changed the "referred" field does work (flipping the value from TRUE to FALSE).
curl -v -u epautomation:testrepo -d "TRUE" -X PUT http://lemurprints.local/authors/rest/eprint/1/refereed.txt
* Trying 172.28.128.4...
* TCP_NODELAY set
* Connected to lemurprints.local (172.28.128.4) port 80 (#0)
* Server auth using Basic with user 'epautomation'
> PUT /authors/rest/eprint/1/refereed.txt HTTP/1.1
> Host: lemurprints.local
> Authorization: Basic ZXBhdXRvbWF0aW9uOnRlc3RyZXBv
> User-Agent: curl/7.57.0
> Accept: */*
> Content-Length: 4
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 4 out of 4 bytes
< HTTP/1.1 200 OK
< Date: Mon, 08 Jan 2018 23:42:56 GMT
< Server: Apache/2.4.7 (Ubuntu)
< Cache-Control: no-store, no-cache, must-revalidate
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/plain; charset=UTF-8
<
* Connection #0 to host lemurprints.local left intact
I am probably missing something obvious but any help would be appreciated.
Thanks,
Robert
- Follow-Ups:
- [EP-tech] Q: Updating fields using the REST API
- From: "rsdoiel@caltech.edu" <rsdoiel@library.caltech.edu>
- [EP-tech] Q: Updating fields using the REST API
- References:
- [EP-tech] Q: Updating fields using the REST API
- From: "rsdoiel@caltech.edu" <rsdoiel@library.caltech.edu>
- [EP-tech] Q: Updating fields using the REST API
- Prev by Date: Re: [EP-tech] Default fields on Manage Deposits/Review screens
- Next by Date: Re: [EP-tech] Refresh Abstracts removing Boxes from Summary Page
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):