Get a PID

API - GET a PID

This API uses JSON as the primary exchange format. All implementations MUST be able to produce and consume JSON.

GET a PID - Description

Once you have the PID url, then you can retrieve the information at once for this PID, by just supplying its URL.

DescriptionGET a PID
URLThe API Service URL with the suffix
HTTP MethodGET
SecurityYou must authenticate before actually getting PID information.

The data you must send in order to get the PID are described in the following table

TypeDescriptionRequiredDefault valueExample value
url to authenticatea url to authenticate. We use the service PID service URLYesNonehttps://epic.grnet.gr/api/v2/handles/
usernameyour usernameYesNone
passwordyour passwordYesNone

Example

In this example we are going to retrieve the information of a PID with the following URL https://epic.grnet.gr/api/v2/handles/11239/05C3DB56-5692-11E3-AF8F-1C6F65A666B5

The request in curl

curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" https://epic.grnet.gr/api/v2/handles/11239/05C3DB56-5692-11E3-AF8F-1C6F65A666B5

The response:

  • HTTP/1.1 200 OK: (Success)
  • HTTP/1.1 401 Unauthorized: Your username or your password is wrong
  • HTTP/1.1 404 NOT found: The url doesn't exist

After a successful request, the response consists of an array of the PID and an array of all the information that apply to it. The response provides the idx, the type, and all the data described in the data model.

Get all data: [
{
"idx":1,
"type":"URL",
"parsed_data":"http://www.grnet.gr/",
"data":"aHR0cDovL3d3dy5ncm5ldC5nci8=",
"timestamp":"2013-11-26T11:58:14Z",
"ttl_type":0,
"ttl":86400,
"refs":[],
"privs":"rwr-"
},
{
"idx":2,
"type":"URL",
"parsed_data":"https://www.grnet.gr/en/node/64",
"data":"aHR0cHM6Ly93d3cuZ3JuZXQuZ3IvZW4vbm9kZS82NA==",
"timestamp":"2013-11-26T11:58:14Z",
"ttl_type":0,
"ttl":86400,
"refs":[],
"privs":"rwr-"
},
{
"idx":3,
"type":"INST",
"parsed_data":"CLARIN-EL",
"data":"Q0xBUklOLUVM",
"timestamp":"2013-11-26T11:58:14Z",
"ttl_type":0,
"ttl":86400,
"refs":[],
"privs":"rwr-"
},
{
"idx":100,
"type":"HS_ADMIN",
"parsed_data":{
"adminId":"0.NA/11239",
"adminIdIndex":300,
"perms":{
"add_handle":true,
"delete_handle":true,
"add_naming_auth":false,
"delete_naming_auth":false,
"modify_value":true,
"remove_value":true,
"add_value":true,
"read_value":true,
"modify_admin":true,
"remove_admin":true,
"add_admin":true,
"list_handles":false
}
},
"data":"B/MAAAAKMC5OQS8xMTIzOQAAASw=",
"timestamp":"2013-11-15T14:25:58Z",
"ttl_type":0,
"ttl":86400,
"refs":[],
"privs":"rwr-"
}
]