Purpose

Data sources that are enabled to be accessed through OData maintain an OData data model. The OData model must be created when a new data source is created, or when the schema map for a data source is changed. Additionally, an OData model should be refreshed so that changes made to a data source schema are visible in the OData data model.

URL

https://<myserver>:<port>/api/mgmt/datasources/{datasourceId}/model

Method

POST

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.

Request Definition

Note: All properties are optional. Therefore, an empty payload ({}) may be passed with the request.

{
  "user": "data_store_user_id",
  "password": "data_store_user_password",
  "restart": boolean
}
Parameter Description Usage Valid Values
"user" The user ID needed to connect to the back end data store (for example, Oracle Database or Salesforce) Optional If the data source does not contain the user needed to connect to the back end data store, the user ID must be supplied in the payload.
"password" The user password needed to connect to the back end data store (for example, Oracle Database or Salesforce) Optional If the data source does not contain the user needed to connect to the back end data store, the user password must be supplied in the payload.
"restart" Specifies the behavior of the data access service when a create or refresh request is submitted while an OData model is being built for the specified data source.

If "restart" is not set to true and a model is currently being generated, a 409 status error is returned, indicating that the OData Model for this data source is currently being built.

Optional true | false

If set to true, any OData model that is currently being built is discarded and the Connectivity Service builds a new OData Model for the data source.

If set to false and a model is currently being generated, a 409 status error is returned, indicating that the OData Model for this data source is currently being built.

Sample Request Payload


{
  "user": "MyDbId",
  "password": "MyDbSecret"
  "restart": true
}

Sample Server Response


{
   "success":true
} 

Sample Server Failure Response


{
  "error": {
    "code": 222207054,
    "message": {
      "lang": "en-US",
      "value": "Cannot start the OData Model Creation because it is currently running. Please see the documentation if you wish to restart the creation."
    }
  }
}

Authentication

Basic Authentication using Login ID and Password.

Authorization

The user must have the MgmtAPI (11) and ModifyDataSource (3) permissions.