Public API v2 → List Schemas

About the /schema/list endpoint

The /schema/list endpoint lists physical schemas, business schemas, or all schemas that a user owns or has access rights to.

Only users who have permission to access physical schemas or business schemas can use the /schema/list endpoint to list the schemas they have access rights to.

For information about how to get started with Public API v2, refer to References → Public API v2.

Note

Use the HTTPS or HTTP scheme according to your installation.

Request URL

  • https://<cluster_URL>/incorta/api/v2/{tenantName}/schema/list?schemaType=<schematype>
  • https://<server address>:<port>/incorta/api/v2/{tenantName}/schema/list?schemaType=<schematype>

Request URL Parameters

ParameterTypeDescriptionRequired
tenantNameStringThe tenant name (case-sensitive)Required
schemaTypeStringSpecify the type of the schemas you want to list. Valid values are:
  ●  ALL
  ●  BUSINESS (default)
  ●  PHYSICAL
If not defined, only business schemas are listed.
Optional

HTTP method

POST

Request headers

{
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access_token}"
}

You must use a valid access token of a tenant user. For information about how to create an access token, refer to Public API v2 → Create an API access token.

Request body

{
"limit": number,
"offset": number,
"sortBy": "string"
}

Request body parameters

The following table describes the request body parameters in the /schema/list endpoint.

ParameterTypeDescriptionRequired?Values
limitIntegerThe maximum number of schemas to return, accounting for the offset you define. This simulates the pagination of lists in the application.RequiredBetween 0 and 200.
A value of 0 means all schemas if their number is less than or equal to 200, otherwise, the endpoint returns only 200 schemas.
offsetIntegerThe number of schemas to skip before returning the schemas defined in the limit parameterRequiredBetween 0 and 2147483647 (the maximum value of an integer)
sortByStringThe sorting field and order of the schema list. This applies to the original list and the returned list. Case-sensitiveOptionalValid values are:
  ●  NAME_ASC
  ●  NAME_DESC
  ●  OWNER_ASC
  ●  OWNER_DESC
  ●  MODIFICATION_DATE_ASC
  ●  MODIFICATION_DATE_DESC

Request body example

{
"limit": 2,
"offset": 1,
"sortBy": "NAME_DESC"
}

Endpoint response

The following table shows the HTTP response status codes for this endpoint.

CodeDescriptionPayload Response
200OK
The endpoint successfully ran and returned the schemas that the user owns or has access rights to
{"limit": 0, "offset": 0, "total": 0, "schemasDetails": []}
400Bad Request
You provided invalid values.
{"message": "string"}
Example:
{"Cannot deserialize value of type com.incorta.publicapi.model.schema.common.SchemaProperties$SchemasListSortBy from String "Name_Desc": not one of the values accepted for Enum class: [MODIFICATION_DATE_ASC, NAME_DESC, OWNER_DESC, MODIFICATION_DATE_DESC, OWNER_ASC, NAME_ASC]... "}
401Unauthorized
The endpoint couldn’t return the schema list due to authentication errors, such as an invalid or expired access token, or the tenant name doesn’t match the tenant in the access token.
{"message": "string"}
Example:
{"message": "INC_09030108: Invalid authentication header. Invalid Token [abcd1234]"
404Not Found
The tenant doesn't exist or is disabled.
{"message": "string"}
422Unprocessable Entity
You provided a value for the limit or offset that is out of the accepted range.
{"errorMessages":[{"message": "string"}]}
Example:
{"errorMessages": [{"message": "INC_01210000: offset must be between 0 and 2147483647"}, {"message": "INC_01210000: limit must be between 0 and 200"}]}
500Internal Server Error
The endpoint couldn’t return the schema list due to a server error.
{"message": "string"}

Response parameters

The following are the parameters in the /schema/list endpoint response when the endpoint returns the schema list and details successfully (code 200).

{
"limit": integer,
"offset": integer,
"total": integer,
"schemasDetails": [
{
"schemaID": integer,
"schemaName": "string",
"schemaDescription": "string",
"schemaType": "string",
"owner": "string",
"lastModified": string(date-time),
"isEmpty": boolean
},
...
]}

The following table describes these response parameters.

ParameterDescription
limitThe maximum number of schemas to return, which you defined in the request.
offsetThe number of skipped schemas, which you defined in the request.
totalThe total number of schemas (of the selected types) that the owner of the access token owns or has access rights to.
schemasDetailsThe details of each schema that the endpoint returns
SchemasDetails > schemaIDThe schema ID as defined in the system metadata database
SchemasDetails > schemaNameThe schema name
SchemasDetails > schemaDescriptionThe schema description
SchemasDetails > schemaTypeThe schema type:
  ●  BUSINESS
  ●  PHYSICAL
SchemasDetails > ownerThe name of the schema owner
SchemasDetails > lastModifiedThe timestamp of the last modified date and time
SchemasDetails > isEmptySpecifies if the schema is empty or not

Response example

{
"limit": 0,
"offset": 0,
"total": 9,
"schemasDetails": [
{
"schemaID": 391,
"schemaName": "HR_Bsch",
"schemaDescription": "",
"schemaType": "BUSINESS",
"owner": "Schema Manager",
"lastModified": 1679576492000,
"isEmpty": false
},
...
]}