Rest API
Introduction to the CloudTruth API
Introduction
Overview
Getting Started
environments_list
Query Parameters
Name
Type
Description
Last updated
Was this helpful?
Introduction to the CloudTruth API
Last updated
Was this helpful?
Was this helpful?
{
"count": 4,
"next": null,
"previous": null,
"results": [
{
"created_at": "2021-07-19T19:22:44.689825Z",
"description": "The auto-generated default environment.",
"id": "ad34ea7d-c9cb-473e-93fb-06dc468cacd7",
"modified_at": "2021-08-02T19:17:28.920832Z",
"name": "default",
"parent": null,
"url": "https://api.cloudtruth.io/api/v1/environments/ad34ea7d-c9cb-473e-93fb-06dc468cacd7/"
}import requests
token = "Your API Access token"
headers = {'Authorization': f'Api-Key {token}'}
url = "https://api.cloudtruth.io/api/v1/environments/"
response = requests.get(url, headers=headers)
environments = response.json()
print(json.dumps(environments, indent=4, sort_keys=True))token="Your API Access token"
curl -s --header "Content-Type: application/json" \
--header "Authorization: Api-Key ${token}" \
--request GET \
https://api.cloudtruth.io/api/v1/environments/