curl --request GET \
--url https://api.orion.file.ai/prod/v1/schemas/file-type \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orion.file.ai/prod/v1/schemas/file-type"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orion.file.ai/prod/v1/schemas/file-type', 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.orion.file.ai/prod/v1/schemas/file-type",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.orion.file.ai/prod/v1/schemas/file-type"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.orion.file.ai/prod/v1/schemas/file-type")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orion.file.ai/prod/v1/schemas/file-type")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"schemas": [
{
"id": "1",
"fields": [],
"blueprintId": "1",
"originalSchemaId": "1",
"schemaHistoryId": "1",
"schemaHistoryVersionNumber": 1,
"fileId": "1",
"blueprintMode": "USER",
"schemaType": "SYSTEM",
"state": "ACTIVE",
"usageApprovalState": "APPROVED",
"schemaOverrideType": "NONE",
"aiSchemaVersion": "1",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z"
}
],
"count": 1,
"currentPage": 1
}Get file type schemas
This endpoint is used to get the file type schemas that are available in the workspace.
The response will contain a list of schemas that are associated with the file types in the workspace.
curl --request GET \
--url https://api.orion.file.ai/prod/v1/schemas/file-type \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orion.file.ai/prod/v1/schemas/file-type"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orion.file.ai/prod/v1/schemas/file-type', 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.orion.file.ai/prod/v1/schemas/file-type",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.orion.file.ai/prod/v1/schemas/file-type"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.orion.file.ai/prod/v1/schemas/file-type")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orion.file.ai/prod/v1/schemas/file-type")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"schemas": [
{
"id": "1",
"fields": [],
"blueprintId": "1",
"originalSchemaId": "1",
"schemaHistoryId": "1",
"schemaHistoryVersionNumber": 1,
"fileId": "1",
"blueprintMode": "USER",
"schemaType": "SYSTEM",
"state": "ACTIVE",
"usageApprovalState": "APPROVED",
"schemaOverrideType": "NONE",
"aiSchemaVersion": "1",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z"
}
],
"count": 1,
"currentPage": 1
}Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| blueprintId | string | Yes | — | The blueprint (file type) id |
| blueprintMode | string | No | — | The blueprint mode |
| page | number | No | 1 | Page number for pagination |
| limit | number | No | 100 | Number of items per page |
| sortBy | string | No | createdAt | Field to sort by |
| sortOrder | string | No | ASC | Sort direction (ASC or DESC) |
{ schemas, count, currentPage }.
cursor parameter is listed on this endpoint because it comes from the shared
pagination parameter set, but cursor pagination is not implemented here —
sending cursor is accepted and ignored, and you still get the page/limit
response. Use page and limit. See
Pagination for the endpoints that do support it.Authorizations
API key for authentication
Query Parameters
Blueprint Id
"649e2d2d2d2d2d2d2d2d2d2d"
Blueprint Mode
"user"
Page number
1
Number of items per page
100
Field to sort by
"createdAt"
Sort direction
ASC, DESC "ASC"
Opaque pagination cursor. Provide the parameter (empty value for the first page) to switch to cursor pagination: the response becomes { data, pagination: { limit, nextCursor, hasMore } } with default limit 50 (max 100). Omit it entirely for legacy page/limit pagination. In cursor mode sortBy must be one of createdAt, updatedAt, _id, and cursors are bound to the sortBy/sortOrder they were minted with.