Get
curl --request GET \
--url https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy', 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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy",
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: Basic <encoded-value>"
],
]);
$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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"policy": {
"stytch_resources": [
{
"resource_id": "<string>",
"description": "<string>",
"available_actions": [
"<string>"
]
}
],
"custom_roles": [
{
"role_id": "<string>",
"description": "<string>",
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
}
],
"custom_resources": [
{
"resource_id": "<string>",
"description": "<string>",
"available_actions": [
"<string>"
]
}
],
"custom_scopes": [
{
"scope": "<string>",
"description": "<string>",
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
}
],
"stytch_member": {
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
},
"stytch_admin": {
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
},
"stytch_user": {
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
}
},
"status_code": 123
}{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}RBAC
Get RBAC Policy
Get retrieves the RBAC policy for an environment.
GET
/
pwa
/
v3
/
projects
/
:project_slug
/
environments
/
:environment_slug
/
rbac_policy
Get
curl --request GET \
--url https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy', 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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy",
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: Basic <encoded-value>"
],
]);
$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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/rbac_policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"policy": {
"stytch_resources": [
{
"resource_id": "<string>",
"description": "<string>",
"available_actions": [
"<string>"
]
}
],
"custom_roles": [
{
"role_id": "<string>",
"description": "<string>",
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
}
],
"custom_resources": [
{
"resource_id": "<string>",
"description": "<string>",
"available_actions": [
"<string>"
]
}
],
"custom_scopes": [
{
"scope": "<string>",
"description": "<string>",
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
}
],
"stytch_member": {
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
},
"stytch_admin": {
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
},
"stytch_user": {
"permissions": [
{
"resource_id": "<string>",
"actions": [
"<string>"
]
}
]
}
},
"status_code": 123
}{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
⌘I