curl --request GET \
--url https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}', 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.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}",
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.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}"
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.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}")
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{
"resource_id": "4baf8423-db0a-4037-a4cf-f79c60cb67a5",
"user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac",
"requestable": true,
"reason": "REQUESTABLE",
"access_levels": [
{
"access_level_remote_id": "read",
"access_level_name": "Read",
"requestable": true
}
]
}Get apps requestableusers
Checks whether a user can request any resource or group inside this app, matching the App
dropdown on Opal’s Access Request page. app_id may be a connection (native app) or an IDP
resource app (for example an Okta app). Apps are not requested directly, so the response
has no access_levels. Checking another user (or a requester other than the caller)
requires an Opal admin or a custom role with the CHECK_REQUESTABILITY permission; a caller
can always check their own requestability, in which case an app they cannot read is
reported as not found. Requestability does not factor visibility.
curl --request GET \
--url https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}', 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.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}",
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.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}"
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.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/apps/{app_id}/requestable/users/{user_id}")
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{
"resource_id": "4baf8423-db0a-4037-a4cf-f79c60cb67a5",
"user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac",
"requestable": true,
"reason": "REQUESTABLE",
"access_levels": [
{
"access_level_remote_id": "read",
"access_level_name": "Read",
"requestable": true
}
]
}Authorizations
Path Parameters
Query Parameters
Response
Whether the user can request anything in this app, and why.
Whether an asset is requestable for a user, and why.
Why an asset is or is not requestable for a user. Reasons are evaluated in order; the first that applies is returned. REQUESTABLE means at least one access level can be requested.
ASSET_DELETED, REQUESTER_CANNOT_REQUEST_FOR_USER, UNSUPPORTED_ASSET_TYPE, LINKED_GROUP_NOT_REQUESTABLE, CONDITION_SCRIPT_FAILED, REQUESTS_DISABLED, NO_REQUESTABLE_ACCESS_LEVEL, NO_REQUESTABLE_ITEMS, REQUESTABLE "REQUESTABLE"
Was this page helpful?