List environments
GET
/api/v1/environments
const url = 'https://osctrl.net/api/v1/environments';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://osctrl.net/api/v1/environments \ --header 'Authorization: <Authorization>'Returns environments visible to the authenticated user.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
Media typeapplication/json
Array<object>
object
accept_enrolls
boolean
carves_tls
boolean
config_interval
integer
config_tls
boolean
created_at
string
debug_http
boolean
enroll_expire
string
hostname
string
icon
string
id
integer
log_interval
integer
logging_tls
boolean
name
string
query_interval
integer
query_tls
boolean
remove_expire
string
type
string
updated_at
string
uuid
string
Examplegenerated
[ { "accept_enrolls": true, "carves_tls": true, "config_interval": 1, "config_tls": true, "created_at": "example", "debug_http": true, "enroll_expire": "example", "hostname": "example", "icon": "example", "id": 1, "log_interval": 1, "logging_tls": true, "name": "example", "query_interval": 1, "query_tls": true, "remove_expire": "example", "type": "example", "updated_at": "example", "uuid": "example" }]Bad request
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Unauthorized
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Forbidden
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Not found
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Conflict
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Too many requests
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Internal server error
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Service unavailable
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}