Get action
curl --request GET \
--url https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action} \
--header 'Authorization: Bearer <token>'import requests
url = "https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}', 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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}",
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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}"
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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}")
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{
"data": {
"id": "<string>",
"batch_id": "<string>",
"workspace_id": 123,
"type": "increase_budget",
"target_entity_type": "<string>",
"target_entity_id": "<string>",
"target_entity_name": "<string>",
"params": {},
"rationale": "<string>",
"status": "pending",
"batch_status": "pending",
"disposition": {
"receipt_status": "pending",
"outcome_status": "measurable",
"outcome_reason_code": "<string>",
"outcome_checked_at": "2023-11-07T05:31:56Z",
"compensation_reason_code": "<string>",
"recovery_disposition": "no_compensation",
"late_restored": true
},
"policy_decision": "allow",
"policy_reasons": [
"<string>"
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Actions
Get action
Read persisted Actions data for an account available to this workspace key. An unbound key selects account_id; a bound key stays limited to its own account.
GET
/
agent
/
workspaces
/
{workspace}
/
actions
/
{action}
Get action
curl --request GET \
--url https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action} \
--header 'Authorization: Bearer <token>'import requests
url = "https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}', 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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}",
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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}"
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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/{action}")
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{
"data": {
"id": "<string>",
"batch_id": "<string>",
"workspace_id": 123,
"type": "increase_budget",
"target_entity_type": "<string>",
"target_entity_id": "<string>",
"target_entity_name": "<string>",
"params": {},
"rationale": "<string>",
"status": "pending",
"batch_status": "pending",
"disposition": {
"receipt_status": "pending",
"outcome_status": "measurable",
"outcome_reason_code": "<string>",
"outcome_checked_at": "2023-11-07T05:31:56Z",
"compensation_reason_code": "<string>",
"recovery_disposition": "no_compensation",
"late_restored": true
},
"policy_decision": "allow",
"policy_reasons": [
"<string>"
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Workspace execution key with the propose-actions grant. Unbound keys select an available advertising account with account_id.
Query Parameters
Optional positive account ID. A bound key may name only its own account; any other value returns 422. An unbound key may name only an active account with an active connection in its workspace, and must name one when the workspace has more than one.
Required range:
x >= 1Response
Authorized Actions resource.
Show child attributes
Show child attributes