Check status of the OData model refresh
- Last Updated: April 11, 2025
- 2 minute read
- Hybrid Data Pipeline
- Version 4.6
- Documentation
Purpose
Checks the current status of the refresh of the OData model. This call also returns information regarding tables and columns that were dropped while generating the OData Model for a given schema map of a Data Source. Since the OData model creation is asynchronous, all the warnings get stored in a table named ModelWarnings and these details are reported back when the user queries for a model status.
URL
https://<myserver>:<port>/api/mgmt/datasources/{datasourceId}/model
Method
GET
URL Parameters
<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a non-load balancer deployment, or the machine hosting the load balancer for a load balancer deployment. For a non-load balancer deployment, <port> is the port number specified as the Server Access Port during deployment. For a load balancer deployment, <port> must be either 80 for http or 443 for https. Whenever port 80 or 443 are used, it is not necessary to include the port number in the URL.
The {datasourceId} parameter must also be specified in the URL.
| Parameter | Description | Valid Values |
|---|---|---|
| {datasourceId} | The ID of the data source. | The ID is auto-generated when the data source is created and cannot be changed. |
Response Definition
The response takes the following format. The properties of the response are described in the table that follows.
{
"statusCode": status_number,
"status": "status_message",
...
}
Depending on status, the following properties may be included in the response.
- Model complete status
"createdAt": "YYYY-MM-DD HH:mm:ss""tableWarnings": table_information"columnWarnings": column_information
- Working on model status
"percentDone": "percent_done"
- Problem status
"reason": "message_on_refresh_error"
| Property | Description | Valid Values |
|---|---|---|
| "statusCode" | Provides a code for the status of the refresh | -1 | 0 | 1 | 2If If If If |
| "status" | A message that reports the status of the refresh | Depending on the status of the refresh one the
following messages are provided. The messages correspond to one of
the four status codes.
|
| "createdAt" | The time at which the OData model was created | A timestamp in the UTC format YYYY-MM-DD HH:mm:ss provided if the OData model creation is complete |
| "tableWarnings" | Information on tables that were dropped from the data source schema while the OData model was generated | An array of table names with details on why the table was not included in the data source schema |
| "columnWarnings" | Information on columns that were dropped from the data source schema while the OData model was generated | An array of column names with their table names and details on why the column was not included in the data source schema |
| "percentDone" | A message that reports what percentage of the OData model creation has been completed | A string with percent done provided if the OData model creation is currently taking place |
| "reason" | A message that provides details about an error encountered during OData model creation | A string with error message details provided if the OData model creation has encountered an error |
Sample Server Response
Example 1: Model creation is proceeding correctly.
{
"statusCode": 1,
"status": "Working on model.",
"percentDone": "80 percent done"
}
Example 2: Model creation is complete
{
"statusCode": 0,
"status": "Model is complete.",
"createdAt": "2017-07-17 09:25:12.812",
"tableWarnings": [
{
"table": "NOPRIMARYLONG",
"reason": "No primary key has been specified for this table."
}
],
"columnWarnings": [
{
"table": "BOOKS1",
"column": "SENTENCE",
"reason": "The column size is too long. Actual size is 2,147,483,647
and supported size is 32,768."
},
{
"table": "NOPRIMARYLONG",
"column": "LONGCOL",
"reason": "The column size is too long. Actual size is 2,147,483,647
and supported size is 32,768."
}
]
}
Sample Server Failure Response
When the refresh operation is not proceeding correctly, a response similar to the following is returned:
{
"statusCode": 2,
"status": "There was a problem creating the model.",
"reason": "No primary key"
}
Authentication
Basic Authentication using Login ID and Password.
Authorization
The user must have the MgmtAPI (11) and ViewDataSource (2) permissions.