Get approval
curl --request GET \
--url https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}', 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://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}",
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://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}"
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://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}")
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{
"success": true,
"contract_version": 2,
"data": {
"approval": {
"id": "<string>",
"run_id": "<string>",
"automation_id": "<string>",
"kind": "store_change",
"prompt": "<string>",
"preview": {
"content": {},
"changes": [
{
"operation": "<string>",
"object_type": "<string>",
"object_ref": "<string>",
"object_label": "<string>"
}
],
"ai_read": [
{
"what": "<string>",
"count": 1
}
],
"measured_checks": [
{
"name": "<string>",
"passed": true,
"value": "<string>"
}
],
"ai_review": [
{
"skill": "<string>",
"passed": true,
"warnings": [
"<string>"
]
}
]
},
"request_hash": "<string>",
"status": "waiting",
"decided_by": 123,
"decided_at": "2023-11-07T05:31:56Z",
"comment": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}Get approval
One approval, with the preview of what its run would change once approved.
Needs the automations:read scope.
GET
/
v1
/
automations
/
approvals
/
{approvalId}
Get approval
curl --request GET \
--url https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}', 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://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}",
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://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}"
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://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://automations-api.vortexiq.ai/v1/automations/approvals/{approvalId}")
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{
"success": true,
"contract_version": 2,
"data": {
"approval": {
"id": "<string>",
"run_id": "<string>",
"automation_id": "<string>",
"kind": "store_change",
"prompt": "<string>",
"preview": {
"content": {},
"changes": [
{
"operation": "<string>",
"object_type": "<string>",
"object_ref": "<string>",
"object_label": "<string>"
}
],
"ai_read": [
{
"what": "<string>",
"count": 1
}
],
"measured_checks": [
{
"name": "<string>",
"passed": true,
"value": "<string>"
}
],
"ai_review": [
{
"skill": "<string>",
"passed": true,
"warnings": [
"<string>"
]
}
]
},
"request_hash": "<string>",
"status": "waiting",
"decided_by": 123,
"decided_at": "2023-11-07T05:31:56Z",
"comment": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"success": false,
"contract_version": 2,
"message": "<string>",
"code": "<string>",
"errors": {}
}Authorizations
bearerAuthapiCredential
A bearer token from Login, sent as Authorization: Bearer <token>. Valid for 60 minutes; it acts as the person named at login, within their organisation, and never approves. Rotating or disabling the organisation's API credential ends every token made with it on its next call. See Authentication.
Path Parameters
The approval's id. A public id (a ULID).
Pattern:
^[0-9A-HJKMNP-TV-Z]{26}$Was this page helpful?
⌘I