curl --request GET \
--url https://devx.{environment}.oleria.io/v1/schema/models/{model_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://devx.{environment}.oleria.io/v1/schema/models/{model_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devx.{environment}.oleria.io/v1/schema/models/{model_name}', 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://devx.{environment}.oleria.io/v1/schema/models/{model_name}",
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://devx.{environment}.oleria.io/v1/schema/models/{model_name}"
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://devx.{environment}.oleria.io/v1/schema/models/{model_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devx.{environment}.oleria.io/v1/schema/models/{model_name}")
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{
"name": "<string>",
"datasets": [
{
"name": "<string>",
"source": "<string>",
"primary_key": [
"<string>"
],
"unique_keys": [
[
"<string>"
]
],
"description": "<string>",
"ai_context": "<string>",
"fields": [
{
"name": "<string>",
"expression": {
"dialects": [
{
"expression": "<string>"
}
]
},
"dimension": {
"is_time": true
},
"label": "<string>",
"description": "<string>",
"ai_context": "<string>",
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"description": "<string>",
"ai_context": "<string>",
"relationships": [
{
"name": "<string>",
"from": "<string>",
"to": "<string>",
"from_columns": [
"<string>"
],
"to_columns": [
"<string>"
],
"ai_context": "<string>",
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"metrics": [
{
"name": "<string>",
"expression": {
"dialects": [
{
"expression": "<string>"
}
]
},
"description": "<string>",
"ai_context": "<string>",
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"custom_extensions": [
{
"data": "<string>"
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}Get a model
Returns the full OSI semantic model definition for the given model name, including all datasets, fields, relationships, and metrics. This is the primary endpoint AI agents and BI platforms use to discover the data landscape before generating queries.
curl --request GET \
--url https://devx.{environment}.oleria.io/v1/schema/models/{model_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://devx.{environment}.oleria.io/v1/schema/models/{model_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devx.{environment}.oleria.io/v1/schema/models/{model_name}', 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://devx.{environment}.oleria.io/v1/schema/models/{model_name}",
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://devx.{environment}.oleria.io/v1/schema/models/{model_name}"
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://devx.{environment}.oleria.io/v1/schema/models/{model_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devx.{environment}.oleria.io/v1/schema/models/{model_name}")
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{
"name": "<string>",
"datasets": [
{
"name": "<string>",
"source": "<string>",
"primary_key": [
"<string>"
],
"unique_keys": [
[
"<string>"
]
],
"description": "<string>",
"ai_context": "<string>",
"fields": [
{
"name": "<string>",
"expression": {
"dialects": [
{
"expression": "<string>"
}
]
},
"dimension": {
"is_time": true
},
"label": "<string>",
"description": "<string>",
"ai_context": "<string>",
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"description": "<string>",
"ai_context": "<string>",
"relationships": [
{
"name": "<string>",
"from": "<string>",
"to": "<string>",
"from_columns": [
"<string>"
],
"to_columns": [
"<string>"
],
"ai_context": "<string>",
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"metrics": [
{
"name": "<string>",
"expression": {
"dialects": [
{
"expression": "<string>"
}
]
},
"description": "<string>",
"ai_context": "<string>",
"custom_extensions": [
{
"data": "<string>"
}
]
}
],
"custom_extensions": [
{
"data": "<string>"
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}{
"code": "QUERY_PARSE_ERROR",
"message": "Failed to parse SQL query",
"details": {
"line": 3,
"column": 15,
"hint": "Unexpected token near 'SELCT'"
},
"reasons": [
{
"code": "MUTATION_NOT_ALLOWED",
"message": "Only SELECT queries are permitted. Mutation statements are not allowed."
}
]
}Authorizations
OAuth 2.0 Client Credentials flow. The tokenUrl shown is for the production environment. For other environments, replace prod with the target environment name (e.g., auth.staging.oleria.io for staging).
Path Parameters
The unique name of the semantic model. Must be lowercase alphanumeric with underscores or hyphens.
Response
Full OSI semantic model definition
Top-level container representing a complete semantic model
Unique identifier for the semantic model
Collection of logical datasets
1Show child attributes
Show child attributes
Human-readable description
Additional context for AI tools
Defines how datasets are connected
Show child attributes
Show child attributes
Quantifiable measures spanning datasets
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

