Deny an admin action request
Denies a pending admin action request. The reviewer cannot be the same user who submitted the request.
curl --request POST \
--url https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny', 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://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"actionRequest": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submittedById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"category": "<string>",
"actionPayload": {},
"requiredApprovals": 123,
"currentApprovals": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submittedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"name": "<string>"
},
"responses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reviewerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"reviewer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"name": "<string>"
},
"note": "<string>"
}
],
"targetEntityType": "<string>",
"targetEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousState": {},
"resolvedAt": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}{
"error": "No jwt provided!"
}{
"error": "Access Forbidden"
}{
"error": "Not Found",
"code": "not_found"
}{
"error": "Conflict: invalid state transition"
}{
"error": "Internal Server Error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of organization
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
Body
Request body for approving or denying an action request.
Optional note explaining the decision. Shown to the submitter.
1000Response
Action request denied
Wrapper response for a single action request, returned by get/approve/deny endpoints.
An admin action that may require approval before execution. When approval mode is enabled, sensitive actions create a pending request. When disabled, actions are auto-approved with an audit record.
Show child attributes
Show child attributes
Human-readable message, e.g. "This action requires approval from another admin."
Was this page helpful?
curl --request POST \
--url https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny', 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://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/organizations/{organizationId}/adminActions/{adminActionRequestId}/deny")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"actionRequest": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submittedById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"category": "<string>",
"actionPayload": {},
"requiredApprovals": 123,
"currentApprovals": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submittedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"name": "<string>"
},
"responses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reviewerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"reviewer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"name": "<string>"
},
"note": "<string>"
}
],
"targetEntityType": "<string>",
"targetEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"previousState": {},
"resolvedAt": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}{
"error": "No jwt provided!"
}{
"error": "Access Forbidden"
}{
"error": "Not Found",
"code": "not_found"
}{
"error": "Conflict: invalid state transition"
}{
"error": "Internal Server Error"
}