Get Environments
Only the ones you have access to
Now what?
You've got a token, now what? How about we start simple and get a list of some stuff. Maybe your environments. Seems like as good a place to start as anywhere else in the API.
environments
GET
https://portal.tuono.io/api/v1/environments
Get a list of environments that you have access to in your organization.
Headers
Name
Type
Description
Authorization
string
Bearer {YOUR_TOKEN}
Content-Type
string
application/json
{'objects': [{'_id': '5f76120d92160c05fa55ac04',
'_inserted': '2020-10-01 17:29:49',
'_updated': '2020-10-01 17:31:20',
'blueprint_ids': {},
'blueprints': [],
'credential_set': 'mh-static-aws',
'credential_set_id': '5f7612549e2aa1e6a254c4ae',
'dev_enabled': True,
'name': 'API-demo',
'object_count': 0,
'organization_id': '5f76112956599f23a120fdcc',
'prefix': 'API-demo',
'state': 'absent',
'sts_security': False,
'venue': 'aws'
}],
'pagination': {'item_count': 1, 'page': 1, 'page_count': 1, 'page_size': 0},
'update_time': '2020-10-01T17:54:31.220645'
}
Example code
import requests
token = "Your JWT token"
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
url = "https://portal.tuono.io/api/v1/environments"
response = requests.get(url, headers=headers)
environments = response.json()["objects"]
Last updated
Was this helpful?