You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 8
Next »
Create an Account
Authentication session for API use
task | curl | details | description | curl |
---|
authenticate |
| user = {'identifier': 'email', 'password': '******'} |
|
|
curl -H 'Content-Type: application/json' -d '{"identifier": "slavenas@illinois.edu", "password": "medicici"}' https://gltg-dev.ncsa.illinois.edu/geostreams/api/authenticate
Authentication session for API use
task | step | details | description | curl | python example |
---|
authenticate | create user | user = {'identifier': 'email', 'password': '******'} |
|
| r = requests.post(api_server + '/api/authenticate', data=json.dumps(user), headers={'Content-Type': 'application/json'} |
| create headers | headers={'Content-Type': 'application/json'} |
|
|
|
| request | https://greatlakestogulf.org/geostreams/api/authenticate | add user and headers to request |
|
|
| get token | headers = {"x-auth-token": r.headers["x-auth-token"], "Content-Encoding": "application/json"} |
|
| headers = {"x-auth-token": r.headers["x-auth-token"], "Content-Encoding": "application/json"} |
| add headers to api requests |
|
|
|
|
|
|
|
|
|
|