curl --request GET \
--url https://api.moonbounce.ai/v1/decisions/{decision_id}/plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.moonbounce.ai/v1/decisions/{decision_id}/plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.moonbounce.ai/v1/decisions/{decision_id}/plans', 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.moonbounce.ai/v1/decisions/{decision_id}/plans",
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://api.moonbounce.ai/v1/decisions/{decision_id}/plans"
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://api.moonbounce.ai/v1/decisions/{decision_id}/plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonbounce.ai/v1/decisions/{decision_id}/plans")
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{
"environment": "production",
"items": [
{
"schema": "moonbounce.intake-plan/1",
"id": "<string>",
"environment": "production",
"decision_id": "<string>",
"parent_plan_id": "<string>",
"revision": 2,
"created_at": "2023-11-07T05:31:56Z",
"intake_release": "<string>",
"planner_release": "<string>",
"guidance_release": "<string>",
"input": {
"schema": "moonbounce.decision-intake/1",
"decision_id": "<string>",
"intake_release": "<string>",
"task": "<string>",
"answers": {},
"materials": [
{
"id": "<string>",
"kind": "policy",
"location": "<string>",
"inspected": true,
"observations": "<string>"
}
],
"constraints": {
"max_elapsed_seconds": 302400,
"max_owner_questions": 500,
"max_model_spend_usd_micros": 500000000,
"source": "user",
"evidence_refs": [
"<string>"
],
"max_refinement_iterations": 500
},
"operation": {
"value": "create",
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"evidence_sets": [
{
"id": "<string>",
"material_id": "<string>",
"fingerprint": "<string>",
"role": "training",
"label_source": "human",
"facts": {
"labeled": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"labels_desired": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"labels_reviewed": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"examples_compatible": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"boundaries_covered": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"traffic_sample": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"untouched_examples": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
}
},
"coverage_refs": [
"<string>"
],
"membership": {
"location": "<string>",
"sha256": "<string>"
}
}
],
"runtime_requirements": {
"targets": [
{
"metric": "mean_cost_usd_micros",
"maximum": 1,
"source": "user",
"evidence_refs": [
"<string>"
]
}
],
"measurement_context": "<string>"
},
"artifact_versions": [
{
"id": "<string>",
"kind": "brief",
"fingerprint": "<string>"
}
],
"evidence_records": [
{
"id": "<string>",
"stage_id": "objective",
"bindings": [
{
"artifact_id": "<string>",
"fingerprint": "<string>"
}
],
"scope": [
"outcome_tradeoffs"
],
"evidence_refs": [
"<string>"
],
"recorded_at": "2023-11-07T05:31:56Z"
}
]
},
"route": "build",
"approach": "reconcile",
"deliverable": "draft",
"budget": {
"max_elapsed_seconds": 302400,
"max_owner_questions": 500,
"max_model_spend_usd_micros": 500000000,
"source": "user",
"evidence_refs": [
"<string>"
],
"max_refinement_iterations": 500
},
"stages": [
{
"id": "objective",
"disposition": "include",
"depth": "basic",
"suggested_depth": "basic",
"rule_ids": [
"<string>"
],
"reason": "<string>",
"limits": {
"owner_questions": 5000,
"synthetic_cases": 5000,
"label_checks": 5000,
"attack_rounds": 5000,
"attack_cases": 5000,
"assessment_cases": 5000,
"baseline_scorings": 5000,
"refinement_iterations": 5000
},
"depends_on": [
"objective"
],
"done_when": [
"<string>"
],
"reconsider_when": [
"<string>"
],
"requires_confirmation": [
"estimate"
],
"guidance": {
"topic": "<string>",
"release": "<string>",
"delivery": "skill",
"path": "<string>"
},
"evidence_goal": "<string>",
"scope": [
"outcome_tradeoffs"
]
}
],
"applied_rules": [
"<string>"
],
"gaps": [
{
"code": "<string>",
"question_ids": [
"<string>"
],
"stage_ids": [
"objective"
],
"message": "<string>",
"field_paths": [
"<string>"
]
}
],
"source_upload": {
"upload_id": "<string>",
"sha256": "<string>"
},
"assumptions": [
{
"value": true,
"basis": "<string>",
"evidence_refs": [
"<string>"
],
"field_path": "<string>"
}
],
"operation": "create",
"adapter_release": "<string>",
"evidence_status": [
{
"record_id": "<string>",
"status": "reusable",
"invalidated_by": [
"<string>"
],
"reason": "<string>"
}
]
}
],
"next_cursor": "<string>",
"has_more": true
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}List a decision's advisory plans
Reads only, newest first. Cursors bind the calling organization, environment and decision. A page is also bounded by snapshot bytes; follow next_cursor while has_more. A decision without plans returns an empty page.
curl --request GET \
--url https://api.moonbounce.ai/v1/decisions/{decision_id}/plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.moonbounce.ai/v1/decisions/{decision_id}/plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.moonbounce.ai/v1/decisions/{decision_id}/plans', 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.moonbounce.ai/v1/decisions/{decision_id}/plans",
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://api.moonbounce.ai/v1/decisions/{decision_id}/plans"
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://api.moonbounce.ai/v1/decisions/{decision_id}/plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonbounce.ai/v1/decisions/{decision_id}/plans")
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{
"environment": "production",
"items": [
{
"schema": "moonbounce.intake-plan/1",
"id": "<string>",
"environment": "production",
"decision_id": "<string>",
"parent_plan_id": "<string>",
"revision": 2,
"created_at": "2023-11-07T05:31:56Z",
"intake_release": "<string>",
"planner_release": "<string>",
"guidance_release": "<string>",
"input": {
"schema": "moonbounce.decision-intake/1",
"decision_id": "<string>",
"intake_release": "<string>",
"task": "<string>",
"answers": {},
"materials": [
{
"id": "<string>",
"kind": "policy",
"location": "<string>",
"inspected": true,
"observations": "<string>"
}
],
"constraints": {
"max_elapsed_seconds": 302400,
"max_owner_questions": 500,
"max_model_spend_usd_micros": 500000000,
"source": "user",
"evidence_refs": [
"<string>"
],
"max_refinement_iterations": 500
},
"operation": {
"value": "create",
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"evidence_sets": [
{
"id": "<string>",
"material_id": "<string>",
"fingerprint": "<string>",
"role": "training",
"label_source": "human",
"facts": {
"labeled": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"labels_desired": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"labels_reviewed": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"examples_compatible": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"boundaries_covered": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"traffic_sample": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
},
"untouched_examples": {
"value": true,
"source": "user",
"evidence_refs": [
"<string>"
],
"note": "<string>"
}
},
"coverage_refs": [
"<string>"
],
"membership": {
"location": "<string>",
"sha256": "<string>"
}
}
],
"runtime_requirements": {
"targets": [
{
"metric": "mean_cost_usd_micros",
"maximum": 1,
"source": "user",
"evidence_refs": [
"<string>"
]
}
],
"measurement_context": "<string>"
},
"artifact_versions": [
{
"id": "<string>",
"kind": "brief",
"fingerprint": "<string>"
}
],
"evidence_records": [
{
"id": "<string>",
"stage_id": "objective",
"bindings": [
{
"artifact_id": "<string>",
"fingerprint": "<string>"
}
],
"scope": [
"outcome_tradeoffs"
],
"evidence_refs": [
"<string>"
],
"recorded_at": "2023-11-07T05:31:56Z"
}
]
},
"route": "build",
"approach": "reconcile",
"deliverable": "draft",
"budget": {
"max_elapsed_seconds": 302400,
"max_owner_questions": 500,
"max_model_spend_usd_micros": 500000000,
"source": "user",
"evidence_refs": [
"<string>"
],
"max_refinement_iterations": 500
},
"stages": [
{
"id": "objective",
"disposition": "include",
"depth": "basic",
"suggested_depth": "basic",
"rule_ids": [
"<string>"
],
"reason": "<string>",
"limits": {
"owner_questions": 5000,
"synthetic_cases": 5000,
"label_checks": 5000,
"attack_rounds": 5000,
"attack_cases": 5000,
"assessment_cases": 5000,
"baseline_scorings": 5000,
"refinement_iterations": 5000
},
"depends_on": [
"objective"
],
"done_when": [
"<string>"
],
"reconsider_when": [
"<string>"
],
"requires_confirmation": [
"estimate"
],
"guidance": {
"topic": "<string>",
"release": "<string>",
"delivery": "skill",
"path": "<string>"
},
"evidence_goal": "<string>",
"scope": [
"outcome_tradeoffs"
]
}
],
"applied_rules": [
"<string>"
],
"gaps": [
{
"code": "<string>",
"question_ids": [
"<string>"
],
"stage_ids": [
"objective"
],
"message": "<string>",
"field_paths": [
"<string>"
]
}
],
"source_upload": {
"upload_id": "<string>",
"sha256": "<string>"
},
"assumptions": [
{
"value": true,
"basis": "<string>",
"evidence_refs": [
"<string>"
],
"field_path": "<string>"
}
],
"operation": "create",
"adapter_release": "<string>",
"evidence_status": [
{
"record_id": "<string>",
"status": "reusable",
"invalidated_by": [
"<string>"
],
"reason": "<string>"
}
]
}
],
"next_cursor": "<string>",
"has_more": true
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}Authorizations
An API key, sent as Authorization: Bearer <key>. Each operation lists the scope its key needs: decisions:evaluate (evaluate and read evaluations), decisions:feedback (your app's feedback) or decisions:develop (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.
Scopes
Path Parameters
A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.
^[a-z][a-z0-9_.-]{0,127}$Query Parameters
1 <= x <= 1001 - 2048