API - Search a PID
This API uses JSON as the primary exchange format. All implementations MUST be able to produce and consume JSON.
Search a PID - Description
You can search for a PID by using a term.
Type | Description |
---|---|
Description | Search a PID |
URL | The ePIC API Url+?PARAMETER=*term* |
HTTP Method | GET |
Security | You must authenticate before actually getting this information. |
The parameters you may use for a search request are described in the following table:
Parameter | Value | Description | Example value | ||
---|---|---|---|---|---|
INST | string: name of the INST | Search and get the list of PIDs registered by an institute | https://epic.grnet.gr/api/v2/handles/11239/?INST=GRNET | ||
URL | string: the url you are searching for | Search and get the PID of an object with the selected url | https://epic.grnet.gr/api/v2/handles/11239/?URL=http://www.grnet.gr | ||
limit | int: the limit of results | Limit your results | https://epic.grnet.gr/api/v2/handles/11239/?URL=http://www.grnet.gr&limit=10 |
You may also:
- combine the parameters to get the list of PIDs. (e.g. https://epic.grnet.gr/api/v2/handles/11239/?URL=http://www.grnet.gr&INST=GRNET).
- use part of the term in the search parameter (e.g. search for PIDS that contain "grnet" in the URL https://epic.grnet.gr/api/v2/handles/11239/?URL=\*grnet\*).
Example
In this example we are going to use the term to retrieve the list of PIDs with the following URL https://epic.grnet.gr/api/v2/handles/11239/?URL=\*GRNET\*
- 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/?URL=*grnet*
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 containing this term.
GRNET
66742AB2-5685-11E3-A413-1C6F65A666B5
305F66A9-3994-42D6-A9F6-8E629126DE14
B4CF7AEA-55BB-4DB5-9D85-EB2DAD821B07
0CEEA495-71FA-460B-97A4-81E7E597B636