curl --request GET \
--url https://api.moonbounce.ai/v1/decisions/{decision_id}/suggestions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.moonbounce.ai/v1/decisions/{decision_id}/suggestions"
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}/suggestions', 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}/suggestions",
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}/suggestions"
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}/suggestions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonbounce.ai/v1/decisions/{decision_id}/suggestions")
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": [
{
"id": "<string>",
"decision_id": "<string>",
"kind": "feature_rewrite",
"target": "structure",
"summary": "<string>",
"environment": "production",
"base": {
"structure": "<string>",
"weights": "<string>",
"engine_profile": "<string>"
},
"candidate": {
"structure": "<string>",
"weights": "<string>",
"engine_profile": "<string>",
"weights_pin": "default"
},
"requires": [
"<string>"
],
"candidate_spec": {
"format": "moonbounce.spec/0",
"nodes": {},
"output": "<string>",
"guidance": "<string>",
"target": "<string>",
"meta": {
"title": "<string>",
"description": "<string>",
"owner": "<string>",
"tags": [
"<string>"
],
"display": {}
}
},
"diff": [
{
"op": "replace",
"path": "<string>",
"before": "<unknown>",
"after": "<unknown>"
}
],
"evidence": {
"label": "starting_examples",
"frozen_at": "2023-11-07T05:31:56Z",
"by_split": {
"seed": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"train": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"holdout": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
}
},
"noise_rate": 0.5,
"action_mix": {
"before": {},
"after": {},
"on": "<string>",
"n": 1
},
"changed_items": [
{
"evaluation_id": "<string>",
"feedback_id": "<string>",
"split": "seed",
"change": "fix",
"before": {
"features": {},
"outcome": "<string>",
"score": 123
},
"after": {
"features": {},
"outcome": "<string>",
"score": 123
}
}
],
"credited_feedback": [
"<string>"
],
"by_source": {
"app_native": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"app_resolution": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"reviewer": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"owner": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"import": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"synthetic_review": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
}
}
},
"preview_id": "<string>",
"generator": {
"name": "<string>",
"version": "<string>",
"model": "<string>"
},
"status": "proposed",
"created_at": "2023-11-07T05:31:56Z",
"status_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"accepted_evaluation_id": "<string>",
"accepted_at": "2023-11-07T05:31:56Z",
"stale": {
"reason": "<string>",
"cases": 2
}
}
],
"next_cursor": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}List suggestions for a decision
Newest first, the key’s environment’s suggestions only. On a production key, acceptance is recorded before the list is read: a suggestion whose candidate hashes have since served primary production traffic comes back accepted. A test key’s suggestions are never accepted. stale is set on a suggestion when feedback on a case it was evaluated on changed after its evidence was read (an answer changed, withdrawn, corrected or newly given); its evidence is never rescored, so preview it again.
curl --request GET \
--url https://api.moonbounce.ai/v1/decisions/{decision_id}/suggestions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.moonbounce.ai/v1/decisions/{decision_id}/suggestions"
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}/suggestions', 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}/suggestions",
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}/suggestions"
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}/suggestions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonbounce.ai/v1/decisions/{decision_id}/suggestions")
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": [
{
"id": "<string>",
"decision_id": "<string>",
"kind": "feature_rewrite",
"target": "structure",
"summary": "<string>",
"environment": "production",
"base": {
"structure": "<string>",
"weights": "<string>",
"engine_profile": "<string>"
},
"candidate": {
"structure": "<string>",
"weights": "<string>",
"engine_profile": "<string>",
"weights_pin": "default"
},
"requires": [
"<string>"
],
"candidate_spec": {
"format": "moonbounce.spec/0",
"nodes": {},
"output": "<string>",
"guidance": "<string>",
"target": "<string>",
"meta": {
"title": "<string>",
"description": "<string>",
"owner": "<string>",
"tags": [
"<string>"
],
"display": {}
}
},
"diff": [
{
"op": "replace",
"path": "<string>",
"before": "<unknown>",
"after": "<unknown>"
}
],
"evidence": {
"label": "starting_examples",
"frozen_at": "2023-11-07T05:31:56Z",
"by_split": {
"seed": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"train": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"holdout": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
}
},
"noise_rate": 0.5,
"action_mix": {
"before": {},
"after": {},
"on": "<string>",
"n": 1
},
"changed_items": [
{
"evaluation_id": "<string>",
"feedback_id": "<string>",
"split": "seed",
"change": "fix",
"before": {
"features": {},
"outcome": "<string>",
"score": 123
},
"after": {
"features": {},
"outcome": "<string>",
"score": 123
}
}
],
"credited_feedback": [
"<string>"
],
"by_source": {
"app_native": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"app_resolution": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"reviewer": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"owner": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"import": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
},
"synthetic_review": {
"n": 1,
"fixes": 1,
"breaks": 1,
"base_correct": 1,
"candidate_correct": 1,
"holdout_uses": 1,
"owner_decided": 1
}
}
},
"preview_id": "<string>",
"generator": {
"name": "<string>",
"version": "<string>",
"model": "<string>"
},
"status": "proposed",
"created_at": "2023-11-07T05:31:56Z",
"status_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"accepted_evaluation_id": "<string>",
"accepted_at": "2023-11-07T05:31:56Z",
"stale": {
"reason": "<string>",
"cases": 2
}
}
],
"next_cursor": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {}
}
}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.
Path Parameters
^[a-z][a-z0-9_.-]{0,127}$Query Parameters
proposed, pulled, accepted, rejected, superseded 1 <= x <= 1001 - 1024Response
A page of suggestions
The environment of the key that made the call: production or test. Evaluations, feedback, reviews and suggestions are separate per environment; registered structures are shared.
production, test Show child attributes
Show child attributes