API - Basic Authentication

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

Basic Authentication - Description

The API allows REST clients to authenticate themselves with a user name and password using basic authentication.

TypeDescription
DescriptionAuthenticate to API Service
URLThe API Service URL
HTTP MethodGET
SecurityBasic Authentication

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

TypeDescriptionRequiredDefault valueExample value
url to authenticatea url to authenticate. We use the service PID service URLYesNoneServiceURL
usernameyour usernameYesNone
passwordyour passwordYesNone

Example

In this example we are going to authenticate by using the main PID service URL.

The request in curl

curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" https://epic.grnet.gr/api/v2/handles/

The response:

  • HTTP/1.1 200 OK: (Success)
  • HTTP/1.1 401 Unauthorized: Your username or your password is wrong