Skip to main content

Models APIs

The model APIs allow you to interact with models in Omni.

Refresh a schema

Refreshes the schema of the specified model. This will cause the model to reflect the latest changes to schemas, views, and fields from the data source. Note: This will remove structures that are no longer present in the source, but not anything created by users.

POST /v0/model/:id/refresh
curl -L -X 'https://myorg.omniapp.co/api/v0/model/bc1f9c9f-208d-48a2-9ae3-ff80f2c79fed/refresh' \
--H 'Content-Type: application/json' \
--H 'Authorization: Bearer <TOKEN>'

Parameters

NameTypeRequiredDescription
idURL parameterThe ID of the model to be refreshed.

Response

200 OK

Successful requests will return a 200 OK status and a response body similar to the following:

{
"modelId": "bc1f9c9f-208d-48a2-9ae3-ff80f2c79fed",
"status": "running"
}
FieldTypeDescription
modelIdstringID of the model
statusstringStatus of the schema refresh. This value will be running to indicate that the refresh has started.
400 Bad Request
{
"detail": "<errorReason>",
"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
"status": 400
}
IssueError detail
Invalid model IDBad Request: modelId: Invalid uuid
429 Too Many Requests

Results from too many requests in a given time frame. Refer to the Rate limiting documentation for more information.