Create and cancel bounded historical policy backtests without changing live enforcement.
POST
/
api
/
headless
/
v1
/
organizations
/
{organizationId}
/
policies
/
backtests
/
{runId}
/
cancel
Cancel policy backtest
curl --request POST \
--url https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": true
}
'import requests
url = "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel"
payload = {
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": True
}
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({reason: '<string>', idempotencyKey: '<string>', confirm: true})
};
fetch('https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"confirm\": true\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))
}{}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Enter a Forge service-account token or delegated OAuth access token. Mintlify adds the Bearer prefix.
Body
application/json
Response
Policy backtest canceled.
The response is of type object.
⌘I
Cancel policy backtest
curl --request POST \
--url https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": true
}
'import requests
url = "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel"
payload = {
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": True
}
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({reason: '<string>', idempotencyKey: '<string>', confirm: true})
};
fetch('https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/policies/backtests/{runId}/cancel"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"confirm\": true\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))
}{}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}