Other
Describe every model in the data graph.
Describe the data graph: each model, its resource path, and its fields.
Products and policies are both projections of this graph, so this is the ground truth either one is defined against. Call it to discover which resources exist and which relationships can be expanded.
Returns
models : GraphModelsResponse.
One entry per model the graph serves.
Examples
GET /v1/graph/models
GET
/
v1
/
graph
/
models
Describe every model in the data graph.
curl --request GET \
--url https://api.solo.one/v1/graph/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solo.one/v1/graph/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solo.one/v1/graph/models', 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.solo.one/v1/graph/models",
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.solo.one/v1/graph/models"
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.solo.one/v1/graph/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.solo.one/v1/graph/models")
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{
"models": [
{
"name": "<string>",
"resource": "<string>",
"listable": true,
"fields": [
{
"name": "<string>",
"type": "<string>",
"is_list": false,
"is_required": false,
"target_model": "<string>"
}
],
"relationships": [
{
"name": "<string>",
"type": "<string>",
"is_list": false,
"is_required": false,
"target_model": "<string>"
}
]
}
]
}⌘I
Describe every model in the data graph.
curl --request GET \
--url https://api.solo.one/v1/graph/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solo.one/v1/graph/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solo.one/v1/graph/models', 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.solo.one/v1/graph/models",
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.solo.one/v1/graph/models"
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.solo.one/v1/graph/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.solo.one/v1/graph/models")
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{
"models": [
{
"name": "<string>",
"resource": "<string>",
"listable": true,
"fields": [
{
"name": "<string>",
"type": "<string>",
"is_list": false,
"is_required": false,
"target_model": "<string>"
}
],
"relationships": [
{
"name": "<string>",
"type": "<string>",
"is_list": false,
"is_required": false,
"target_model": "<string>"
}
]
}
]
}