curl --request GET \
--url https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users', 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.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users",
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.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users"
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.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users")
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{
"actions": [
"<string>"
],
"users": [
{
"allowed_actions": [
{
"action": "<string>",
"via": [
{
"role_id": "<string>",
"role_name": "<string>",
"attachment_scope": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"grant_resource": "<string>"
}
]
}
],
"kind": "human",
"user_id": "<string>",
"email": "<string>",
"name": "<string>"
}
],
"next_page_token": "<string>"
}List Users by Resource
List members with effective access to a resource, per action.
curl --request GET \
--url https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users', 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.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users",
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.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users"
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.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.timbal.ai/orgs/{org_id}/iam/resources/{resource}/users")
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{
"actions": [
"<string>"
],
"users": [
{
"allowed_actions": [
{
"action": "<string>",
"via": [
{
"role_id": "<string>",
"role_name": "<string>",
"attachment_scope": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"grant_resource": "<string>"
}
]
}
],
"kind": "human",
"user_id": "<string>",
"email": "<string>",
"name": "<string>"
}
],
"next_page_token": "<string>"
}Authorizations
Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.
Path Parameters
Concrete resource path, for example projects:42 or
projects:42:envs:5. No wildcards.
Query Parameters
Comma-separated action keys to evaluate (for example
projects.envs.deploy,projects.envs.logs). Every action must target
the resource's kind. Omit to evaluate every action applicable to the
resource.
Restrict the report to a single member. Filtering to yourself
requires only org membership; other members require users.read.
Page token for pagination. Pass back the next_page_token from the
previous response.
Response
Members with access and their allowed actions
Action keys that were evaluated, in evaluation order.
Members with at least one allowed action on the resource. May hold fewer entries than the page window even when more pages exist.
Show child attributes
Show child attributes
Token to fetch the next page, or null if this is the last page.