Getting Started / Quick trial-run

  1. Read the authorization requirement.

  2. Register to obtain clientid and secret

  3. Try some of the services /v1/index, for example  /v1/locations/ while passing your OAuth token according to Authorization requirement.
  4. There are 2 samples in Python provided

environments

  • production  
    • api:        https://api.tudelft.nl
    • OAuth2: https://oauth.tudelft.nl/OAuth/oauth2        
  • beta new features are first deployed here so users can test them before the go to production 
    • api:       https://api-a.tudelft.nl     
    • OAuth2: https://oauth.tudelft.nl/OAuth/oauth2

Https

Notice that this API can only be used over https (http is disabled).

Http error codes

The next errors can be returned.

  • 403 Forbidden {"detail": "Authentication credentials were not provided."}
  • 406 Not Acceptable {"detail": "Authorization scheme must be "Bearer"}
  • 403 Forbidden {"detail": "OAuth server has no info for given token"}
  • 500 Server Error {"error": "failed to connect to internal tudelft esb"}
  • 404 Not found { "error": "Not found"}

Generic Parameters (for all services)

format parameter

?format=json return message in json format
?format=xml return message in xml format
?format=api return html page with documentation samples xsd and when available live results. This is also the default so when not provided a complete html page is returned.

 access_token

  • In request header 'Authorization' with the value 'Bearer <base64encoded access_token>'. This is the prefered method.
  • As an request url paramerer  ?access_token=......... . Only use this method during testing. This method will be disabled in het future.
  • In POST form field  'access_token'.