skip to main content
Hybrid Data Pipeline API reference : Management API : Data Sources API : Check status of the OData model refresh
  

Try Now
Check status of the OData model refresh

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.
Note: An administrator can execute this operation on behalf of a user by appending the user query parameter to the request and specifying a user name. See also Managing resources on behalf of users.

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 standalone installation, or the machine hosting the load balancer for a load balancer installation. For a standalone installation, <port> is the port number specified as the Server Access Port during installation. For a load balancer installation, <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 | 2
If -1, the model must be created before it can be refreshed.
If 0, the refresh of the model is complete. The updated model is ready to use. The "createdAt" field shows the time at which the model was created.
If 1, the model is currently being refreshed. The "percentDone" field shows the progress of the model refresh.
If 2, a problem was encountered. The "reason" field shows details about the problem.
"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.
Model not created.(-1)
Model is complete(0)
Working on model.(1)
There was a problem creating the model.(2)
"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.