Create Action Request
curl --request POST \
--url https://api.vertracloud.app/v1/workspaces/{id}/action-requests \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"resource_id": "<string>",
"params": {}
}
'import requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/action-requests"
payload = {
"action": "<string>",
"resource_id": "<string>",
"params": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: '<string>', resource_id: '<string>', params: {}})
};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/action-requests', 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.vertracloud.app/v1/workspaces/{id}/action-requests",
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([
'action' => '<string>',
'resource_id' => '<string>',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://api.vertracloud.app/v1/workspaces/{id}/action-requests"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vertracloud.app/v1/workspaces/{id}/action-requests")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/action-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_bodyAction Requests
Create Action Request
Asks for a sensitive action you don’t have the permission to run yourself. Any member; an API key needs the workspaces:write scope.
POST
/
v1
/
workspaces
/
{id}
/
action-requests
Create Action Request
curl --request POST \
--url https://api.vertracloud.app/v1/workspaces/{id}/action-requests \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"resource_id": "<string>",
"params": {}
}
'import requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/action-requests"
payload = {
"action": "<string>",
"resource_id": "<string>",
"params": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: '<string>', resource_id: '<string>', params: {}})
};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/action-requests', 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.vertracloud.app/v1/workspaces/{id}/action-requests",
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([
'action' => '<string>',
'resource_id' => '<string>',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://api.vertracloud.app/v1/workspaces/{id}/action-requests"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vertracloud.app/v1/workspaces/{id}/action-requests")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/action-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_bodyAn API key needs the
workspaces:write scope. The request is only decided in the dashboard —
approving and rejecting are not available to API keys.action | requires permission |
|---|---|
app_delete | apps:delete |
database_delete | databases:delete |
snapshot_create | snapshots:manage |
snapshot_restore | snapshots:manage |
Path
string
required
Workspace ID.
Body
string
required
One of
app_delete, database_delete, snapshot_create, snapshot_restore.string
required
The application or database this action targets. Must belong to this workspace.
object
Action-specific parameters, persisted as-is — these are exactly what runs if approved, nothing sent on approve is used.
snapshot_restore requires { "snapshot_id": "<uuid>" } (a snapshot of this resource); the other actions take none ({} or omitted). Any other key returns WORKSPACE_ACTION_INVALID_PARAMS.Response
Same shape as a List Action Requests row,status: "pending".
Errors
| Status | Code | When |
|---|---|---|
| 400 | WORKSPACE_ACTION_NOT_NEEDED | Caller already has the permission the action maps to — run it directly instead of requesting it. |
| 403 | API_KEY_SCOPE_DENIED | Called with an API key that lacks the workspaces:write scope. |
| 404 | WORKSPACE_NOT_FOUND | Workspace doesn’t exist or you’re not a member. |
| 404 | APP_NOT_FOUND / DATABASE_NOT_FOUND | resource_id doesn’t belong to this workspace. |