ParseOsi
curl --request POST \
--url https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": "<string>"
}
'import requests
url = "https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse"
payload = { "document": "<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({document: '<string>'})
};
fetch('https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse', 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://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse",
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([
'document' => '<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://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse"
payload := strings.NewReader("{\n \"document\": \"<string>\"\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://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse")
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 \"document\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"semanticModel": {
"declarerEntityId": "<string>",
"nativeName": "<string>",
"description": "<string>",
"sqlPlatform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"groups": [
{
"name": "<string>",
"kind": "FIELD_GROUP_KIND_UNSPECIFIED",
"fields": [
{
"name": "<string>",
"nativeName": "<string>",
"nativeType": "<string>",
"description": "<string>",
"ordinalPosition": 123,
"tags": [
{
"tagName": "<string>",
"tagValue": "<string>",
"kind": "SCHEMA_TAG_KIND_UNSPECIFIED"
}
],
"definition": {
"nativeKind": "<string>",
"expression": {
"dialects": [
{
"platform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"nativeDialect": "<string>",
"expression": "<string>",
"isTruncated": true
}
]
},
"aggregation": "AGGREGATION_UNSPECIFIED",
"nativeAggregation": "<string>",
"timeGranularity": "TIME_GRANULARITY_UNSPECIFIED",
"key": "KEY_KIND_UNSPECIFIED",
"visibility": "VISIBILITY_UNSPECIFIED",
"displayFolder": "<string>",
"format": "<string>",
"filter": {
"dialects": [
{
"platform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"nativeDialect": "<string>",
"expression": "<string>",
"isTruncated": true
}
]
},
"nonAdditiveDimensions": [
"<string>"
],
"nativeKey": "<string>",
"isTime": true,
"nativeId": "<string>",
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
],
"displayName": "<string>"
}
}
],
"displayName": "<string>",
"source": {
"entityId": "<string>"
},
"description": "<string>",
"primaryKey": [
"<string>"
],
"uniqueKeys": [
{
"fields": [
"<string>"
]
}
],
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
]
}
],
"relationships": [
{
"name": "<string>",
"from": "<string>",
"fromFields": [
"<string>"
],
"to": "<string>",
"toFields": [
"<string>"
],
"cardinality": "CARDINALITY_UNSPECIFIED",
"state": "RELATIONSHIP_STATE_UNSPECIFIED",
"on": {
"dialects": [
{
"platform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"nativeDialect": "<string>",
"expression": "<string>",
"isTruncated": true
}
]
},
"joinType": "JOIN_TYPE_UNSPECIFIED",
"nativeJoinType": "<string>",
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
]
}
],
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
]
},
"findings": [
{
"severity": "OSI_FINDING_SEVERITY_UNSPECIFIED",
"check": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"osiVersion": "<string>"
}synq.entities.semantic_models.v1alpha.OsiService
ParseOsi
Parse an OSI document into a semantic model.
A document with an ERROR finding is refused with INVALID_ARGUMENT and an OsiValidationFailure detail that lists every ERROR finding. A document with only WARNING findings parses, and the response lists the warnings.
POST
/
api
/
entities
/
semantic-models
/
v1alpha
/
osi
/
parse
ParseOsi
curl --request POST \
--url https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": "<string>"
}
'import requests
url = "https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse"
payload = { "document": "<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({document: '<string>'})
};
fetch('https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse', 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://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse",
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([
'document' => '<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://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse"
payload := strings.NewReader("{\n \"document\": \"<string>\"\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://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/semantic-models/v1alpha/osi/parse")
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 \"document\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"semanticModel": {
"declarerEntityId": "<string>",
"nativeName": "<string>",
"description": "<string>",
"sqlPlatform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"groups": [
{
"name": "<string>",
"kind": "FIELD_GROUP_KIND_UNSPECIFIED",
"fields": [
{
"name": "<string>",
"nativeName": "<string>",
"nativeType": "<string>",
"description": "<string>",
"ordinalPosition": 123,
"tags": [
{
"tagName": "<string>",
"tagValue": "<string>",
"kind": "SCHEMA_TAG_KIND_UNSPECIFIED"
}
],
"definition": {
"nativeKind": "<string>",
"expression": {
"dialects": [
{
"platform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"nativeDialect": "<string>",
"expression": "<string>",
"isTruncated": true
}
]
},
"aggregation": "AGGREGATION_UNSPECIFIED",
"nativeAggregation": "<string>",
"timeGranularity": "TIME_GRANULARITY_UNSPECIFIED",
"key": "KEY_KIND_UNSPECIFIED",
"visibility": "VISIBILITY_UNSPECIFIED",
"displayFolder": "<string>",
"format": "<string>",
"filter": {
"dialects": [
{
"platform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"nativeDialect": "<string>",
"expression": "<string>",
"isTruncated": true
}
]
},
"nonAdditiveDimensions": [
"<string>"
],
"nativeKey": "<string>",
"isTime": true,
"nativeId": "<string>",
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
],
"displayName": "<string>"
}
}
],
"displayName": "<string>",
"source": {
"entityId": "<string>"
},
"description": "<string>",
"primaryKey": [
"<string>"
],
"uniqueKeys": [
{
"fields": [
"<string>"
]
}
],
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
]
}
],
"relationships": [
{
"name": "<string>",
"from": "<string>",
"fromFields": [
"<string>"
],
"to": "<string>",
"toFields": [
"<string>"
],
"cardinality": "CARDINALITY_UNSPECIFIED",
"state": "RELATIONSHIP_STATE_UNSPECIFIED",
"on": {
"dialects": [
{
"platform": "DATA_PLATFORM_TYPE_UNSPECIFIED",
"nativeDialect": "<string>",
"expression": "<string>",
"isTruncated": true
}
]
},
"joinType": "JOIN_TYPE_UNSPECIFIED",
"nativeJoinType": "<string>",
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
]
}
],
"aiContext": {
"text": "<string>",
"instructions": "<string>",
"synonyms": [
"<string>"
],
"examples": [
"<string>"
],
"extraJson": "<string>"
},
"customExtensions": [
{
"vendorName": "<string>",
"data": "<string>"
}
]
},
"findings": [
{
"severity": "OSI_FINDING_SEVERITY_UNSPECIFIED",
"check": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"osiVersion": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The OSI document, in YAML or JSON. string.max_bytes = 2097152
Minimum string length:
1Response
200 - application/json
Success