-
Notifications
You must be signed in to change notification settings - Fork 4
HydroDS Web API Description
Pabitra Dash edited this page Sep 4, 2015
·
9 revisions
##HydroDS Web API##
Web API Response Format:
- HTTP Code: 200
- A JSON dictionary with 3 keys
- 'success': true or false
- 'data': a list of values (empty if success key has value of false)
- 'error': a list of messages (empty if success key has value of true)
- A JSON dictionary with 3 keys
- HTTP Code: 400
- A JSON dictionary with keys representing each of the problematic query parameters and a corresponding error message
- HTTP Code: 401
- A JSON dictionary: {'details':'Invalid username/password.'}
- HTTP Code: 404
- A JSON dictionary: {'detail': 'message indicating what was not found'}
- HTTP Code:405
- A JSON dictionary: {"detail": 'a message indicating what HTTP method is not allowed.'}
##Web API end point for listing supported services:
- HTTP method: GET
- URL: http://hydro-ds.uwrl.usu.edu/api/dataservice/capabilities/list
- response JSON data: {'success': true, 'data':[{'service_name': name of the service, 'description': description of the service, 'service_info_url': url for detail service information}, {...}], 'error':[]}
##Web API end point for getting information on a specific service:
- HTTP method: GET
- URL: http://hydro-ds.uwrl.usu.edu/api/dataservice/info/[service_name]
- response JSON data: {'success': true, 'data':{'[service_name]': {'parameters':[{'name': name of parameter, 'description': description of parameter, 'required': true/false, 'type': parameter data type}, {...}], 'error':[]}