API - List PID
This API uses JSON as the primary exchange format. All implementations MUST be able to produce and consume JSON.
List PID - Description
You can retrieve the list of pids at once, by just supplying the Service Url with the prefix.
Type | Description |
---|---|
Description | GET a PID |
URL | The API Service URL |
HTTP Method | GET |
Security | You must authenticate before actually getting all PID. |
Because collections can get very lange, they are rendered page by page. By default, you'll only see the first page with at maximum 1000 results. To modify this behaviour, use the following query parameters:
Parameter | Value | Description | Example value | ||
---|---|---|---|---|---|
limit | int: the limit of results | the maximum number of items to return. The default is 1000. As a special case, if you specify limit=0 , all items will be returned, without limit. | https://epic.grnet.gr/api/v2/handles/11239/?limit=10 | ||
page | int: the page of results | When using limit parameter the returned data are displayed on multiple pages. the number of the page to return. I.e., if you specify limit=100&page=3 , items 201 through 300 will be returned | https://epic.grnet.gr/api/v2/handles/11239/?limit=10&page=2 |
Example
In this example we are going to retrieve the information of all PID in the 11239 prefix URL https://epic.grnet.gr/api/v2/handles/11239/
- Curl
- Python
- PHP
- Perl
The request in curl
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" https://epic.grnet.gr/api/v2/handles/11239/
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 a list of PIDs
GRNET
66742AB2-5685-11E3-A413-1C6F65A666B5
305F66A9-3994-42D6-A9F6-8E629126DE14
B4CF7AEA-55BB-4DB5-9D85-EB2DAD821B07
0CEEA495-71FA-460B-97A4-81E7E597B636