List Roles
curl --request GET \
--url https://api.vertracloud.app/v1/workspaces/{id}/rolesimport requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/roles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/roles', 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.vertracloud.app/v1/workspaces/{id}/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.vertracloud.app/v1/workspaces/{id}/roles"
req, _ := http.NewRequest("GET", url, nil)
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.vertracloud.app/v1/workspaces/{id}/roles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"response": [
{
"id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"permissions": [
{}
],
"preset": {},
"position": 123,
"members_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
]
}Roles
List Roles
Lists a workspace’s roles. Requires the members:read permission.
GET
/
v1
/
workspaces
/
{id}
/
roles
List Roles
curl --request GET \
--url https://api.vertracloud.app/v1/workspaces/{id}/rolesimport requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/roles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/roles', 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.vertracloud.app/v1/workspaces/{id}/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.vertracloud.app/v1/workspaces/{id}/roles"
req, _ := http.NewRequest("GET", url, nil)
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.vertracloud.app/v1/workspaces/{id}/roles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"response": [
{
"id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"permissions": [
{}
],
"preset": {},
"position": 123,
"members_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
]
}Requires
members:read (not a separate roles:read — reading the role list is bundled with
reading members). An API key needs the workspaces:read scope.
Path
string
required
Workspace ID.
Response
APIWorkspaceRole[]
Show Toggle object
Show Toggle object
string
string
string
WorkspacePermission[]
See the permission catalog — 19 entries across apps, databases, snapshots, members, roles and activities.
'admin' | 'developer' | 'operator' | 'viewer' | null
Seed role this was created from.
null for a hand-made role. Purely informational — a seed role is editable and deletable like any other.number
Display order.
number
string
string
Errors
| Status | Code | When |
|---|---|---|
| 403 | WORKSPACE_PERMISSION_DENIED | Caller lacks members:read. |
| 404 | WORKSPACE_NOT_FOUND | Workspace doesn’t exist or you’re not a member. |