Comment on page
Authentication
The Upright API supports only Access Token -based authentication. The authentication token must be included in the
Authorization
HTTP header.You must be logged in, and have access to the API feature enabled in order to access the administration page. If you have trouble accessing the page, please contact your Upright contact person.
Tokens remain valid until you reset them, which you can also do on the administration page.
If you prefer to setup a machine user in favor of using personal access tokens, contact your Upright contact person. Include the desired email address for the machine user. Note that the email address may not be in use by another user.
The access token must be included in the
Authorization
header. The following examples show how to make an authenticated request to the /metrics/legend
endpoint.curl
Python
JavaScript
curl -H 'Authorization: YOUR_ACCESS_TOKEN' <https://api.uprightproject/v1/metrics/legend>
import requests
url = ‘<https://api.uprightproject.com/v1/metrics/legend’>
headers = {‘Authorization’, ‘Bearer {token}’.format(token=YOUR_ACCESS_TOKEN)}
res = requests.post(url, data=data, headers=headers)
print(json.loads(res.text))
import fetch from ‘node-fetch’;
async function run_script() {
const url = `/metrics/legend`;
const options = { headers: {‘Authorization’, `Bearer YOUR_ACCESS_TOKEN`} };
const response = await fetch(url, options); console.log(response.json());
}
await run_script();
For simplicity, the code examples below include the access token as part of the source code. This approach is not recommended in real applications.
Last modified 1yr ago