List environments
import requests
url = "https://platform.ankra.app/api/v1/org/environments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/environments \
--header 'Authorization: Bearer <token>'{
"environments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"truncated": true
}Deploy Targets
List environments
The organisation’s deploy environments by name. An environment is created by the first host join token minted for it. Requires pipelines.read.
GET
/
api
/
v1
/
org
/
environments
List environments
import requests
url = "https://platform.ankra.app/api/v1/org/environments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/environments \
--header 'Authorization: Bearer <token>'{
"environments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"truncated": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.