Skip to main content
GET
Get Schema
The Get Schema endpoint returns detailed information about a specific schema within a business area, including its field definitions and validation rules.

Prerequisites

  • A Pretectum API key (see API Keys)
  • Permission to access schemas in your tenant
  • Valid business area ID and schema ID

Authentication

Include your API key in the Authorization header.

Request

Path Parameters

string
required
The unique identifier of the business area containing the schema.
string
required
The unique identifier of the schema to retrieve. You can obtain this from the List Schemas endpoint.

Headers

string
required
Your Pretectum API key. Create one in the Pretectum app under Configuration → API Keys.
string
default:"application/json"
The response content type. Currently only application/json is supported.

Example Requests

Response

A successful request returns a schema object with its complete definition including field specifications.
string
required
The unique identifier for the schema.
string
required
The display name of the schema.
string
A description of the schema explaining its purpose.
string
required
The ID of the business area this schema belongs to.
string
required
The name of the business area this schema belongs to.
integer
The version number of the schema.
string
The email address of the user who created the schema.
string
The email address of the user who last modified the schema.
string
required
The ISO 8601 timestamp when the schema was created.
string
The ISO 8601 timestamp when the schema was last modified.
array
required
An array of field definitions that make up the schema structure. Fields are ordered by creation date (ascending).

Example Response

Error Responses

Use Cases

Understanding Data Structure

Use the schema details to understand what fields are available for searching:

Building Dynamic Forms

Use the field definitions to dynamically generate data entry forms:
Verify that a field exists and is searchable before including it in a query:

Best Practices

  1. Cache schema definitions: Schema structures change infrequently. Cache them locally.
  2. Check searchable flag: Only use fields marked as searchable: true in search queries.
  3. Respect required fields: When building forms, ensure required fields are validated.
  4. Use field names in queries: For field-specific searches, use the name property from field definitions.

List Schemas

Get all schemas in a business area

List Business Areas

Get business area IDs

Search Data Objects

Search using schema field names

API Keys

Obtain authentication token