List project machine pool grants
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"grant": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_pool_id": "<string>",
"description": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env_overlay": {},
"default_machine_secret_env_overlay": {},
"default_machine_provider_options_overlay": {},
"default_cwd": "<string>",
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"machine_pool": {
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"management_kind": "tenant",
"description": "<string>",
"provider": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
],
"next_cursor": "<string>"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Machine Pools
List project machine pool grants
Items are ordered by created_at descending, then id descending.
GET
/
orgs
/
{orgID}
/
projects
/
{projectID}
/
machine-pool-grants
List project machine pool grants
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"grant": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_pool_id": "<string>",
"description": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env_overlay": {},
"default_machine_secret_env_overlay": {},
"default_machine_provider_options_overlay": {},
"default_cwd": "<string>",
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"machine_pool": {
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"management_kind": "tenant",
"description": "<string>",
"provider": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
],
"next_cursor": "<string>"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Authorizations
bearerAuthbrowserSessionCookie
An opaque Omnara personal or organization bearer token.
Path Parameters
Pattern:
^org_[a-z2-7]{26}$Pattern:
^proj_[a-z2-7]{26}$Query Parameters
Case-insensitive glob over the list's logical name. * matches zero or more characters, ? matches one character, and \ escapes a wildcard.
Required string length:
1 - 200Sort order for named resources that expose created and modified timestamps.
Available options:
name, -name, -updated_at, updated_at, -created_at, created_at Maximum number of items to return in one page.
Required range:
1 <= x <= 100Opaque pagination cursor from a previous response's next_cursor. Omit for the first page.
Maximum string length:
1024⌘I