Public API v2 → Load Schema Endpoint

About the /schema/load endpoint

The /schema/load endpoint starts the load of one or more physical schemas.

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/load
  • https://<server address>:<port>/incorta/api/v2/{tenantName}/schema/load

Request URL Parameter

Field nameDescriptionTypeRequired
tenantNameThe tenant name (case-sensitive)StringRequired

HTTP method

POST

Request body

{
"schemaNames": [
"string"
],
"loadSource": "string",
"synchronous": boolean,
"requestedTimeoutInMilliseconds": 0
}

Request body parameters

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

ParameterTypeDescriptionRequiredValuesExample
schemaNamesStringList of the physical schemas you want to loadYesList of schema names separated by commas (case-sensitive)["Schema1", "Schema2"]
loadSourceStringType of loadingYes
  ●  FULL (default)
  ●  INCREMENTAL
  ●  STAGING
"FULL"
synchronousBooleanSpecify whether to wait for a response or notOptional
  ●  TRUE
  ●  FALSE
FALSE
requestedTimeoutInMillisecondsLongThe maximum time (in milliseconds) for the server to wait before returning the response to the client
Checked only when synchronous is set to true.
  ●  If set to 0, a preconfigured value is used with a default of 30 seconds.
  ●  The maximum preconfigured value is 60 seconds.
OptionalThe maximum value is 60 seconds even if you enter a greater value
The default value is 0.
4000

Request body example

{
"schemaNames": ["Schema1", "Schema2"],
"loadSource": "FULL",
"synchronous": TRUE,
"requestedTimeoutInMilliseconds": 0
}

Request headers

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

You must use a valid access token of a Super User or a user with the Super Role or Schema Manager role and this user has edit access rights to the physical schema you want to load.

For information about how to create an access token, refer to Public API v2 → Create an API access token.

Request headers example

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

Endpoint response

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

CodeDescriptionPayload Response
207The endpoint handled the request successfully.The load status for each physical schema in the request
{"LoadingStatus": {"array"}}
Example:
{"loadingStatus": {"Schema1": "LOADED", "Schema2": "TIMEOUT"}}
400Bad request{"message": "string"}
Example:
Cannot deserialize value of type com.incorta.publicapi.model.schema.common.SchemaProperties$LoadSource from String "FULLy": not one of the values accepted for Enum class: [INCREMENTAL, NA, FULL, STAGING]
401Unauthorized
  ●  Invalid or expired access token.
  ●  The tenant name doesn’t match the tenant in the access token.
{"message": "string"}
Example:
{"message": "INC_09030101: Invalid access token or access token may have expired."}
422Unprocessable Entity{"message": "string"}
Example:
{"message": "INC_09070102: Invalid timeout! value [1,234,567,890,987,654,321 msec] exceeds the defined maximum [60,000 msec]"}
403Forbidden
You do not have sufficient access rights to load the specified schema.
{"message": "string"}
Example:
{"message" : "INC_02010000: You are not authorized to VIEW the OnlineStore SCHEMADEFINITION of ID [289]."}
404Not Found
The tenant doesn't exist or is disabled.
{"message": "string"}
500Internal Server Error{"message": "string"}
Example:
{"message": "A general exception has occurred, please consult CMC for server logs."}
Note

The load status returned in the response varies according to the value of the synchronous parameter. If you do not explicitly set the value of this parameter, the default is FALSE.

  • If you set it to TRUE, the returned value will be one of the following:
    • FAILED_TO_START
    • LOADED
    • FAILED_TO_LOAD
    • TIMEOUT
    • ERROR_WHILE_WAITING
    • INTERRUPTED_WHILE_WAITING
    • LOADING_STATUS_NOT_AVAILABLE
  • If you set it to FALSE, the returned value will be one of the following:
    • STARTED
    • FAILED_TO_START