The inputs behind a figure, their values, and which are missing.
curl --request POST \
--url https://api.vectorshift.ai/v1/object-model/figures/explain \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": {
"axis_filters": {},
"fact_ids": [
"<string>"
],
"known_as_of": "2023-11-07T05:31:56Z",
"records": {
"filter": {
"field": "<string>",
"value": "<string>"
},
"type_id": "<string>"
},
"report_date": "2023-11-07T05:31:56Z",
"subject_ids": [
"<string>"
],
"verified_only": true,
"window": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"unbounded": true
},
"world_id": "<string>"
},
"definition_id": "<string>",
"max_depth": 123,
"subject_id": "<string>",
"subject_ids": [
"<string>"
]
}
'import requests
url = "https://api.vectorshift.ai/v1/object-model/figures/explain"
payload = {
"context": {
"axis_filters": {},
"fact_ids": ["<string>"],
"known_as_of": "2023-11-07T05:31:56Z",
"records": {
"filter": {
"field": "<string>",
"value": "<string>"
},
"type_id": "<string>"
},
"report_date": "2023-11-07T05:31:56Z",
"subject_ids": ["<string>"],
"verified_only": True,
"window": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"unbounded": True
},
"world_id": "<string>"
},
"definition_id": "<string>",
"max_depth": 123,
"subject_id": "<string>",
"subject_ids": ["<string>"]
}
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({
context: {
axis_filters: {},
fact_ids: ['<string>'],
known_as_of: '2023-11-07T05:31:56Z',
records: {filter: {field: '<string>', value: '<string>'}, type_id: '<string>'},
report_date: '2023-11-07T05:31:56Z',
subject_ids: ['<string>'],
verified_only: true,
window: {from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z', unbounded: true},
world_id: '<string>'
},
definition_id: '<string>',
max_depth: 123,
subject_id: '<string>',
subject_ids: ['<string>']
})
};
fetch('https://api.vectorshift.ai/v1/object-model/figures/explain', 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.vectorshift.ai/v1/object-model/figures/explain",
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([
'context' => [
'axis_filters' => [
],
'fact_ids' => [
'<string>'
],
'known_as_of' => '2023-11-07T05:31:56Z',
'records' => [
'filter' => [
'field' => '<string>',
'value' => '<string>'
],
'type_id' => '<string>'
],
'report_date' => '2023-11-07T05:31:56Z',
'subject_ids' => [
'<string>'
],
'verified_only' => true,
'window' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'unbounded' => true
],
'world_id' => '<string>'
],
'definition_id' => '<string>',
'max_depth' => 123,
'subject_id' => '<string>',
'subject_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.vectorshift.ai/v1/object-model/figures/explain"
payload := strings.NewReader("{\n \"context\": {\n \"axis_filters\": {},\n \"fact_ids\": [\n \"<string>\"\n ],\n \"known_as_of\": \"2023-11-07T05:31:56Z\",\n \"records\": {\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"type_id\": \"<string>\"\n },\n \"report_date\": \"2023-11-07T05:31:56Z\",\n \"subject_ids\": [\n \"<string>\"\n ],\n \"verified_only\": true,\n \"window\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"unbounded\": true\n },\n \"world_id\": \"<string>\"\n },\n \"definition_id\": \"<string>\",\n \"max_depth\": 123,\n \"subject_id\": \"<string>\",\n \"subject_ids\": [\n \"<string>\"\n ]\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))
}HttpResponse<String> response = Unirest.post("https://api.vectorshift.ai/v1/object-model/figures/explain")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"axis_filters\": {},\n \"fact_ids\": [\n \"<string>\"\n ],\n \"known_as_of\": \"2023-11-07T05:31:56Z\",\n \"records\": {\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"type_id\": \"<string>\"\n },\n \"report_date\": \"2023-11-07T05:31:56Z\",\n \"subject_ids\": [\n \"<string>\"\n ],\n \"verified_only\": true,\n \"window\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"unbounded\": true\n },\n \"world_id\": \"<string>\"\n },\n \"definition_id\": \"<string>\",\n \"max_depth\": 123,\n \"subject_id\": \"<string>\",\n \"subject_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vectorshift.ai/v1/object-model/figures/explain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"axis_filters\": {},\n \"fact_ids\": [\n \"<string>\"\n ],\n \"known_as_of\": \"2023-11-07T05:31:56Z\",\n \"records\": {\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"type_id\": \"<string>\"\n },\n \"report_date\": \"2023-11-07T05:31:56Z\",\n \"subject_ids\": [\n \"<string>\"\n ],\n \"verified_only\": true,\n \"window\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"unbounded\": true\n },\n \"world_id\": \"<string>\"\n },\n \"definition_id\": \"<string>\",\n \"max_depth\": 123,\n \"subject_id\": \"<string>\",\n \"subject_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"inputs": [
{
"as_of": "2023-11-07T05:31:56Z",
"assertable": true,
"display_name": "<string>",
"input_id": "<string>",
"kind": "<string>",
"note": "<string>",
"status": "<string>",
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
],
"root": {
"facts": [
{
"asserted_at": "2023-11-07T05:31:56Z",
"asserted_by": "<string>",
"asserted_by_label": "<string>",
"axis_values": {},
"derived": true,
"fact_id": "<string>",
"note": "<string>",
"quantity_id": "<string>",
"retracted": true,
"seq": "<string>",
"source_channel": "<string>",
"source_kind": "<string>",
"subject_id": "<string>",
"subject_label": "<string>",
"superseded_count": 123,
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"value": 123,
"verified": true,
"world_id": "<string>"
}
],
"inputs": "<array>",
"label": "<string>",
"note": "<string>",
"unit": "<string>",
"value": 123
}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}Facts and Figures
Explain a figure
The inputs behind a figure, their values, and which are missing.
POST
/
v1
/
object-model
/
figures
/
explain
The inputs behind a figure, their values, and which are missing.
curl --request POST \
--url https://api.vectorshift.ai/v1/object-model/figures/explain \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": {
"axis_filters": {},
"fact_ids": [
"<string>"
],
"known_as_of": "2023-11-07T05:31:56Z",
"records": {
"filter": {
"field": "<string>",
"value": "<string>"
},
"type_id": "<string>"
},
"report_date": "2023-11-07T05:31:56Z",
"subject_ids": [
"<string>"
],
"verified_only": true,
"window": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"unbounded": true
},
"world_id": "<string>"
},
"definition_id": "<string>",
"max_depth": 123,
"subject_id": "<string>",
"subject_ids": [
"<string>"
]
}
'import requests
url = "https://api.vectorshift.ai/v1/object-model/figures/explain"
payload = {
"context": {
"axis_filters": {},
"fact_ids": ["<string>"],
"known_as_of": "2023-11-07T05:31:56Z",
"records": {
"filter": {
"field": "<string>",
"value": "<string>"
},
"type_id": "<string>"
},
"report_date": "2023-11-07T05:31:56Z",
"subject_ids": ["<string>"],
"verified_only": True,
"window": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"unbounded": True
},
"world_id": "<string>"
},
"definition_id": "<string>",
"max_depth": 123,
"subject_id": "<string>",
"subject_ids": ["<string>"]
}
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({
context: {
axis_filters: {},
fact_ids: ['<string>'],
known_as_of: '2023-11-07T05:31:56Z',
records: {filter: {field: '<string>', value: '<string>'}, type_id: '<string>'},
report_date: '2023-11-07T05:31:56Z',
subject_ids: ['<string>'],
verified_only: true,
window: {from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z', unbounded: true},
world_id: '<string>'
},
definition_id: '<string>',
max_depth: 123,
subject_id: '<string>',
subject_ids: ['<string>']
})
};
fetch('https://api.vectorshift.ai/v1/object-model/figures/explain', 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.vectorshift.ai/v1/object-model/figures/explain",
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([
'context' => [
'axis_filters' => [
],
'fact_ids' => [
'<string>'
],
'known_as_of' => '2023-11-07T05:31:56Z',
'records' => [
'filter' => [
'field' => '<string>',
'value' => '<string>'
],
'type_id' => '<string>'
],
'report_date' => '2023-11-07T05:31:56Z',
'subject_ids' => [
'<string>'
],
'verified_only' => true,
'window' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'unbounded' => true
],
'world_id' => '<string>'
],
'definition_id' => '<string>',
'max_depth' => 123,
'subject_id' => '<string>',
'subject_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.vectorshift.ai/v1/object-model/figures/explain"
payload := strings.NewReader("{\n \"context\": {\n \"axis_filters\": {},\n \"fact_ids\": [\n \"<string>\"\n ],\n \"known_as_of\": \"2023-11-07T05:31:56Z\",\n \"records\": {\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"type_id\": \"<string>\"\n },\n \"report_date\": \"2023-11-07T05:31:56Z\",\n \"subject_ids\": [\n \"<string>\"\n ],\n \"verified_only\": true,\n \"window\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"unbounded\": true\n },\n \"world_id\": \"<string>\"\n },\n \"definition_id\": \"<string>\",\n \"max_depth\": 123,\n \"subject_id\": \"<string>\",\n \"subject_ids\": [\n \"<string>\"\n ]\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))
}HttpResponse<String> response = Unirest.post("https://api.vectorshift.ai/v1/object-model/figures/explain")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"axis_filters\": {},\n \"fact_ids\": [\n \"<string>\"\n ],\n \"known_as_of\": \"2023-11-07T05:31:56Z\",\n \"records\": {\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"type_id\": \"<string>\"\n },\n \"report_date\": \"2023-11-07T05:31:56Z\",\n \"subject_ids\": [\n \"<string>\"\n ],\n \"verified_only\": true,\n \"window\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"unbounded\": true\n },\n \"world_id\": \"<string>\"\n },\n \"definition_id\": \"<string>\",\n \"max_depth\": 123,\n \"subject_id\": \"<string>\",\n \"subject_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vectorshift.ai/v1/object-model/figures/explain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"axis_filters\": {},\n \"fact_ids\": [\n \"<string>\"\n ],\n \"known_as_of\": \"2023-11-07T05:31:56Z\",\n \"records\": {\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"type_id\": \"<string>\"\n },\n \"report_date\": \"2023-11-07T05:31:56Z\",\n \"subject_ids\": [\n \"<string>\"\n ],\n \"verified_only\": true,\n \"window\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"unbounded\": true\n },\n \"world_id\": \"<string>\"\n },\n \"definition_id\": \"<string>\",\n \"max_depth\": 123,\n \"subject_id\": \"<string>\",\n \"subject_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"inputs": [
{
"as_of": "2023-11-07T05:31:56Z",
"assertable": true,
"display_name": "<string>",
"input_id": "<string>",
"kind": "<string>",
"note": "<string>",
"status": "<string>",
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
],
"root": {
"facts": [
{
"asserted_at": "2023-11-07T05:31:56Z",
"asserted_by": "<string>",
"asserted_by_label": "<string>",
"axis_values": {},
"derived": true,
"fact_id": "<string>",
"note": "<string>",
"quantity_id": "<string>",
"retracted": true,
"seq": "<string>",
"source_channel": "<string>",
"source_kind": "<string>",
"subject_id": "<string>",
"subject_label": "<string>",
"superseded_count": 123,
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"value": 123,
"verified": true,
"world_id": "<string>"
}
],
"inputs": "<array>",
"label": "<string>",
"note": "<string>",
"unit": "<string>",
"value": 123
}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}Authorizations
An API key issued with object_model scopes: Authorization: Bearer sk_…. The scopes: object_model:records:read, object_model:records:write, object_model:facts:read, object_model:facts:write, object_model:model:read, object_model:model:configure, object_model:actions:run, object_model:changes:read. An operation's security lists the scopes it needs; several entries mean any one of them will do. A person field (ref(user), ref_list(user)) holds a user id: look people up by email or id with GET /v1/users, outside this API, with a key that also has users:read.
Body
application/json
