EPIC API v2
Test account
- Server: http://pid.gwdg.de/
- User name: clarintest1
- Password: xrl#4xbE
- Prefix: 11148
DEMO service
- Server: demo.pidconsortium.eu
- User name: see test account
- Password: see test account
Production environment
Prefix 11372
The general CLARIN ERIC prefix, used for multiple purposes (see below)
- Service endpoint: http://pid.gwdg.de/handles/11372
- Accounts
- clarin1 (password known by Twan), to be used by the VCR, e.g. http://hdl.handle.net/11372/VC-1006
- clarin2 (password known by Jozef), to be used by the LRT inventory, e.g. http://hdl.handle.net/11372/LRT-1517
- clarin3 (password known by Menzo), to be used for the CMDI toolkit, e.g. http://hdl.handle.net/11372/CMDI-0001
- clarin4 (password known by Willem), to be used for the manually issued DOC-... handles (eg for the centre certificates)
Prefix 11459
Another CLARIN ERIC prefix, specifically intended to be used with the CLARIN Concept Registry
- Service endpoint: http://pid.gwdg.de/handles/11459
- Accounts
- clarin2-* (passwords known by Menzo, used by the OpenSKOS-based concept registry, eg http://hdl.handle.net/11459/CCR_C-2484_669684e7-cb9e-ea96-59cb-a25fe89b9b9d
GWDG contact
GWDG, Handle <handle@gwdg.de>
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.
A) In order to get a JSON response specify application/json in the "Accept" header field:
curl -vv -u "user:pass" -H "Content-Type:application/json" -H "Accept:application/json" -X POST --data '[{"type":"URL","parsed_data":"http://www.gwdg.de"}]' http://pid.gwdg.de/handles/$PREFIX
B) In order to get a HTML response specify text/html in the "Accept" header field:
curl -vv -u "user:pass" -H "Content-Type:application/json" -H "Accept:text/html" -X POST --data '[{"type":"URL","parsed_data":"http://www.gwdg.de"}]' http://pid.gwdg.de/handles/$PREFIX
C) In order to get a XHTML response specify application/xhtml+xml in the "Accept" header field:
curl -vv -u "user:pass" -H "Content-Type:application/json" -H “Accept:application/xhtml+xml" -X POST --data '[{"type":"URL","parsed_data":"http://www.gwdg.de"}]' http://pid.gwdg.de/handles/$PREFIX
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''