Open drafts of model changes.
curl --request GET \
--url https://api.vectorshift.ai/v1/object-model/model/drafts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vectorshift.ai/v1/object-model/model/drafts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vectorshift.ai/v1/object-model/model/drafts', 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/model/drafts",
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.vectorshift.ai/v1/object-model/model/drafts"
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.vectorshift.ai/v1/object-model/model/drafts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vectorshift.ai/v1/object-model/model/drafts")
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{
"applied": true,
"conflicts": [
{
"ancestor": "<string>",
"change": "<string>",
"declaration_id": "<string>",
"display_name": "<string>",
"kind": "<string>",
"ours": "<string>",
"reason": "<string>",
"theirs": "<string>"
}
],
"draft": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_label": "<string>",
"declarations": [
{
"conflict": {
"ancestor": "<string>",
"change": "<string>",
"declaration_id": "<string>",
"display_name": "<string>",
"kind": "<string>",
"ours": "<string>",
"reason": "<string>",
"theirs": "<string>"
},
"declaration_id": "<string>",
"kind": "<string>",
"live": true,
"member": "<string>",
"op": "<string>",
"resolution": "<string>",
"source": "<string>",
"stale": true
}
],
"draft_id": "<string>",
"from_template_version": "<string>",
"kind": "<string>",
"published_version": "<string>",
"revision": "<string>",
"status": "<string>",
"template_id": "<string>",
"title": "<string>",
"to_template_version": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"drafts": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_label": "<string>",
"declarations": [
{
"conflict": {
"ancestor": "<string>",
"change": "<string>",
"declaration_id": "<string>",
"display_name": "<string>",
"kind": "<string>",
"ours": "<string>",
"reason": "<string>",
"theirs": "<string>"
},
"declaration_id": "<string>",
"kind": "<string>",
"live": true,
"member": "<string>",
"op": "<string>",
"resolution": "<string>",
"source": "<string>",
"stale": true
}
],
"draft_id": "<string>",
"from_template_version": "<string>",
"kind": "<string>",
"published_version": "<string>",
"revision": "<string>",
"status": "<string>",
"template_id": "<string>",
"title": "<string>",
"to_template_version": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"migration_plan_json": "<string>",
"plan_confirmation_required": true,
"problems": [
"<string>"
],
"version": "<string>",
"warnings": [
"<string>"
]
}{
"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": {}
}Definition
List drafts
Open drafts of model changes.
GET
/
v1
/
object-model
/
model
/
drafts
Open drafts of model changes.
curl --request GET \
--url https://api.vectorshift.ai/v1/object-model/model/drafts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vectorshift.ai/v1/object-model/model/drafts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vectorshift.ai/v1/object-model/model/drafts', 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/model/drafts",
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.vectorshift.ai/v1/object-model/model/drafts"
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.vectorshift.ai/v1/object-model/model/drafts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vectorshift.ai/v1/object-model/model/drafts")
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{
"applied": true,
"conflicts": [
{
"ancestor": "<string>",
"change": "<string>",
"declaration_id": "<string>",
"display_name": "<string>",
"kind": "<string>",
"ours": "<string>",
"reason": "<string>",
"theirs": "<string>"
}
],
"draft": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_label": "<string>",
"declarations": [
{
"conflict": {
"ancestor": "<string>",
"change": "<string>",
"declaration_id": "<string>",
"display_name": "<string>",
"kind": "<string>",
"ours": "<string>",
"reason": "<string>",
"theirs": "<string>"
},
"declaration_id": "<string>",
"kind": "<string>",
"live": true,
"member": "<string>",
"op": "<string>",
"resolution": "<string>",
"source": "<string>",
"stale": true
}
],
"draft_id": "<string>",
"from_template_version": "<string>",
"kind": "<string>",
"published_version": "<string>",
"revision": "<string>",
"status": "<string>",
"template_id": "<string>",
"title": "<string>",
"to_template_version": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"drafts": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_label": "<string>",
"declarations": [
{
"conflict": {
"ancestor": "<string>",
"change": "<string>",
"declaration_id": "<string>",
"display_name": "<string>",
"kind": "<string>",
"ours": "<string>",
"reason": "<string>",
"theirs": "<string>"
},
"declaration_id": "<string>",
"kind": "<string>",
"live": true,
"member": "<string>",
"op": "<string>",
"resolution": "<string>",
"source": "<string>",
"stale": true
}
],
"draft_id": "<string>",
"from_template_version": "<string>",
"kind": "<string>",
"published_version": "<string>",
"revision": "<string>",
"status": "<string>",
"template_id": "<string>",
"title": "<string>",
"to_template_version": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"migration_plan_json": "<string>",
"plan_confirmation_required": true,
"problems": [
"<string>"
],
"version": "<string>",
"warnings": [
"<string>"
]
}{
"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.
