Endpoint URLs
Identify the base URL for your service instance.
The base URLs come from the service instance. To find the URL, view the service credentials by clicking the name of the service in the Resource list. Use the value of the URL. Add the method to form the complete API endpoint for your request.
Authentication
Before you can call an IBM Watson Query API, you must create an IAM bearer token. Each token is valid for one hour. After a token expires, you must create a new one if you want to continue to use the API. The method to retrieve a token programmatically is to create an API key for your IBM Cloud identity and then use the API key call IAM API to generate a bearer token.
If the API key is zVxeuKGuf2i2lXhdHm25kg38BHOKNhhGQ2QySxgH9iuP, the generate command looks like this:
curl -X POST 'https://iam.cloud.ibm.com/identity/token' -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey=zVxeuKGuf2i2lXhdHm25kg38BHOKNhhGQ2QySxgH9iuP'
An X-Db-Profile is also required when you call an IBM Watson Query API. This profile represents which instance the request is for. For example:
crn%3Av1%3Astaging%3Apublic%3Adata-virtualization%3Aus-south%3Aa%AorQ%CX3VpfQ7GXqj84Gii91c7cBp%zia7aoSN3mXvD2u-jTVQ-1rKj-zEo7-5Ue8jePrP6JblQj2eS
The following example shows a complete API call.
curl -X GET "https://us-south.data-virtualization.cloud.ibm.com/dvapiserver/v2/datasource/connections" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token"
After you get the bearer token, pass the token in the request header, the user will be authorized to access Watson Query API services.
Error handling
Watson Query uses standard HTTP response codes to indicate whether a method completed successfully. HTTP response codes in the 2xx range indicate success. A response in the 4xx range is some sort of failure, and a response in the 5xx range usually indicates an internal system error that cannot be resolved by the user. Response codes are listed with the method.
ErrorResponse
Name | Description |
---|---|
code{: .parameter-name .required} string |
An identifier of the response. |
message{: .parameter-name .required} string |
An explanation of the problem. |
Related information
- Watson Query docs
- Cloud Pak for Data APIs and SDKs
- Cloud Pak for Data as a Service APIs and SDKs
Methods
Get data source connections
Gets all data source connections that are connected to the service.
Gets all data source connections that are connected to the service.
Gets all data source connections that are connected to the service.
Gets all data source connections that are connected to the service.
Gets all data source connections that are connected to the service.
GET /dvapiserver/v2/datasource/connections
(watsonQuery *WatsonQueryV1) ListDatasourceConnections(listDatasourceConnectionsOptions *ListDatasourceConnectionsOptions) (result *DatasourceConnectionsList, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) ListDatasourceConnectionsWithContext(ctx context.Context, listDatasourceConnectionsOptions *ListDatasourceConnectionsOptions) (result *DatasourceConnectionsList, response *core.DetailedResponse, err error)
ServiceCall<DatasourceConnectionsList> listDatasourceConnections()
list_datasource_connections(self,
**kwargs
) -> DetailedResponse
listDatasourceConnections(params)
Request
No Request Parameters
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
No Request Parameters
No Request Parameters
No Request Parameters
No Request Parameters
curl -k -X GET -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/datasource/connections"
listDatasourceConnectionsOptions := watsonQueryService.NewListDatasourceConnectionsOptions() datasourceConnectionsList, response, err := watsonQueryService.ListDatasourceConnections(listDatasourceConnectionsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(datasourceConnectionsList, "", " ") fmt.Println(string(b))
ListDatasourceConnectionsOptions listDatasourceConnectionsOptions = new ListDatasourceConnectionsOptions(); Response<DatasourceConnectionsList> response = watsonQueryService.listDatasourceConnections(listDatasourceConnectionsOptions).execute(); DatasourceConnectionsList datasourceConnectionsList = response.getResult(); System.out.println(datasourceConnectionsList);
let res; try { res = await watsonQueryService.listDatasourceConnections({}); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
datasource_connections_list = watson_query_service.list_datasource_connections().get_result() print(json.dumps(datasource_connections_list, indent=2))
Response
The name of the node that a datasource connection associates.
The description of the node that a datasource connection associates.
The type of connector, for example, H stands for Hosted, ie running within the cluster, F means Fenced Mode Process, ie direct within Watson Query instance.
The hostname or IP address that is used to access the connection.
The port number that is used to access the connection.
Determines whether the data source uses Docker.
The number of data sources.
The connection identifier for Watson Query.
The name of the database.
The connection identifier for the platform.
The hostname or IP address of the data source.
The port number of the data source.
The type of the data source.
The user that has access to the data source.
The URI of the data source.
The status of the data source.
The name of the connection.
data_sources
datasource_connections
The name of the node that a datasource connection associates.
The description of the node that a datasource connection associates.
The type of connector, for example, H stands for Hosted, ie running within the cluster, F means Fenced Mode Process, ie direct within Watson Query instance.
The hostname or IP address that is used to access the connection.
The port number that is used to access the connection.
Determines whether the data source uses Docker.
The number of data sources.
The identifier of the connection for the Watson Query.
The name of the database.
The connection identifier for the platform.
The hostname or IP address of the data source.
The port number of the data source.
The type of the data source.
The user that has access to the data source.
The URI of the data source.
The status of the data source.
The name of the connection.
DataSources
DatasourceConnections
The name of the node that a datasource connection associates.
The description of the node that a datasource connection associates.
The type of connector, for example, H stands for Hosted, ie running within the cluster, F means Fenced Mode Process, ie direct within Watson Query instance.
The hostname or IP address that is used to access the connection.
The port number that is used to access the connection.
Determines whether the data source uses Docker.
The number of data sources.
The identifier of the connection for the Watson Query.
The name of the database.
The connection identifier for the platform.
The hostname or IP address of the data source.
The port number of the data source.
The type of the data source.
The user that has access to the data source.
The URI of the data source.
The status of the data source.
The name of the connection.
dataSources
datasourceConnections
The name of the node that a datasource connection associates.
The description of the node that a datasource connection associates.
The type of connector, for example, H stands for Hosted, ie running within the cluster, F means Fenced Mode Process, ie direct within Watson Query instance.
The hostname or IP address that is used to access the connection.
The port number that is used to access the connection.
Determines whether the data source uses Docker.
The number of data sources.
The identifier of the connection for the Watson Query.
The name of the database.
The connection identifier for the platform.
The hostname or IP address of the data source.
The port number of the data source.
The type of the data source.
The user that has access to the data source.
The URI of the data source.
The status of the data source.
The name of the connection.
data_sources
datasource_connections
The name of the node that a datasource connection associates.
The description of the node that a datasource connection associates.
The type of connector, for example, H stands for Hosted, ie running within the cluster, F means Fenced Mode Process, ie direct within Watson Query instance.
The hostname or IP address that is used to access the connection.
The port number that is used to access the connection.
Determines whether the data source uses Docker.
The number of data sources.
The identifier of the connection for the Watson Query.
The name of the database.
The connection identifier for the platform.
The hostname or IP address of the data source.
The port number of the data source.
The type of the data source.
The user that has access to the data source.
The URI of the data source.
The status of the data source.
The name of the connection.
data_sources
datasource_connections
Status Code
Success
Bad Request
Unauthorized
Internal Server Error
{ "datasource_connections": [ { "agent_class": "F", "dscount": "0", "hostname": "dv-0.dv.tns.svc.cluster.local", "is_docker": "N", "node_name": "AdminNode", "node_description": "Not specified", "port": "6414", "os_user": "bigsql", "data_sources": [ { "cid": "MSSQL10000", "dbname": "mssql2014db1", "connection_id": "75e4d01b-7417-4abc-b267-8ffb393fb970", "srchostname": "example.ibm.com", "srcport": "1433", "srctype": "MSSQLServer", "status": "string", "usr": "DV-user", "uri": "example.ibm.com:1433/" } ] } ] }
{ "datasource_connections": [ { "agent_class": "F", "dscount": "0", "hostname": "dv-0.dv.tns.svc.cluster.local", "is_docker": "N", "node_name": "AdminNode", "node_description": "Not specified", "port": "6414", "os_user": "bigsql", "data_sources": [ { "cid": "MSSQL10000", "dbname": "mssql2014db1", "connection_id": "75e4d01b-7417-4abc-b267-8ffb393fb970", "srchostname": "example.ibm.com", "srcport": "1433", "srctype": "MSSQLServer", "status": "string", "usr": "DV-user", "uri": "example.ibm.com:1433/" } ] } ] }
Add data source connection
Adds a data source connection to the Watson Query service.
Adds a data source connection to the Watson Query service.
Adds a data source connection to the Watson Query service.
Adds a data source connection to the Watson Query service.
Adds a data source connection to the Watson Query service.
POST /dvapiserver/v2/datasource/connections
(watsonQuery *WatsonQueryV1) AddDatasourceConnection(addDatasourceConnectionOptions *AddDatasourceConnectionOptions) (result *PostDatasourceConnection, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) AddDatasourceConnectionWithContext(ctx context.Context, addDatasourceConnectionOptions *AddDatasourceConnectionOptions) (result *PostDatasourceConnection, response *core.DetailedResponse, err error)
ServiceCall<PostDatasourceConnection> addDatasourceConnection(AddDatasourceConnectionOptions addDatasourceConnectionOptions)
add_datasource_connection(self,
datasource_type: str,
name: str,
origin_country: str,
properties: 'PostDatasourceConnectionParametersProperties',
*,
asset_category: str = None,
**kwargs
) -> DetailedResponse
addDatasourceConnection(params)
Request
Instantiate the AddDatasourceConnectionOptions
struct and set the fields to provide parameter values for the AddDatasourceConnection
method.
Use the AddDatasourceConnectionOptions.Builder
to create a AddDatasourceConnectionOptions
object that contains the parameter values for the addDatasourceConnection
method.
The type of data source that you want to add.
Example:
DB2
The name of the data source
Example:
DB2
The location of the data source that you want to add.
Example:
us
Example:
ya29.Il-_
Example:
ibmdatastage.us-east-1
Example:
ApiKey-a31d60c5-0f7b-4995-a4ae-69bf09d3de50
Example:
Bearer Token
Example:
81571342315
Example:
uIn8rVyIRsd
Example:
test_collection
Example:
-----BEGIN PRIVATE KEY-----
Example:
TPCDS
Example:
192.168.0.1
Example:
cliservice
Example:
/v2/asset_files/dbdrivers/ngdbc.jar
Example:
Snowflake
Example:
/v2/asset_files/dbdrivers/ngdbc.jar
Example:
password
Example:
50000
Example:
housecanary-com
Example:
key=value
Example:
1//06uwhP7_312g
Example:
SYSADMIN
Example:
https://sapes5.sapdevcenter.com
Example:
ol_informix1410
Example:
pdborcl.fyre.ibm.com
Example:
orcl
Example:
false
Example:
-----BEGIN CERTIFICATE-----
Example:
test.com
Example:
false
Example:
db2inst1
Example:
wdpcondev
properties
Example:
USER
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The AddDatasourceConnection options.
The type of data source that you want to add.
Examples:ViewThe name of data source.
Examples:ViewThe location of data source that you want to add.
Examples:View- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
Properties
- Examples:View
The addDatasourceConnection options.
The type of data source that you want to add.
Examples:ViewThe name of data source.
Examples:ViewThe location of data source that you want to add.
Examples:View- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
xProperties
- Examples:View
parameters
The type of data source that you want to add.
Examples:value_source_lines_htmlThe name of data source.
Examples:value_source_lines_htmlThe location of data source that you want to add.
Examples:value_source_lines_html- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
properties
- Examples:value_source_lines_html
parameters
The type of data source that you want to add.
Examples:value_source_lines_htmlThe name of data source.
Examples:value_source_lines_htmlThe location of data source that you want to add.
Examples:value_source_lines_html- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
properties
- Examples:value_source_lines_html
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" -d "{\"datasource_type\":\"Db2\",\"name\":\"Db2\",\"origin_country\":\"us\",\"properties\":{\"database\":\"TPDCS\",\"host\":\"{hostname}\", \"password\":\"myPassword\", \"port\":\"50000\", \"ssl\":\"true\", \"username\":\"DV-user\"}}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/datasource/connections"
postDatasourceConnectionParametersPropertiesModel := &watsonqueryv1.PostDatasourceConnectionParametersProperties{ } addDatasourceConnectionOptions := watsonQueryService.NewAddDatasourceConnectionOptions( "DB2", "DB2", "us", postDatasourceConnectionParametersPropertiesModel, ) postDatasourceConnection, response, err := watsonQueryService.AddDatasourceConnection(addDatasourceConnectionOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(postDatasourceConnection, "", " ") fmt.Println(string(b))
PostDatasourceConnectionParametersProperties postDatasourceConnectionParametersPropertiesModel = new PostDatasourceConnectionParametersProperties.Builder() .build(); AddDatasourceConnectionOptions addDatasourceConnectionOptions = new AddDatasourceConnectionOptions.Builder() .datasourceType("DB2") .name("DB2") .originCountry("us") .xProperties(postDatasourceConnectionParametersPropertiesModel) .build(); Response<PostDatasourceConnection> response = watsonQueryService.addDatasourceConnection(addDatasourceConnectionOptions).execute(); PostDatasourceConnection postDatasourceConnection = response.getResult(); System.out.println(postDatasourceConnection);
// Request models needed by this operation. // PostDatasourceConnectionParametersProperties const postDatasourceConnectionParametersPropertiesModel = { }; const params = { datasourceType: 'DB2', name: 'DB2', originCountry: 'us', properties: postDatasourceConnectionParametersPropertiesModel, }; let res; try { res = await watsonQueryService.addDatasourceConnection(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
post_datasource_connection_parameters_properties_model = { } post_datasource_connection = watson_query_service.add_datasource_connection( datasource_type='DB2', name='DB2', origin_country='us', properties=post_datasource_connection_parameters_properties_model ).get_result() print(json.dumps(post_datasource_connection, indent=2))
Response
The identifier of data source connection.
Refers to the type of the data source that is to be added.
The name of the data source.
The identifier of data source connection.
The type of data source that you want to add.
The name of data source.
The identifier of data source connection.
The type of data source that you want to add.
The name of data source.
The identifier of data source connection.
The type of data source that you want to add.
The name of data source.
The identifier of data source connection.
The type of data source that you want to add.
The name of data source.
Status Code
Created
Bad Request
Unauthorized
Conflict
Internal Server Error
No Sample Response
Delete data source connection
Deletes a data source connection from the Watson Query service.
Deletes a data source connection from the Watson Query service.
Deletes a data source connection from the Watson Query service.
Deletes a data source connection from the Watson Query service.
Deletes a data source connection from the Watson Query service.
DELETE /dvapiserver/v2/datasource/connections/{connection_id}
(watsonQuery *WatsonQueryV1) DeleteDatasourceConnection(deleteDatasourceConnectionOptions *DeleteDatasourceConnectionOptions) (response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DeleteDatasourceConnectionWithContext(ctx context.Context, deleteDatasourceConnectionOptions *DeleteDatasourceConnectionOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteDatasourceConnection(DeleteDatasourceConnectionOptions deleteDatasourceConnectionOptions)
delete_datasource_connection(self,
connection_id: str,
*,
cid: str = None,
**kwargs
) -> DetailedResponse
deleteDatasourceConnection(params)
Request
Instantiate the DeleteDatasourceConnectionOptions
struct and set the fields to provide parameter values for the DeleteDatasourceConnection
method.
Use the DeleteDatasourceConnectionOptions.Builder
to create a DeleteDatasourceConnectionOptions
object that contains the parameter values for the deleteDatasourceConnection
method.
Path Parameters
The connection identifier for the platform.
Example:
75e4d01b-7417-4abc-b267-8ffb393fb970
Query Parameters
The connection identifier for Watson Query.
Example:
DB210013
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteDatasourceConnection options.
The connection identifier for the platform..
Examples:ViewThe identifier of the connection for the Watson Query.
Examples:View
The deleteDatasourceConnection options.
The connection identifier for the platform..
Examples:ViewThe identifier of the connection for the Watson Query.
Examples:View
parameters
The connection identifier for the platform..
Examples:value_source_lines_htmlThe identifier of the connection for the Watson Query.
Examples:value_source_lines_html
parameters
The connection identifier for the platform..
Examples:value_source_lines_htmlThe identifier of the connection for the Watson Query.
Examples:value_source_lines_html
curl -k -X DELETE -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/datasource/connections/75e4d01b-7417-4abc-b267-8ffb393fb970?cid=DB210013"
deleteDatasourceConnectionOptions := watsonQueryService.NewDeleteDatasourceConnectionOptions( "75e4d01b-7417-4abc-b267-8ffb393fb970", ) deleteDatasourceConnectionOptions.SetCid("DB210013") response, err := watsonQueryService.DeleteDatasourceConnection(deleteDatasourceConnectionOptions) if err != nil { panic(err) }
DeleteDatasourceConnectionOptions deleteDatasourceConnectionOptions = new DeleteDatasourceConnectionOptions.Builder() .connectionId("75e4d01b-7417-4abc-b267-8ffb393fb970") .cid("DB210013") .build(); Response<Void> response = watsonQueryService.deleteDatasourceConnection(deleteDatasourceConnectionOptions).execute();
const params = { connectionId: '75e4d01b-7417-4abc-b267-8ffb393fb970', cid: 'DB210013', }; try { await watsonQueryService.deleteDatasourceConnection(params); } catch (err) { console.warn(err); }
response = watson_query_service.delete_datasource_connection( connection_id='75e4d01b-7417-4abc-b267-8ffb393fb970', cid='DB210013' )
Gets the object store connection details.
GET /dvapiserver/v2/datasource/objectstore_connections
(watsonQuery *WatsonQueryV1) GetObjectStoreConnectionsV2(getObjectStoreConnectionsV2Options *GetObjectStoreConnectionsV2Options) (result *ObjStoreConnectionResponseV2, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GetObjectStoreConnectionsV2WithContext(ctx context.Context, getObjectStoreConnectionsV2Options *GetObjectStoreConnectionsV2Options) (result *ObjStoreConnectionResponseV2, response *core.DetailedResponse, err error)
ServiceCall<ObjStoreConnectionResponseV2> getObjectStoreConnectionsV2(GetObjectStoreConnectionsV2Options getObjectStoreConnectionsV2Options)
get_object_store_connections_v2(self,
*,
jwt_auth_user_payload: str = None,
**kwargs
) -> DetailedResponse
getObjectStoreConnectionsV2(params)
Request
Instantiate the GetObjectStoreConnectionsV2Options
struct and set the fields to provide parameter values for the GetObjectStoreConnectionsV2
method.
Use the GetObjectStoreConnectionsV2Options.Builder
to create a GetObjectStoreConnectionsV2Options
object that contains the parameter values for the getObjectStoreConnectionsV2
method.
Custom Headers
Supplied by proxy. Do NOT add your own value.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetObjectStoreConnectionsV2 options.
Supplied by proxy. Do NOT add your own value.
The getObjectStoreConnectionsV2 options.
Supplied by proxy. Do NOT add your own value.
parameters
Supplied by proxy. Do NOT add your own value.
parameters
Supplied by proxy. Do NOT add your own value.
curl -k -X GET -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/datasource/objectstore_connections"
getObjectStoreConnectionsV2Options := watsonQueryService.NewGetObjectStoreConnectionsV2Options() objStoreConnectionResponseV2, response, err := watsonQueryService.GetObjectStoreConnectionsV2(getObjectStoreConnectionsV2Options) if err != nil { panic(err) } b, _ := json.MarshalIndent(objStoreConnectionResponseV2, "", " ") fmt.Println(string(b))
GetObjectStoreConnectionsV2Options getObjectStoreConnectionsV2Options = new GetObjectStoreConnectionsV2Options.Builder() .build(); Response<ObjStoreConnectionResponseV2> response = watsonQueryService.getObjectStoreConnectionsV2(getObjectStoreConnectionsV2Options).execute(); ObjStoreConnectionResponseV2 objStoreConnectionResponseV2 = response.getResult(); System.out.println(objStoreConnectionResponseV2);
let res; try { res = await watsonQueryService.getObjectStoreConnectionsV2({}); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
obj_store_connection_response_v2 = watson_query_service.get_object_store_connections_v2().get_result() print(json.dumps(obj_store_connection_response_v2, indent=2))
Response
Example:
newbigsqlbucket
Example:
c28e0248-82ad-4aca-a658-90a626769fba
Example:
CEPH10000
Example:
http://jobs-m-2.fyre.ibm.com
Example:
CEPH
Example:
VALID
cos_connections
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
CosConnections
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
cosConnections
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
cos_connections
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
cos_connections
Status Code
Success
Bad Request
Unauthorized
Internal Server Error
No Sample Response
Grant user access
Grants user access to a specific virtualized table.
Grants a user access to a specific virtualized table.
Grants a user access to a specific virtualized table.
Grants a user access to a specific virtualized table.
Grants a user access to a specific virtualized table.
POST /dvapiserver/v2/privileges/users
(watsonQuery *WatsonQueryV1) GrantUserToVirtualTable(grantUserToVirtualTableOptions *GrantUserToVirtualTableOptions) (response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GrantUserToVirtualTableWithContext(ctx context.Context, grantUserToVirtualTableOptions *GrantUserToVirtualTableOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> grantUserToVirtualTable(GrantUserToVirtualTableOptions grantUserToVirtualTableOptions)
grant_user_to_virtual_table(self,
table_name: str,
table_schema: str,
authid: str,
**kwargs
) -> DetailedResponse
grantUserToVirtualTable(params)
Request
Instantiate the GrantUserToVirtualTableOptions
struct and set the fields to provide parameter values for the GrantUserToVirtualTable
method.
Use the GrantUserToVirtualTableOptions.Builder
to create a GrantUserToVirtualTableOptions
object that contains the parameter values for the grantUserToVirtualTable
method.
The name of the virtualized table.
Possible values: length ≥ 1
Example:
EMPLOYEE
The schema of the virtualized table.
Possible values: length ≥ 1
Example:
dv_ibmid_060000s4y5
The identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Example:
PUBLIC
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GrantUserToVirtualTable options.
The name of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:View
The grantUserToVirtualTable options.
The name of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:View
parameters
The name of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:value_source_lines_html
parameters
The name of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:value_source_lines_html
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" -d "\{\"table_name\":\"EMPLOYEE\",\"table_schema\":\"dv_ibmid_060000s4y5\", \"authid\":\"PUBLIC\"}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/privileges/users"
grantUserToVirtualTableOptions := watsonQueryService.NewGrantUserToVirtualTableOptions( "EMPLOYEE", "dv_ibmid_060000s4y5", "PUBLIC", ) response, err := watsonQueryService.GrantUserToVirtualTable(grantUserToVirtualTableOptions) if err != nil { panic(err) }
GrantUserToVirtualTableOptions grantUserToVirtualTableOptions = new GrantUserToVirtualTableOptions.Builder() .tableName("EMPLOYEE") .tableSchema("dv_ibmid_060000s4y5") .authid("PUBLIC") .build(); Response<Void> response = watsonQueryService.grantUserToVirtualTable(grantUserToVirtualTableOptions).execute();
const params = { tableName: 'EMPLOYEE', tableSchema: 'dv_ibmid_060000s4y5', authid: 'PUBLIC', }; try { await watsonQueryService.grantUserToVirtualTable(params); } catch (err) { console.warn(err); }
response = watson_query_service.grant_user_to_virtual_table( table_name='EMPLOYEE', table_schema='dv_ibmid_060000s4y5', authid='PUBLIC' )
Revoke user acccess
Revokes user access to the virtualized table.
Revokes user access to the virtualized table.
Revokes user access to the virtualized table.
Revokes user access to the virtualized table.
Revokes user access to the virtualized table.
DELETE /dvapiserver/v2/privileges/users/{authid}
(watsonQuery *WatsonQueryV1) RevokeUserFromObject(revokeUserFromObjectOptions *RevokeUserFromObjectOptions) (response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) RevokeUserFromObjectWithContext(ctx context.Context, revokeUserFromObjectOptions *RevokeUserFromObjectOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> revokeUserFromObject(RevokeUserFromObjectOptions revokeUserFromObjectOptions)
revoke_user_from_object(self,
authid: str,
table_name: str,
table_schema: str,
**kwargs
) -> DetailedResponse
revokeUserFromObject(params)
Request
Instantiate the RevokeUserFromObjectOptions
struct and set the fields to provide parameter values for the RevokeUserFromObject
method.
Use the RevokeUserFromObjectOptions.Builder
to create a RevokeUserFromObjectOptions
object that contains the parameter values for the revokeUserFromObject
method.
Path Parameters
The Watson Query user name. If this value is Public, this API revokes access privilege from all Watson Query users.
Example:
PUBLIC
Query Parameters
The virtualized table's name.
Example:
EMPLOYEE
The virtualized table's schema name.
Example:
dv_ibmid_060000s4y5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The RevokeUserFromObject options.
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:ViewThe virtualized table's name.
Examples:ViewThe virtualized table's schema name.
Examples:View
The revokeUserFromObject options.
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:ViewThe virtualized table's name.
Examples:ViewThe virtualized table's schema name.
Examples:View
parameters
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:value_source_lines_htmlThe virtualized table's name.
Examples:value_source_lines_htmlThe virtualized table's schema name.
Examples:value_source_lines_html
parameters
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:value_source_lines_htmlThe virtualized table's name.
Examples:value_source_lines_htmlThe virtualized table's schema name.
Examples:value_source_lines_html
curl -k -X DELETE -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/privileges/users/PUBLIC?table_schema=dv_ibmid_060000s4y5&table_name=EMPLOYEE"
revokeUserFromObjectOptions := watsonQueryService.NewRevokeUserFromObjectOptions( "PUBLIC", "EMPLOYEE", "dv_ibmid_060000s4y5", ) response, err := watsonQueryService.RevokeUserFromObject(revokeUserFromObjectOptions) if err != nil { panic(err) }
RevokeUserFromObjectOptions revokeUserFromObjectOptions = new RevokeUserFromObjectOptions.Builder() .authid("PUBLIC") .tableName("EMPLOYEE") .tableSchema("dv_ibmid_060000s4y5") .build(); Response<Void> response = watsonQueryService.revokeUserFromObject(revokeUserFromObjectOptions).execute();
const params = { authid: 'PUBLIC', tableName: 'EMPLOYEE', tableSchema: 'dv_ibmid_060000s4y5', }; try { await watsonQueryService.revokeUserFromObject(params); } catch (err) { console.warn(err); }
response = watson_query_service.revoke_user_from_object( authid='PUBLIC', table_name='EMPLOYEE', table_schema='dv_ibmid_060000s4y5' )
Grant user role
Grants a user role access to a specific virtualized table.
Grants a user role access to a specific virtualized table.
Grants a user role access to a specific virtualized table.
Grants a user role access to a specific virtualized table.
Grants a user role access to a specific virtualized table.
POST /dvapiserver/v2/privileges/roles
(watsonQuery *WatsonQueryV1) GrantRolesToVirtualizedTable(grantRolesToVirtualizedTableOptions *GrantRolesToVirtualizedTableOptions) (response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GrantRolesToVirtualizedTableWithContext(ctx context.Context, grantRolesToVirtualizedTableOptions *GrantRolesToVirtualizedTableOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> grantRolesToVirtualizedTable(GrantRolesToVirtualizedTableOptions grantRolesToVirtualizedTableOptions)
grant_roles_to_virtualized_table(self,
table_name: str,
table_schema: str,
*,
role_name: str = None,
**kwargs
) -> DetailedResponse
grantRolesToVirtualizedTable(params)
Request
Instantiate the GrantRolesToVirtualizedTableOptions
struct and set the fields to provide parameter values for the GrantRolesToVirtualizedTable
method.
Use the GrantRolesToVirtualizedTableOptions.Builder
to create a GrantRolesToVirtualizedTableOptions
object that contains the parameter values for the grantRolesToVirtualizedTable
method.
The name of the virtualized table.
Possible values: length ≥ 1
Example:
EMPLOYEE
The schema of the virtualized table.
Possible values: length ≥ 1
Example:
dv_ibmid_060000s4y5
The identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Example:
PUBLIC
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GrantRolesToVirtualizedTable options.
The name of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:View
The grantRolesToVirtualizedTable options.
The name of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:ViewThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:View
parameters
The name of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:value_source_lines_html
parameters
The name of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe schema of the virtualized table.
Possible values: length ≥ 1
Examples:value_source_lines_htmlThe identifier of the authorization, if grant access to all users, the value is PUBLIC, othervise the value is the Watson Query username.
Possible values: length ≥ 1
Examples:value_source_lines_html
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" -d "{\"table_name\":\"EMPLOYEE\",\"table_schema\":\"dv_ibmid_060000s4y5\",\"role_to_grant\":\"DV_ENGINEER\"}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/privileges/roles"
grantRolesToVirtualizedTableOptions := watsonQueryService.NewGrantRolesToVirtualizedTableOptions( "EMPLOYEE", "dv_ibmid_060000s4y5", ) response, err := watsonQueryService.GrantRolesToVirtualizedTable(grantRolesToVirtualizedTableOptions) if err != nil { panic(err) }
GrantRolesToVirtualizedTableOptions grantRolesToVirtualizedTableOptions = new GrantRolesToVirtualizedTableOptions.Builder() .tableName("EMPLOYEE") .tableSchema("dv_ibmid_060000s4y5") .build(); Response<Void> response = watsonQueryService.grantRolesToVirtualizedTable(grantRolesToVirtualizedTableOptions).execute();
const params = { tableName: 'EMPLOYEE', tableSchema: 'dv_ibmid_060000s4y5', }; try { await watsonQueryService.grantRolesToVirtualizedTable(params); } catch (err) { console.warn(err); }
response = watson_query_service.grant_roles_to_virtualized_table( table_name='EMPLOYEE', table_schema='dv_ibmid_060000s4y5' )
Delete role
Revokes roles for a virtualized table.
Revokes roles for a virtualized table.
Revokes roles for a virtualized table.
Revokes roles for a virtualized table.
Revokes roles for a virtualized table.
DELETE /dvapiserver/v2/privileges/roles/{role_name}
(watsonQuery *WatsonQueryV1) DvaasRevokeRoleFromTable(dvaasRevokeRoleFromTableOptions *DvaasRevokeRoleFromTableOptions) (response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DvaasRevokeRoleFromTableWithContext(ctx context.Context, dvaasRevokeRoleFromTableOptions *DvaasRevokeRoleFromTableOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> dvaasRevokeRoleFromTable(DvaasRevokeRoleFromTableOptions dvaasRevokeRoleFromTableOptions)
dvaas_revoke_role_from_table(self,
role_name: str,
table_name: str,
table_schema: str,
**kwargs
) -> DetailedResponse
dvaasRevokeRoleFromTable(params)
Request
Instantiate the DvaasRevokeRoleFromTableOptions
struct and set the fields to provide parameter values for the DvaasRevokeRoleFromTable
method.
Use the DvaasRevokeRoleFromTableOptions.Builder
to create a DvaasRevokeRoleFromTableOptions
object that contains the parameter values for the dvaasRevokeRoleFromTable
method.
Path Parameters
The Watson Query role. Values can be DV_ADMIN, DV_ENGINEER, DV_STEWARD, or DV_WORKER, which correspond to MANAGER, ENGINEER, STEWARD, and USER roles in the user interface.
Example:
DV_ENGINEER
Query Parameters
The virtualized table's name.
Example:
EMPLOYEE
The virtualized table's schema name.
Example:
dv_ibmid_060000s4y5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DvaasRevokeRoleFromTable options.
The Watson Query role type. Values can be DV_ADMIN, DV_ENGINEER, DV_STEWARD, or DV_WORKER, which correspond to MANAGER, ENGINEER, STEWARD, and USER roles in the user interface.
Examples:ViewThe virtualized table's name.
Examples:ViewThe virtualized table's schema name.
Examples:View
The dvaasRevokeRoleFromTable options.
The Watson Query role type. Values can be DV_ADMIN, DV_ENGINEER, DV_STEWARD, or DV_WORKER, which correspond to MANAGER, ENGINEER, STEWARD, and USER roles in the user interface.
Examples:ViewThe virtualized table's name.
Examples:ViewThe virtualized table's schema name.
Examples:View
parameters
The Watson Query role type. Values can be DV_ADMIN, DV_ENGINEER, DV_STEWARD, or DV_WORKER, which correspond to MANAGER, ENGINEER, STEWARD, and USER roles in the user interface.
Examples:value_source_lines_htmlThe virtualized table's name.
Examples:value_source_lines_htmlThe virtualized table's schema name.
Examples:value_source_lines_html
parameters
The Watson Query role type. Values can be DV_ADMIN, DV_ENGINEER, DV_STEWARD, or DV_WORKER, which correspond to MANAGER, ENGINEER, STEWARD, and USER roles in the user interface.
Examples:value_source_lines_htmlThe virtualized table's name.
Examples:value_source_lines_htmlThe virtualized table's schema name.
Examples:value_source_lines_html
curl -k -X DELETE -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/privileges/roles/DV_ENGINEER?table_schema=dv_ibmid_060000s4y5&table_name=EMPLOYEE"
dvaasRevokeRoleFromTableOptions := watsonQueryService.NewDvaasRevokeRoleFromTableOptions( "DV_ENGINEER", "EMPLOYEE", "dv_ibmid_060000s4y5", ) response, err := watsonQueryService.DvaasRevokeRoleFromTable(dvaasRevokeRoleFromTableOptions) if err != nil { panic(err) }
DvaasRevokeRoleFromTableOptions dvaasRevokeRoleFromTableOptions = new DvaasRevokeRoleFromTableOptions.Builder() .roleName("DV_ENGINEER") .tableName("EMPLOYEE") .tableSchema("dv_ibmid_060000s4y5") .build(); Response<Void> response = watsonQueryService.dvaasRevokeRoleFromTable(dvaasRevokeRoleFromTableOptions).execute();
const params = { roleName: 'DV_ENGINEER', tableName: 'EMPLOYEE', tableSchema: 'dv_ibmid_060000s4y5', }; try { await watsonQueryService.dvaasRevokeRoleFromTable(params); } catch (err) { console.warn(err); }
response = watson_query_service.dvaas_revoke_role_from_table( role_name='DV_ENGINEER', table_name='EMPLOYEE', table_schema='dv_ibmid_060000s4y5' )
Get virtualized tables by role
Retrieves the list of virtualized tables that have a specific role.
Retrieves the list of virtualized tables that have a specific role.
Retrieves the list of virtualized tables that have a specific role.
Retrieves the list of virtualized tables that have a specific role.
Retrieves the list of virtualized tables that have a specific role.
GET /dvapiserver/v2/privileges/tables
(watsonQuery *WatsonQueryV1) ListTablesForRole(listTablesForRoleOptions *ListTablesForRoleOptions) (result *TablesForRoleResponse, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) ListTablesForRoleWithContext(ctx context.Context, listTablesForRoleOptions *ListTablesForRoleOptions) (result *TablesForRoleResponse, response *core.DetailedResponse, err error)
ServiceCall<TablesForRoleResponse> listTablesForRole(ListTablesForRoleOptions listTablesForRoleOptions)
list_tables_for_role(self,
rolename: str,
**kwargs
) -> DetailedResponse
listTablesForRole(params)
Request
Instantiate the ListTablesForRoleOptions
struct and set the fields to provide parameter values for the ListTablesForRole
method.
Use the ListTablesForRoleOptions.Builder
to create a ListTablesForRoleOptions
object that contains the parameter values for the listTablesForRole
method.
Query Parameters
Watson Query has four roles: MANAGER, STEWARD, ENGINEER and USER. The value of rolename should be one of these.
Example:
MANAGER | STEWARD | ENGINEER | USER
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListTablesForRole options.
Watson Query has four roles: MANAGER, STEWARD, ENGINEER and USER. The value of rolename should be one of these.
Examples:View
The listTablesForRole options.
Watson Query has four roles: MANAGER, STEWARD, ENGINEER and USER. The value of rolename should be one of these.
Examples:View
parameters
Watson Query has four roles: MANAGER, STEWARD, ENGINEER and USER. The value of rolename should be one of these.
Examples:value_source_lines_html
parameters
Watson Query has four roles: MANAGER, STEWARD, ENGINEER and USER. The value of rolename should be one of these.
Examples:value_source_lines_html
curl -k -X GET -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/privileges/tables?rolename=ENGINEER"
listTablesForRoleOptions := watsonQueryService.NewListTablesForRoleOptions( "MANAGER | STEWARD | ENGINEER | USER", ) tablesForRoleResponse, response, err := watsonQueryService.ListTablesForRole(listTablesForRoleOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(tablesForRoleResponse, "", " ") fmt.Println(string(b))
ListTablesForRoleOptions listTablesForRoleOptions = new ListTablesForRoleOptions.Builder() .rolename("MANAGER | STEWARD | ENGINEER | USER") .build(); Response<TablesForRoleResponse> response = watsonQueryService.listTablesForRole(listTablesForRoleOptions).execute(); TablesForRoleResponse tablesForRoleResponse = response.getResult(); System.out.println(tablesForRoleResponse);
const params = { rolename: 'MANAGER | STEWARD | ENGINEER | USER', }; let res; try { res = await watsonQueryService.listTablesForRole(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
tables_for_role_response = watson_query_service.list_tables_for_role( rolename='MANAGER | STEWARD | ENGINEER | USER' ).get_result() print(json.dumps(tables_for_role_response, indent=2))
Response
The name of the virtualized table that is granted access to the role ROLENAME.
The schema of the virtualized table that is granted access to the role ROLENAME.
objects
The virtualized table name that is granted access to role ROLENAME.
The SCHEMA of virtualized table that is granted access to role ROLENAME.
Objects
The virtualized table name that is granted access to role ROLENAME.
The SCHEMA of virtualized table that is granted access to role ROLENAME.
objects
The virtualized table name that is granted access to role ROLENAME.
The SCHEMA of virtualized table that is granted access to role ROLENAME.
objects
The virtualized table name that is granted access to role ROLENAME.
The SCHEMA of virtualized table that is granted access to role ROLENAME.
objects
Status Code
Success
Bad Request
Unauthorized
Internal Server Error
{ "objects": [ { "table_name": "TEST_TABLE", "table_schema": "ADMIN" } ] }
{ "objects": [ { "table_name": "TEST_TABLE", "table_schema": "ADMIN" } ] }
Turn policy enforcement status on or off
Turns policy enforcement status on or off.
Turns policy enforcement status on or off.
Turns policy enforcement status on or off.
Turns policy enforcement status on or off.
Turns policy enforcement status on or off.
PUT /dvapiserver/v2/security/policy/status
(watsonQuery *WatsonQueryV1) TurnOnPolicyV2(turnOnPolicyV2Options *TurnOnPolicyV2Options) (result *TurnOnPolicyV2Response, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) TurnOnPolicyV2WithContext(ctx context.Context, turnOnPolicyV2Options *TurnOnPolicyV2Options) (result *TurnOnPolicyV2Response, response *core.DetailedResponse, err error)
ServiceCall<TurnOnPolicyV2Response> turnOnPolicyV2(TurnOnPolicyV2Options turnOnPolicyV2Options)
turn_on_policy_v2(self,
status: str,
**kwargs
) -> DetailedResponse
turnOnPolicyV2(params)
Request
Instantiate the TurnOnPolicyV2Options
struct and set the fields to provide parameter values for the TurnOnPolicyV2
method.
Use the TurnOnPolicyV2Options.Builder
to create a TurnOnPolicyV2Options
object that contains the parameter values for the turnOnPolicyV2
method.
Query Parameters
Sets the status of the policy enforcement.
Example:
enabled
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The TurnOnPolicyV2 options.
Set the status of policy enforcement.
Examples:View
The turnOnPolicyV2 options.
Set the status of policy enforcement.
Examples:View
parameters
Set the status of policy enforcement.
Examples:value_source_lines_html
parameters
Set the status of policy enforcement.
Examples:value_source_lines_html
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/security/policy/status?status=enabled"
turnOnPolicyV2Options := watsonQueryService.NewTurnOnPolicyV2Options( "enabled", ) turnOnPolicyV2Response, response, err := watsonQueryService.TurnOnPolicyV2(turnOnPolicyV2Options) if err != nil { panic(err) } b, _ := json.MarshalIndent(turnOnPolicyV2Response, "", " ") fmt.Println(string(b))
TurnOnPolicyV2Options turnOnPolicyV2Options = new TurnOnPolicyV2Options.Builder() .status("enabled") .build(); Response<TurnOnPolicyV2Response> response = watsonQueryService.turnOnPolicyV2(turnOnPolicyV2Options).execute(); TurnOnPolicyV2Response turnOnPolicyV2Response = response.getResult(); System.out.println(turnOnPolicyV2Response);
const params = { status: 'enabled', }; let res; try { res = await watsonQueryService.turnOnPolicyV2(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
turn_on_policy_v2_response = watson_query_service.turn_on_policy_v2( status='enabled' ).get_result() print(json.dumps(turn_on_policy_v2_response, indent=2))
Get policy enforcement status
Gets the policy enforcement status. The function returns enabled or disabled depending on the status.
Get policy enforcement status, return enabled or disabled.
Get policy enforcement status, return enabled or disabled.
Get policy enforcement status, return enabled or disabled.
Get policy enforcement status, return enabled or disabled.
GET /dvapiserver/v2/security/policy/status
(watsonQuery *WatsonQueryV1) CheckPolicyStatusV2(checkPolicyStatusV2Options *CheckPolicyStatusV2Options) (result *CheckPolicyStatusV2Response, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) CheckPolicyStatusV2WithContext(ctx context.Context, checkPolicyStatusV2Options *CheckPolicyStatusV2Options) (result *CheckPolicyStatusV2Response, response *core.DetailedResponse, err error)
ServiceCall<CheckPolicyStatusV2Response> checkPolicyStatusV2()
check_policy_status_v2(self,
**kwargs
) -> DetailedResponse
checkPolicyStatusV2(params)
Request
No Request Parameters
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
No Request Parameters
No Request Parameters
No Request Parameters
No Request Parameters
curl -k -X GET -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/security/policy/status"
checkPolicyStatusV2Options := watsonQueryService.NewCheckPolicyStatusV2Options() checkPolicyStatusV2Response, response, err := watsonQueryService.CheckPolicyStatusV2(checkPolicyStatusV2Options) if err != nil { panic(err) } b, _ := json.MarshalIndent(checkPolicyStatusV2Response, "", " ") fmt.Println(string(b))
CheckPolicyStatusV2Options checkPolicyStatusV2Options = new CheckPolicyStatusV2Options(); Response<CheckPolicyStatusV2Response> response = watsonQueryService.checkPolicyStatusV2(checkPolicyStatusV2Options).execute(); CheckPolicyStatusV2Response checkPolicyStatusV2Response = response.getResult(); System.out.println(checkPolicyStatusV2Response);
let res; try { res = await watsonQueryService.checkPolicyStatusV2({}); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
check_policy_status_v2_response = watson_query_service.check_policy_status_v2().get_result() print(json.dumps(check_policy_status_v2_response, indent=2))
Virtualize table
Transforms a given data source table into a virtualized table.
Transforms a given data source table into a virtualized table.
Transforms a given data source table into a virtualized table.
Transforms a given data source table into a virtualized table.
Transforms a given data source table into a virtualized table.
POST /dvapiserver/v2/virtualization/tables
(watsonQuery *WatsonQueryV1) DvaasVirtualizeTable(dvaasVirtualizeTableOptions *DvaasVirtualizeTableOptions) (result *VirtualizeTableResponse, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DvaasVirtualizeTableWithContext(ctx context.Context, dvaasVirtualizeTableOptions *DvaasVirtualizeTableOptions) (result *VirtualizeTableResponse, response *core.DetailedResponse, err error)
ServiceCall<VirtualizeTableResponse> dvaasVirtualizeTable(DvaasVirtualizeTableOptions dvaasVirtualizeTableOptions)
dvaas_virtualize_table(self,
source_name: str,
source_table_def: List['VirtualizeTableParameterSourceTableDefItem'],
sources: List[str],
virtual_name: str,
virtual_schema: str,
virtual_table_def: List['VirtualizeTableParameterVirtualTableDefItem'],
*,
is_included_columns: str = None,
replace: bool = None,
**kwargs
) -> DetailedResponse
dvaasVirtualizeTable(params)
Request
Instantiate the DvaasVirtualizeTableOptions
struct and set the fields to provide parameter values for the DvaasVirtualizeTable
method.
Use the DvaasVirtualizeTableOptions.Builder
to create a DvaasVirtualizeTableOptions
object that contains the parameter values for the dvaasVirtualizeTable
method.
Request body
The name of the source table.
Example:
Tab1
The name of the column.
Example:
Column1
The type of the column.
Example:
INTEGER
source_table_def
The name of the table to be virtualized.
Example:
Tab1
The schema of the table to be virtualized.
Example:
dv_ibmid_060000s4y5
The name of the column.
Example:
Column_1
The type of the column.
Example:
INTEGER
virtual_table_def
The columns that are included in the source table.
Example:
Y
Determines whether to replace columns in the virtualized table.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DvaasVirtualizeTable options.
The name of the source table.
Examples:ViewThe name of the column.
Examples:ViewThe type of the column.
Examples:View
SourceTableDef
The name of the table that will be virtualized.
Examples:ViewThe schema of the table that will be virtualized.
Examples:ViewThe name of the column.
Examples:ViewThe type of the column.
Examples:View
VirtualTableDef
The columns that are included in the source table.
Examples:ViewDetermines whether to replace columns in the virtualized table.
Examples:View
The dvaasVirtualizeTable options.
The name of the source table.
Examples:ViewThe name of the column.
Examples:ViewThe type of the column.
Examples:View
sourceTableDef
The name of the table that will be virtualized.
Examples:ViewThe schema of the table that will be virtualized.
Examples:ViewThe name of the column.
Examples:ViewThe type of the column.
Examples:View
virtualTableDef
The columns that are included in the source table.
Examples:ViewDetermines whether to replace columns in the virtualized table.
Examples:View
parameters
The name of the source table.
Examples:value_source_lines_htmlThe name of the column.
Examples:ViewThe type of the column.
Examples:View
source_table_def
The name of the table that will be virtualized.
Examples:value_source_lines_htmlThe schema of the table that will be virtualized.
Examples:value_source_lines_htmlThe name of the column.
Examples:ViewThe type of the column.
Examples:View
virtual_table_def
The columns that are included in the source table.
Examples:value_source_lines_htmlDetermines whether to replace columns in the virtualized table.
Examples:value_source_lines_html
parameters
The name of the source table.
Examples:value_source_lines_htmlThe name of the column.
Examples:ViewThe type of the column.
Examples:View
sourceTableDef
The name of the table that will be virtualized.
Examples:value_source_lines_htmlThe schema of the table that will be virtualized.
Examples:value_source_lines_htmlThe name of the column.
Examples:ViewThe type of the column.
Examples:View
virtualTableDef
The columns that are included in the source table.
Examples:value_source_lines_htmlDetermines whether to replace columns in the virtualized table.
Examples:value_source_lines_html
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" -d "{\"is_included_columns\":\"Y\",\"replace\":\false\,\"source_name\":\"Tab1\",\"source_table_def\":\[{\"column_name\":\"Column1\",\"column_type\":\"INTEGER\"}],\"sources\":\"DB210001:DB2INST1\"\",\"virtual_name\":\"Tab1\",\"virtual_schema\":\"dv_ibmid_060000s4y5\",\"virtual_table_def\":\[{\"column_name\":\"Column1\",\"column_type\":\"INTEGER\"}]}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/virtualization/tables"
virtualizeTableParameterSourceTableDefItemModel := &watsonqueryv1.VirtualizeTableParameterSourceTableDefItem{ ColumnName: core.StringPtr("Column1"), ColumnType: core.StringPtr("INTEGER"), } virtualizeTableParameterVirtualTableDefItemModel := &watsonqueryv1.VirtualizeTableParameterVirtualTableDefItem{ ColumnName: core.StringPtr("Column_1"), ColumnType: core.StringPtr("INTEGER"), } dvaasVirtualizeTableOptions := watsonQueryService.NewDvaasVirtualizeTableOptions( "Tab1", []watsonqueryv1.VirtualizeTableParameterSourceTableDefItem{*virtualizeTableParameterSourceTableDefItemModel}, []string{`DB210001:"Hjq1"`}, "Tab1", "dv_ibmid_060000s4y5", []watsonqueryv1.VirtualizeTableParameterVirtualTableDefItem{*virtualizeTableParameterVirtualTableDefItemModel}, ) virtualizeTableResponse, response, err := watsonQueryService.DvaasVirtualizeTable(dvaasVirtualizeTableOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(virtualizeTableResponse, "", " ") fmt.Println(string(b))
VirtualizeTableParameterSourceTableDefItem virtualizeTableParameterSourceTableDefItemModel = new VirtualizeTableParameterSourceTableDefItem.Builder() .columnName("Column1") .columnType("INTEGER") .build(); VirtualizeTableParameterVirtualTableDefItem virtualizeTableParameterVirtualTableDefItemModel = new VirtualizeTableParameterVirtualTableDefItem.Builder() .columnName("Column_1") .columnType("INTEGER") .build(); DvaasVirtualizeTableOptions dvaasVirtualizeTableOptions = new DvaasVirtualizeTableOptions.Builder() .sourceName("Tab1") .sourceTableDef(new java.util.ArrayList<VirtualizeTableParameterSourceTableDefItem>(java.util.Arrays.asList(virtualizeTableParameterSourceTableDefItemModel))) .sources(new java.util.ArrayList<String>(java.util.Arrays.asList("DB210001:\"Hjq1\""))) .virtualName("Tab1") .virtualSchema("dv_ibmid_060000s4y5") .virtualTableDef(new java.util.ArrayList<VirtualizeTableParameterVirtualTableDefItem>(java.util.Arrays.asList(virtualizeTableParameterVirtualTableDefItemModel))) .build(); Response<VirtualizeTableResponse> response = watsonQueryService.dvaasVirtualizeTable(dvaasVirtualizeTableOptions).execute(); VirtualizeTableResponse virtualizeTableResponse = response.getResult(); System.out.println(virtualizeTableResponse);
// Request models needed by this operation. // VirtualizeTableParameterSourceTableDefItem const virtualizeTableParameterSourceTableDefItemModel = { column_name: 'Column1', column_type: 'INTEGER', }; // VirtualizeTableParameterVirtualTableDefItem const virtualizeTableParameterVirtualTableDefItemModel = { column_name: 'Column_1', column_type: 'INTEGER', }; const params = { sourceName: 'Tab1', sourceTableDef: [virtualizeTableParameterSourceTableDefItemModel], sources: ['DB210001:"Hjq1"'], virtualName: 'Tab1', virtualSchema: 'dv_ibmid_060000s4y5', virtualTableDef: [virtualizeTableParameterVirtualTableDefItemModel], }; let res; try { res = await watsonQueryService.dvaasVirtualizeTable(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
virtualize_table_parameter_source_table_def_item_model = { 'column_name': 'Column1', 'column_type': 'INTEGER', } virtualize_table_parameter_virtual_table_def_item_model = { 'column_name': 'Column_1', 'column_type': 'INTEGER', } virtualize_table_response = watson_query_service.dvaas_virtualize_table( source_name='Tab1', source_table_def=[virtualize_table_parameter_source_table_def_item_model], sources=['DB210001:"Hjq1"'], virtual_name='Tab1', virtual_schema='dv_ibmid_060000s4y5', virtual_table_def=[virtualize_table_parameter_virtual_table_def_item_model] ).get_result() print(json.dumps(virtualize_table_response, indent=2))
Response
The name of the table to be virtualized.
Example:
Tab1
The schema of the table to be virtualized.
Example:
dv_ibmid_060000s4y5
The name of the table that is virtualized.
Examples:ViewThe schema of the table that is virtualized.
Examples:View
The name of the table that is virtualized.
Examples:ViewThe schema of the table that is virtualized.
Examples:View
The name of the table that is virtualized.
Examples:ViewThe schema of the table that is virtualized.
Examples:View
The name of the table that is virtualized.
Examples:ViewThe schema of the table that is virtualized.
Examples:View
Status Code
Created
Bad Request
Unauthorized
Internal Server Error
No Sample Response
Delete virtualized table
Removes the virtual table. You must specify the schema and table name.
Removes the specified virtualized table. You must specify the schema and table name.
Removes the specified virtualized table. You must specify the schema and table name.
Removes the specified virtualized table. You must specify the schema and table name.
Removes the specified virtualized table. You must specify the schema and table name.
DELETE /dvapiserver/v2/virtualization/tables/{virtual_name}
(watsonQuery *WatsonQueryV1) DeleteTable(deleteTableOptions *DeleteTableOptions) (response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DeleteTableWithContext(ctx context.Context, deleteTableOptions *DeleteTableOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteTable(DeleteTableOptions deleteTableOptions)
delete_table(self,
virtual_schema: str,
virtual_name: str,
**kwargs
) -> DetailedResponse
deleteTable(params)
Request
Instantiate the DeleteTableOptions
struct and set the fields to provide parameter values for the DeleteTable
method.
Use the DeleteTableOptions.Builder
to create a DeleteTableOptions
object that contains the parameter values for the deleteTable
method.
Path Parameters
The name of virtualized table to be deleted.
Query Parameters
The schema of virtualized table to be deleted.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteTable options.
The schema of virtualized table to be deleted.
The name of virtualized table to be deleted.
The deleteTable options.
The schema of virtualized table to be deleted.
The name of virtualized table to be deleted.
parameters
The schema of virtualized table to be deleted.
The name of virtualized table to be deleted.
parameters
The schema of virtualized table to be deleted.
The name of virtualized table to be deleted.
curl -k -X DELETE -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/virtualization/tables/EMPLOYEE?virtual_schema=dv_ibmid_060000s4y5"
deleteTableOptions := watsonQueryService.NewDeleteTableOptions( "testString", "testString", ) response, err := watsonQueryService.DeleteTable(deleteTableOptions) if err != nil { panic(err) }
DeleteTableOptions deleteTableOptions = new DeleteTableOptions.Builder() .virtualSchema("testString") .virtualName("testString") .build(); Response<Void> response = watsonQueryService.deleteTable(deleteTableOptions).execute();
const params = { virtualSchema: 'testString', virtualName: 'testString', }; try { await watsonQueryService.deleteTable(params); } catch (err) { console.warn(err); }
response = watson_query_service.delete_table( virtual_schema='testString', virtual_name='testString' )
Create a remote table for the ORC or Parquet file on a cloud object store (COS).
Create a remote table for the ORC or Parquet file on a cloud object store (COS).
Create a remote table for the ORC or Parquet file on a cloud object store (COS).
Create a remote table for the ORC or Parquet file on a cloud object store (COS).
Create a remote table for the ORC or Parquet file on a cloud object store (COS).
Create a remote table for the ORC or Parquet file on a cloud object store (COS).
POST /dvapiserver/v2/virtualization/cloud_object_storages
(watsonQuery *WatsonQueryV1) VirtualizeCosV2(virtualizeCosV2Options *VirtualizeCosV2Options) (result *SuccessResponse, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) VirtualizeCosV2WithContext(ctx context.Context, virtualizeCosV2Options *VirtualizeCosV2Options) (result *SuccessResponse, response *core.DetailedResponse, err error)
ServiceCall<SuccessResponse> virtualizeCosV2(VirtualizeCosV2Options virtualizeCosV2Options)
virtualize_cos_v2(self,
url: str,
virtual_name: str,
virtual_schema: str,
virtual_table_def: List['VirtualizeCosV2RequestVirtualTableDefItem'],
*,
is_replace: bool = None,
options: str = None,
jwt_auth_user_payload: str = None,
**kwargs
) -> DetailedResponse
virtualizeCosV2(params)
Request
Instantiate the VirtualizeCosV2Options
struct and set the fields to provide parameter values for the VirtualizeCosV2
method.
Use the VirtualizeCosV2Options.Builder
to create a VirtualizeCosV2Options
object that contains the parameter values for the virtualizeCosV2
method.
Custom Headers
Supplied by proxy. Do NOT add your own value.
The file path with bucket name.
Example:
s3a://testBucket/home/data.csv
The virtual table name.
The virtual table schema.
Example:
Column_1
Example:
INTEGER
virtual_table_def
Whether to replace the existing table when creating the virtual table.
Default:
false
The options used to virtualize file.
Example:
INCPARTS=true
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The VirtualizeCosV2 options.
the file path with bucket name.
Examples:Viewthe virtual table name.
the virtual table schema.
- Examples:View
- Examples:View
VirtualTableDef
if repalce the existing one when create the virtual table.
Default:
false
the options used to virtualize file.
Examples:ViewSupplied by proxy. Do NOT add your own value.
The virtualizeCosV2 options.
the file path with bucket name.
Examples:Viewthe virtual table name.
the virtual table schema.
- Examples:View
- Examples:View
virtualTableDef
if repalce the existing one when create the virtual table.
Default:
false
the options used to virtualize file.
Examples:ViewSupplied by proxy. Do NOT add your own value.
parameters
the file path with bucket name.
Examples:value_source_lines_htmlthe virtual table name.
the virtual table schema.
- Examples:View
- Examples:View
virtual_table_def
if repalce the existing one when create the virtual table.
Default:
false
the options used to virtualize file.
Examples:value_source_lines_htmlSupplied by proxy. Do NOT add your own value.
parameters
the file path with bucket name.
Examples:value_source_lines_htmlthe virtual table name.
the virtual table schema.
- Examples:View
- Examples:View
virtualTableDef
if repalce the existing one when create the virtual table.
Default:
false
the options used to virtualize file.
Examples:value_source_lines_htmlSupplied by proxy. Do NOT add your own value.
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" -d "{\"is_replace\":\"false\",\"options\":\"INCPARTS=true\",\"url\":\"s3a://testBucket/home/data.csv\",\"virtual_name\":\"employee\",\"virtual_schema\":\"db2inst1\",\"virtual_table_def\":\[{\"column_name\":\"Column1\",\"column_type\":\"INTEGER\"}]}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/virtualization/cloud_object_storages"
virtualizeCosV2RequestVirtualTableDefItemModel := &watsonqueryv1.VirtualizeCosV2RequestVirtualTableDefItem{ ColumnName: core.StringPtr("Column_1"), ColumnType: core.StringPtr("INTEGER"), } virtualizeCosV2Options := watsonQueryService.NewVirtualizeCosV2Options( "s3a://testBucket/home/data.csv", "testString", "testString", []watsonqueryv1.VirtualizeCosV2RequestVirtualTableDefItem{*virtualizeCosV2RequestVirtualTableDefItemModel}, ) successResponse, response, err := watsonQueryService.VirtualizeCosV2(virtualizeCosV2Options) if err != nil { panic(err) } b, _ := json.MarshalIndent(successResponse, "", " ") fmt.Println(string(b))
VirtualizeCosV2RequestVirtualTableDefItem virtualizeCosV2RequestVirtualTableDefItemModel = new VirtualizeCosV2RequestVirtualTableDefItem.Builder() .columnName("Column_1") .columnType("INTEGER") .build(); VirtualizeCosV2Options virtualizeCosV2Options = new VirtualizeCosV2Options.Builder() .url("s3a://testBucket/home/data.csv") .virtualName("testString") .virtualSchema("testString") .virtualTableDef(new java.util.ArrayList<VirtualizeCosV2RequestVirtualTableDefItem>(java.util.Arrays.asList(virtualizeCosV2RequestVirtualTableDefItemModel))) .build(); Response<SuccessResponse> response = watsonQueryService.virtualizeCosV2(virtualizeCosV2Options).execute(); SuccessResponse successResponse = response.getResult(); System.out.println(successResponse);
// Request models needed by this operation. // VirtualizeCosV2RequestVirtualTableDefItem const virtualizeCosV2RequestVirtualTableDefItemModel = { column_name: 'Column_1', column_type: 'INTEGER', }; const params = { url: 's3a://testBucket/home/data.csv', virtualName: 'testString', virtualSchema: 'testString', virtualTableDef: [virtualizeCosV2RequestVirtualTableDefItemModel], }; let res; try { res = await watsonQueryService.virtualizeCosV2(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
virtualize_cos_v2_request_virtual_table_def_item_model = { 'column_name': 'Column_1', 'column_type': 'INTEGER', } success_response = watson_query_service.virtualize_cos_v2( url='s3a://testBucket/home/data.csv', virtual_name='testString', virtual_schema='testString', virtual_table_def=[virtualize_cos_v2_request_virtual_table_def_item_model] ).get_result() print(json.dumps(success_response, indent=2))
Get primary catalog ID
Gets the primary catalog ID from the DVSYS.INSTANCE_INFO table.
Gets the primary catalog ID from the DVSYS.INSTANCE_INFO table.
Gets the primary catalog ID from the DVSYS.INSTANCE_INFO table.
Gets the primary catalog ID from the DVSYS.INSTANCE_INFO table.
Gets the primary catalog ID from the DVSYS.INSTANCE_INFO table.
GET /dvapiserver/v2/catalog/primary
(watsonQuery *WatsonQueryV1) GetPrimaryCatalog(getPrimaryCatalogOptions *GetPrimaryCatalogOptions) (result *PrimaryCatalogInfo, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GetPrimaryCatalogWithContext(ctx context.Context, getPrimaryCatalogOptions *GetPrimaryCatalogOptions) (result *PrimaryCatalogInfo, response *core.DetailedResponse, err error)
ServiceCall<PrimaryCatalogInfo> getPrimaryCatalog()
get_primary_catalog(self,
**kwargs
) -> DetailedResponse
getPrimaryCatalog(params)
Request
No Request Parameters
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
No Request Parameters
No Request Parameters
No Request Parameters
No Request Parameters
curl -k -X GET -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/catalog/primary"
getPrimaryCatalogOptions := watsonQueryService.NewGetPrimaryCatalogOptions() primaryCatalogInfo, response, err := watsonQueryService.GetPrimaryCatalog(getPrimaryCatalogOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(primaryCatalogInfo, "", " ") fmt.Println(string(b))
GetPrimaryCatalogOptions getPrimaryCatalogOptions = new GetPrimaryCatalogOptions(); Response<PrimaryCatalogInfo> response = watsonQueryService.getPrimaryCatalog(getPrimaryCatalogOptions).execute(); PrimaryCatalogInfo primaryCatalogInfo = response.getResult(); System.out.println(primaryCatalogInfo);
let res; try { res = await watsonQueryService.getPrimaryCatalog({}); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
primary_catalog_info = watson_query_service.get_primary_catalog().get_result() print(json.dumps(primary_catalog_info, indent=2))
Response
Example:
true
Example:
999
Example:
The governed catalog where data assets are synchronized with the Information assets view.
Example:
Catalog-OMRS-Synced
Example:
true
Example:
Primary Catalog
entity
Example:
/v2/catalogs/648fb4e0-3f6c-4ce3-afbb-317acc03faa4
Example:
2021-01-11T10:37:03Z
Example:
648fb4e01000330999
Example:
648fb4e0-3f6c-4ce3-afbb-317acc03faa4
Example:
648fb4e0/v2/catalogs/648fb4e0-3f6c-4ce3-afbb-317acc03faa4
metadata
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
Entity
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
Metadata
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
entity
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
metadata
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
entity
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
metadata
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
entity
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
metadata
Status Code
Success
Bad Request
Unauthorized
Internal Server Error
No Sample Response
Add primary catalog
Inserts primary catalog ID into the DVSYS.INSTANCE_INFO table.
Inserts primary catalog ID into table DVSYS.INSTANCE_INFO.
Inserts primary catalog ID into table DVSYS.INSTANCE_INFO.
Inserts primary catalog ID into table DVSYS.INSTANCE_INFO.
Inserts primary catalog ID into table DVSYS.INSTANCE_INFO.
POST /dvapiserver/v2/catalog/primary
(watsonQuery *WatsonQueryV1) PostPrimaryCatalog(postPrimaryCatalogOptions *PostPrimaryCatalogOptions) (result *PostPrimaryCatalog, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) PostPrimaryCatalogWithContext(ctx context.Context, postPrimaryCatalogOptions *PostPrimaryCatalogOptions) (result *PostPrimaryCatalog, response *core.DetailedResponse, err error)
ServiceCall<PostPrimaryCatalog> postPrimaryCatalog(PostPrimaryCatalogOptions postPrimaryCatalogOptions)
post_primary_catalog(self,
guid: str,
**kwargs
) -> DetailedResponse
postPrimaryCatalog(params)
Request
Instantiate the PostPrimaryCatalogOptions
struct and set the fields to provide parameter values for the PostPrimaryCatalog
method.
Use the PostPrimaryCatalogOptions.Builder
to create a PostPrimaryCatalogOptions
object that contains the parameter values for the postPrimaryCatalog
method.
Request body
Example:
d77fc432-9b1a-4938-a2a5-9f37e08041f6
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The PostPrimaryCatalog options.
- Examples:View
The postPrimaryCatalog options.
- Examples:View
parameters
- Examples:value_source_lines_html
parameters
- Examples:value_source_lines_html
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" -d "{\"guid\": \"d77fc432-9b1a-4938-a2a5-9f37e08041f6\"}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/catalog/primary"
postPrimaryCatalogOptions := watsonQueryService.NewPostPrimaryCatalogOptions( "d77fc432-9b1a-4938-a2a5-9f37e08041f6", ) postPrimaryCatalog, response, err := watsonQueryService.PostPrimaryCatalog(postPrimaryCatalogOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(postPrimaryCatalog, "", " ") fmt.Println(string(b))
PostPrimaryCatalogOptions postPrimaryCatalogOptions = new PostPrimaryCatalogOptions.Builder() .guid("d77fc432-9b1a-4938-a2a5-9f37e08041f6") .build(); Response<PostPrimaryCatalog> response = watsonQueryService.postPrimaryCatalog(postPrimaryCatalogOptions).execute(); PostPrimaryCatalog postPrimaryCatalog = response.getResult(); System.out.println(postPrimaryCatalog);
const params = { guid: 'd77fc432-9b1a-4938-a2a5-9f37e08041f6', }; let res; try { res = await watsonQueryService.postPrimaryCatalog(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
post_primary_catalog = watson_query_service.post_primary_catalog( guid='d77fc432-9b1a-4938-a2a5-9f37e08041f6' ).get_result() print(json.dumps(post_primary_catalog, indent=2))
Response
Example:
d77fc432-9b1a-4938-a2a5-9f37e08041f6
Example:
Default Catalog
Example:
The governed catalog where data assets are synchronized with the Information assets view.
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
- Examples:View
Status Code
Created
Bad Request
Unauthorized
Internal Server Error
No Sample Response
Delete primary catalog
Deletes primary catalog item in the DVSYS.INSTANCE_INFO table.
Delete primary catalog item in the DVSYS.INSTANCE_INFO table.
Delete primary catalog item in the DVSYS.INSTANCE_INFO table.
Delete primary catalog item in the DVSYS.INSTANCE_INFO table.
Delete primary catalog item in the DVSYS.INSTANCE_INFO table.
DELETE /dvapiserver/v2/catalog/primary
(watsonQuery *WatsonQueryV1) DeletePrimaryCatalog(deletePrimaryCatalogOptions *DeletePrimaryCatalogOptions) (response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DeletePrimaryCatalogWithContext(ctx context.Context, deletePrimaryCatalogOptions *DeletePrimaryCatalogOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deletePrimaryCatalog(DeletePrimaryCatalogOptions deletePrimaryCatalogOptions)
delete_primary_catalog(self,
guid: str,
**kwargs
) -> DetailedResponse
deletePrimaryCatalog(params)
Request
Instantiate the DeletePrimaryCatalogOptions
struct and set the fields to provide parameter values for the DeletePrimaryCatalog
method.
Use the DeletePrimaryCatalogOptions.Builder
to create a DeletePrimaryCatalogOptions
object that contains the parameter values for the deletePrimaryCatalog
method.
Query Parameters
The Watson Query user name. If the value is Public, this API revokes access privileges from all Watson Query users.
Example:
d77fc432-9b1a-4938-a2a5-9f37e08041f6
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeletePrimaryCatalog options.
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:View
The deletePrimaryCatalog options.
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:View
parameters
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:value_source_lines_html
parameters
The Watson Query user name, if the value is PUBLIC, it means revoke access privilege from all Watson Query users.
Examples:value_source_lines_html
curl -k -X DELETE -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/catalog/primary?guid=d77fc432-9b1a-4938-a2a5-9f37e08041f6"
deletePrimaryCatalogOptions := watsonQueryService.NewDeletePrimaryCatalogOptions( "d77fc432-9b1a-4938-a2a5-9f37e08041f6", ) response, err := watsonQueryService.DeletePrimaryCatalog(deletePrimaryCatalogOptions) if err != nil { panic(err) }
DeletePrimaryCatalogOptions deletePrimaryCatalogOptions = new DeletePrimaryCatalogOptions.Builder() .guid("d77fc432-9b1a-4938-a2a5-9f37e08041f6") .build(); Response<Void> response = watsonQueryService.deletePrimaryCatalog(deletePrimaryCatalogOptions).execute();
const params = { guid: 'd77fc432-9b1a-4938-a2a5-9f37e08041f6', }; try { await watsonQueryService.deletePrimaryCatalog(params); } catch (err) { console.warn(err); }
response = watson_query_service.delete_primary_catalog( guid='d77fc432-9b1a-4938-a2a5-9f37e08041f6' )
Publishes virtual tables to a catalog.
Publishes virtual tables to a catalog.
Publishes virtual tables to a catalog.
Publishes virtual tables to a catalog.
Publishes virtual tables to a catalog.
Publishes virtual tables to a catalog.
POST /dvapiserver/v2/integration/catalog/publish
(watsonQuery *WatsonQueryV1) PublishAssets(publishAssetsOptions *PublishAssetsOptions) (result *CatalogPublishResponse, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) PublishAssetsWithContext(ctx context.Context, publishAssetsOptions *PublishAssetsOptions) (result *CatalogPublishResponse, response *core.DetailedResponse, err error)
ServiceCall<CatalogPublishResponse> publishAssets(PublishAssetsOptions publishAssetsOptions)
publish_assets(self,
catalog_id: str,
allow_duplicates: bool,
assets: List['PostPrimaryCatalogParametersAssetsItem'],
**kwargs
) -> DetailedResponse
publishAssets(params)
Request
Instantiate the PublishAssetsOptions
struct and set the fields to provide parameter values for the PublishAssets
method.
Use the PublishAssetsOptions.Builder
to create a PublishAssetsOptions
object that contains the parameter values for the publishAssets
method.
Example:
2b6b9fc5-626c-47a9-a836-56b76c0bc826
The type of the data source that you want to add.
Example:
db2inst1
Example:
EMPLOYEE
assets
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The PublishAssets options.
- Examples:View
The type of data source that you want to add.
Examples:View- Examples:View
- Examples:View
Assets
The publishAssets options.
- Examples:View
The type of data source that you want to add.
Examples:View- Examples:View
- Examples:View
assets
parameters
- Examples:value_source_lines_html
The type of data source that you want to add.
Examples:value_source_lines_html- Examples:View
- Examples:View
assets
parameters
- Examples:value_source_lines_html
The type of data source that you want to add.
Examples:value_source_lines_html- Examples:View
- Examples:View
assets
curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "X-Db-Profile: $url_encoded_crn" -H "Authorization: Bearer $token" -d "{\"catalog_id\": \"648fb4e0-3f6c-4ce3-afbb-317acc03faa5\",\"assets\": [{\"schema\": \"db2inst1\",\"table\": \"employee\"}]}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/integration/catalog/publish"
postPrimaryCatalogParametersAssetsItemModel := &watsonqueryv1.PostPrimaryCatalogParametersAssetsItem{ Schema: core.StringPtr("db2inst1"), Table: core.StringPtr("EMPLOYEE"), } publishAssetsOptions := watsonQueryService.NewPublishAssetsOptions( "2b6b9fc5-626c-47a9-a836-56b76c0bc826", false, []watsonqueryv1.PostPrimaryCatalogParametersAssetsItem{*postPrimaryCatalogParametersAssetsItemModel}, ) catalogPublishResponse, response, err := watsonQueryService.PublishAssets(publishAssetsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(catalogPublishResponse, "", " ") fmt.Println(string(b))
PostPrimaryCatalogParametersAssetsItem postPrimaryCatalogParametersAssetsItemModel = new PostPrimaryCatalogParametersAssetsItem.Builder() .schema("db2inst1") .table("EMPLOYEE") .build(); PublishAssetsOptions publishAssetsOptions = new PublishAssetsOptions.Builder() .catalogId("2b6b9fc5-626c-47a9-a836-56b76c0bc826") .allowDuplicates(false) .assets(new java.util.ArrayList<PostPrimaryCatalogParametersAssetsItem>(java.util.Arrays.asList(postPrimaryCatalogParametersAssetsItemModel))) .build(); Response<CatalogPublishResponse> response = watsonQueryService.publishAssets(publishAssetsOptions).execute(); CatalogPublishResponse catalogPublishResponse = response.getResult(); System.out.println(catalogPublishResponse);
// Request models needed by this operation. // PostPrimaryCatalogParametersAssetsItem const postPrimaryCatalogParametersAssetsItemModel = { schema: 'db2inst1', table: 'EMPLOYEE', }; const params = { catalogId: '2b6b9fc5-626c-47a9-a836-56b76c0bc826', allowDuplicates: false, assets: [postPrimaryCatalogParametersAssetsItemModel], }; let res; try { res = await watsonQueryService.publishAssets(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
post_primary_catalog_parameters_assets_item_model = { 'schema': 'db2inst1', 'table': 'EMPLOYEE', } catalog_publish_response = watson_query_service.publish_assets( catalog_id='2b6b9fc5-626c-47a9-a836-56b76c0bc826', allow_duplicates=False, assets=[post_primary_catalog_parameters_assets_item_model] ).get_result() print(json.dumps(catalog_publish_response, indent=2))
Response
Example:
USER999
Example:
customer
duplicate_assets
Example:
37fa4a15-1071-4a20-bc9e-0283d3dfb6e
Example:
USER999
Example:
customer
failed_assets
Example:
USER999
Example:
customer
Example:
37fa4a15-1071-4a20-bc9e-0283d3dfb6e1
published_assets
- Examples:View
- Examples:View
DuplicateAssets
- Examples:View
- Examples:View
- Examples:View
FailedAssets
- Examples:View
- Examples:View
- Examples:View
PublishedAssets
- Examples:View
- Examples:View
duplicateAssets
- Examples:View
- Examples:View
- Examples:View
failedAssets
- Examples:View
- Examples:View
- Examples:View
publishedAssets
- Examples:View
- Examples:View
duplicate_assets
- Examples:View
- Examples:View
- Examples:View
failed_assets
- Examples:View
- Examples:View
- Examples:View
published_assets
- Examples:View
- Examples:View
duplicate_assets
- Examples:View
failed_assets