Public API v1 → 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 v1, refer to References → Public API v1.
Use the HTTPS
or HTTP
scheme according to your installation.
Request URL
https://<cluster_URL>/incorta/api/v1/schema/load
https://<server address>:<port>/incorta/api/v1/schema/load
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.
Parameter | Type | Description | Required | Values | Example |
---|---|---|---|---|---|
schemaNames | String | List of the physical schemas you want to load | Yes | List of schema names separated by commas (case-sensitive) | ["Schema1", "Schema2"] |
loadSource | String | Type of loading | Yes | ● FULL (default) ● INCREMENTAL ● STAGING | "FULL" |
synchronous | Boolean | Specify whether to wait for a response or not | Optional | ● TRUE ● FALSE | FALSE |
requestedTimeoutInMilliseconds | Long | The 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. | Optional | The 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 → Create Token Endpoint.
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.
Code | Description | Payload Response |
---|---|---|
207 | The endpoint handled the request successfully. | The load status for each physical schema in the request {"LoadingStatus": {"array"}} Example: {"loadingStatus": {"Schema1": "LOADED", "Schema2": "TIMEOUT"}} |
400 | Bad 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] |
401 | Unauthorized | {"message": "string"} Example: {"message": "INC_09030101: Invalid access token or access token may have expired."} |
422 | Unprocessable 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]"} |
403 | Forbidden | {"message": "string"} Example: {"message" : "INC_02010000: You are not authorized to VIEW the OnlineStore SCHEMADEFINITION of ID [289]."} |
500 | Internal Server Error | {"message": "string"} Example: {"message": "A general exception has occurred, please consult CMC for server logs."} |
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