Version 10 (modified by 10 years ago) (diff) | ,
---|
EPIC API v2
Test account
- Server: http://pid-vm04.gwdg.de:8080/
- User name: clarintest1
- Password: xrl#4xbE
- Prefix: 11148
Production environment
Prefix 11372
- Service endpoint: http://pid.gwdg.de/handles/11372
- Accounts
Documentation
Usage examples
Taken from http://epic.gwdg.de/wiki/index.php/EPIC:API:v2:contribution:
The current PID-Service requires HTTP BASIC AUTH authentication, use the -u parameter.
VIEW
- VIEW the PID 11022/1234-5678-1234-C in HTML format:
curl -u 'tkalman:MyPaSsWoRd' http://pid.gwdg.de/handles/11022/1234-5678-1234-C
- VIEW the PID 11022/1234-5678-1234-C in JSON format (Accept: header):
curl -u 'tkalman:MyPaSsWoRd' -H "Accept:application/json" http://pid.gwdg.de/handles/11022/1234-5678-1234-C
(Note the Accept:application/json header.)
CREATE
- Creating a PID for the URL "http://www.gwdg.de/TEST/abcdef":
curl -u 'tkalman:MyPaSsWoRd' -H "Accept:application/json" -H "Content-Type:application/json" '''-X POST''' --data ''''[{"type":"URL","parsed_data":"http://www.gwdg.de/TEST/abcdef"}]'''' http://pid.gwdg.de/handles/11022/
UPDATE
- Updating the PID 11022/1234-5678-1234-C:
Use the PUT method to update the Handle 11022/1234-5678-1234-C:
curl -u 'tkalman:MyPaSsWoRd' -H "Accept:application/json" -H "Content-Type:application/json" -X '''PUT''' --data '[{"type":"URL","parsed_data":"http://www.gwdg.de/TEST/newurl"}]' http://pid.gwdg.de/handles/'''11022/1234-5678-1234-C''