Skip to main content
GET
List Schemas
The List Schemas endpoint returns all schemas defined within a specific business area. Schemas define the structure, fields, and validation rules for data objects in Pretectum.

Prerequisites

  • A Pretectum API key (see API Keys)
  • Permission to access schemas in your tenant
  • Knowledge of the business area ID (see List Business Areas)

Authentication

Include your API key in the Authorization header.

Request

Path Parameters

string
required
The unique identifier of the business area to retrieve schemas from. You can obtain this from the List Business Areas endpoint.

Query Parameters

string
A pagination token for retrieving the next page of results. This value is returned in the response when more results are available.

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 an object containing an array of schemas and pagination information.
array
required
An array of schema objects within the business area.
string
A pagination token for retrieving the next page of results. If this field is present, more schemas are available. Pass this value as the pageKey query parameter in your next request.

Example Response

Response Without Pagination

When all schemas fit in a single response, no nextPageKey is returned:

Empty Response

If the business area has no schemas defined, the response will contain an empty items array:

Error Responses

Pagination

When a business area contains many schemas, results are paginated. Use the nextPageKey from the response to fetch subsequent pages:

Use Cases

Filtering Search Results by Schema

Use the schema names returned by this endpoint to filter your data object searches:

Building Dynamic Filter UI

Populate dropdown menus with available schemas for a selected business area:

Best Practices

  1. Cache schema lists: Schemas change infrequently. Cache the response and refresh periodically.
  2. Filter by active status: Only show active schemas in user interfaces.
  3. Use names for search filters: When filtering searches with the schema parameter, use the name field value, not the schemaId.
  4. Handle pagination: Always check for pageKey in responses and fetch all pages if needed.
  5. Get business area ID first: Use the List Business Areas endpoint to obtain valid business area IDs.

Get Schema Details

Get detailed information about a specific schema

List Business Areas

Get business area IDs for schema queries

Search Data Objects

Search within specific schemas

API Keys

Obtain authentication token