IBM Cloud API Docs

Introduction

Watson Query integrates data sources across multiple types and locations and turns all this data into one logical data view.

The Watson Query REST API connects to your service, so you can manage your virtual data, data sources, and user roles.

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.

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

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

  • curl -k -X GET "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

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

Example responses
  • {
      "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.

WithContext method only

The AddDatasourceConnection options.

The addDatasourceConnection options.

parameters

  • The type of data source that you want to add.

    Examples:
  • The name of the data source.

    Examples:
  • The location of the data source that you want to add.

    Examples:
  • Examples:

parameters

  • The type of data source that you want to add.

    Examples:
  • The name of the data source.

    Examples:
  • The location of the data source that you want to add.

    Examples:
  • Examples:
  • 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

Status Code

  • Created

  • Bad Request

  • Unauthorized

  • Conflict

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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

The DeleteDatasourceConnection options.

The deleteDatasourceConnection options.

parameters

  • The connection identifier for the platform.

    Examples:
  • The connection identifier for Watson Query.

    Examples:

parameters

  • The connection identifier for the platform.

    Examples:
  • The connection identifier for Watson Query.

    Examples:
  • 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'
    )

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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

The GetObjectStoreConnectionsV2 options.

The getObjectStoreConnectionsV2 options.

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

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Grant user access

Grants user access to a specific virtualized table.

Grants user access to a specific virtualized table.

Grants user access to a specific virtualized table.

Grants user access to a specific virtualized table.

Grants 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.

WithContext method only

The GrantUserToVirtualTable options.

The grantUserToVirtualTable options.

parameters

  • The name of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • The schema of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • 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

    Examples:

parameters

  • The name of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • The schema of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • 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

    Examples:
  • 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'
    )

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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

The RevokeUserFromObject options.

The revokeUserFromObject options.

parameters

  • The Watson Query user name. If this value is Public, this API revokes access privilege from all Watson Query users.

    Examples:
  • The virtualized table's name.

    Examples:
  • The virtualized table's schema name.

    Examples:

parameters

  • The Watson Query user name. If this value is Public, this API revokes access privilege from all Watson Query users.

    Examples:
  • The virtualized table's name.

    Examples:
  • The virtualized table's schema name.

    Examples:
  • 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'
    )

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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.

WithContext method only

The GrantRolesToVirtualizedTable options.

The grantRolesToVirtualizedTable options.

parameters

  • The name of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • The schema of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • 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

    Examples:

parameters

  • The name of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • The schema of the virtualized table.

    Possible values: length ≥ 1

    Examples:
  • 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

    Examples:
  • 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_name\":\"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'
    )

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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

The DvaasRevokeRoleFromTable options.

The dvaasRevokeRoleFromTable options.

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.

    Examples:
  • The virtualized table's name.

    Examples:
  • The virtualized table's schema name.

    Examples:

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.

    Examples:
  • The virtualized table's name.

    Examples:
  • The virtualized table's schema name.

    Examples:
  • 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'
    )

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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

The ListTablesForRole options.

The listTablesForRole options.

parameters

  • Watson Query has four roles: MANAGER, STEWARD, ENGINEER and USER. The value of rolename should be one of these.

    Examples:

parameters

  • Watson Query has four roles: MANAGER, STEWARD, ENGINEER and USER. The value of rolename should be one of these.

    Examples:
  • 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=DV_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

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

Example responses
  • {
      "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

The TurnOnPolicyV2 options.

The turnOnPolicyV2 options.

parameters

  • Sets the status of the policy enforcement.

    Examples:

parameters

  • Sets the status of the policy enforcement.

    Examples:
  • curl -k -X PUT -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))

Response

Status Code

  • Success

  • Unauthorized

  • Internal Server Error

Example responses
  • {
      "status": "enabled"
    }
  • {
      "status": "enabled"
    }

Get policy enforcement status

Gets the policy enforcement status. The function returns enabled or disabled depending on the status.

Gets the policy enforcement status. The function returns enabled or disabled depending on the status.

Gets the policy enforcement status. The function returns enabled or disabled depending on the status.

Gets the policy enforcement status. The function returns enabled or disabled depending on the status.

Gets the policy enforcement status. The function returns enabled or disabled depending on the status.

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

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any 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))

Response

Status Code

  • Success

  • Unauthorized

  • Internal Server Error

Example responses
  • {
      "status": "enabled"
    }
  • {
      "status": "enabled"
    }

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

WithContext method only

The DvaasVirtualizeTable options.

The dvaasVirtualizeTable options.

parameters

  • The name of the source table.

    Examples:
  • The name of the table to be virtualized.

    Examples:
  • The schema of the table to be virtualized.

    Examples:
  • The columns that are included in the source table.

    Examples:
  • Determines whether to replace columns in the virtualized table.

    Examples:

parameters

  • The name of the source table.

    Examples:
  • The name of the table to be virtualized.

    Examples:
  • The schema of the table to be virtualized.

    Examples:
  • The columns that are included in the source table.

    Examples:
  • Determines whether to replace columns in the virtualized table.

    Examples:
  • 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, Y, N\",\"replace\":false,\"source_name\":\"Tab1\",\"source_table_def\":[{\"column_name\":\"Column1\",\"column_type\":\"INTEGER\"}],\"sources\":\"DB210001:Hjq1\",\"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

Status Code

  • Created

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Delete virtualized table

Removes the virtual table. You must specify the schema and table name.

Removes the virtual table. You must specify the schema and table name.

Removes the virtual table. You must specify the schema and table name.

Removes the virtual table. You must specify the schema and table name.

Removes the virtual 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

The DeleteTable options.

The deleteTable options.

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'
    )

Response

Status Code

  • Success

  • Bad Request

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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.

WithContext method only

The VirtualizeCosV2 options.

The virtualizeCosV2 options.

parameters

  • The file path with bucket name.

    Examples:
  • The virtual table name.

  • The virtual table schema.

  • Whether to replace the existing table when creating the virtual table.

    Default: false

  • The options used to virtualize file.

    Examples:
  • Supplied by proxy. Do NOT add your own value.

parameters

  • The file path with bucket name.

    Examples:
  • The virtual table name.

  • The virtual table schema.

  • Whether to replace the existing table when creating the virtual table.

    Default: false

  • The options used to virtualize file.

    Examples:
  • Supplied 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))

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Delete virtualized data

Removes the specified table. You must specify the schema, name, and type. You must use the Data Management Console (DMC) endpoint URL.

Removes the specified table. You must specify the schema, name, and type. You must use the Data Management Console (DMC) endpoint URL.

Removes the specified table. You must specify the schema, name, and type. You must use the Data Management Console (DMC) endpoint URL.

Removes the specified table. You must specify the schema, name, and type. You must use the Data Management Console (DMC) endpoint URL.

Removes the specified table. You must specify the schema, name, and type. You must use the Data Management Console (DMC) endpoint URL.

POST /dbapi/v4/dv/delete_virtualize_task
(watsonQuery *WatsonQueryV1) DeleteMultiTable(deleteMultiTableOptions *DeleteMultiTableOptions) (result *DeleteMultiTableResponse, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DeleteMultiTableWithContext(ctx context.Context, deleteMultiTableOptions *DeleteMultiTableOptions) (result *DeleteMultiTableResponse, response *core.DetailedResponse, err error)
ServiceCall<DeleteMultiTableResponse> deleteMultiTable(DeleteMultiTableOptions deleteMultiTableOptions)
delete_multi_table(self,
        x_db_profile: str,
        delete_assets: List['DeleteMultiTableRequestDeleteAssetsItem'],
        **kwargs
    ) -> DetailedResponse
deleteMultiTable(params)

Request

Instantiate the DeleteMultiTableOptions struct and set the fields to provide parameter values for the DeleteMultiTable method.

Use the DeleteMultiTableOptions.Builder to create a DeleteMultiTableOptions object that contains the parameter values for the deleteMultiTable method.

Custom Headers

  • The dv instance.

    Example: crn%3Av1%3Astaging%3Apublic%3Adata-virtualization%3Aus-south%3Aa%2Fefab8d44eb3d4aa5b3e3ff020cf1d829%3A31852b74-8afa-4f90-a080-a5e899bf0a61%3A%3A

WithContext method only

The DeleteMultiTable options.

The deleteMultiTable options.

parameters

  • The dv instance.

    Examples:

parameters

  • The dv instance.

    Examples:
  • curl -k -X POST "https://{region}.data-virtualization.cloud.ibm.com/dbapi/v4/dv/delete_virtualize_task" -H "Authorization: Bearer $token" -H "x-db-profile: $url_encoded_crn" -H "Content-Type: application/json" -d "{\"delete_assets\": [{\"virtual_schema\": \"string\",\"virtual_name\": \"string\",\"type\": \"table\"}]}"
  • deleteMultiTableRequestDeleteAssetsItemModel := &watsonqueryv1.DeleteMultiTableRequestDeleteAssetsItem{
    }
    
    deleteMultiTableOptions := watsonQueryService.NewDeleteMultiTableOptions(
      "crn%3Av1%3Astaging%3Apublic%3Adata-virtualization%3Aus-south%3Aa%2Fefab8d44eb3d4aa5b3e3ff020cf1d829%3A31852b74-8afa-4f90-a080-a5e899bf0a61%3A%3A",
      []watsonqueryv1.DeleteMultiTableRequestDeleteAssetsItem{*deleteMultiTableRequestDeleteAssetsItemModel},
    )
    
    deleteMultiTableResponse, response, err := watsonQueryService.DeleteMultiTable(deleteMultiTableOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(deleteMultiTableResponse, "", "  ")
    fmt.Println(string(b))
  • DeleteMultiTableRequestDeleteAssetsItem deleteMultiTableRequestDeleteAssetsItemModel = new DeleteMultiTableRequestDeleteAssetsItem.Builder()
      .build();
    DeleteMultiTableOptions deleteMultiTableOptions = new DeleteMultiTableOptions.Builder()
      .xDbProfile("crn%3Av1%3Astaging%3Apublic%3Adata-virtualization%3Aus-south%3Aa%2Fefab8d44eb3d4aa5b3e3ff020cf1d829%3A31852b74-8afa-4f90-a080-a5e899bf0a61%3A%3A")
      .deleteAssets(new java.util.ArrayList<DeleteMultiTableRequestDeleteAssetsItem>(java.util.Arrays.asList(deleteMultiTableRequestDeleteAssetsItemModel)))
      .build();
    
    Response<DeleteMultiTableResponse> response = watsonQueryService.deleteMultiTable(deleteMultiTableOptions).execute();
    DeleteMultiTableResponse deleteMultiTableResponse = response.getResult();
    
    System.out.println(deleteMultiTableResponse);
  • // Request models needed by this operation.
    
    // DeleteMultiTableRequestDeleteAssetsItem
    const deleteMultiTableRequestDeleteAssetsItemModel = {
    };
    
    const params = {
      xDbProfile: 'crn%3Av1%3Astaging%3Apublic%3Adata-virtualization%3Aus-south%3Aa%2Fefab8d44eb3d4aa5b3e3ff020cf1d829%3A31852b74-8afa-4f90-a080-a5e899bf0a61%3A%3A',
      deleteAssets: [deleteMultiTableRequestDeleteAssetsItemModel],
    };
    
    let res;
    try {
      res = await watsonQueryService.deleteMultiTable(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • delete_multi_table_request_delete_assets_item_model = {
    }
    
    delete_multi_table_response = watson_query_service.delete_multi_table(
      x_db_profile='crn%3Av1%3Astaging%3Apublic%3Adata-virtualization%3Aus-south%3Aa%2Fefab8d44eb3d4aa5b3e3ff020cf1d829%3A31852b74-8afa-4f90-a080-a5e899bf0a61%3A%3A',
      delete_assets=[delete_multi_table_request_delete_assets_item_model]
    ).get_result()
    
    print(json.dumps(delete_multi_table_response, indent=2))

Response

Status Code

  • Success

  • Bad Request

  • Internal Server Error

Example responses
  • {
      "response": {
        "value": {
          "delete_assets_result": {
            "delete_sucess": [
              {
                "virtual_schema": "schema1",
                "virtual_name": "table1"
              }
            ],
            "delete_failed": [
              {
                "virtual_schema": "schema2",
                "virtual_name": "table2",
                "message": "SQLExecute: {42704} [IBM][CLI Driver][DB2/LINUXX8664] SQL0204N  \"schema2.table2\" is an undefined name.  SQLSTATE=42704\n"
              }
            ]
          }
        }
      }
    }
  • {
      "response": {
        "value": {
          "delete_assets_result": {
            "delete_sucess": [
              {
                "virtual_schema": "schema1",
                "virtual_name": "table1"
              }
            ],
            "delete_failed": [
              {
                "virtual_schema": "schema2",
                "virtual_name": "table2",
                "message": "SQLExecute: {42704} [IBM][CLI Driver][DB2/LINUXX8664] SQL0204N  \"schema2.table2\" is an undefined name.  SQLSTATE=42704\n"
              }
            ]
          }
        }
      }
    }

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

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any 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

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Add primary catalog

Inserts primary catalog ID into the DVSYS.INSTANCE_INFO table.

Inserts primary catalog ID into the DVSYS.INSTANCE_INFO table.

Inserts primary catalog ID into the DVSYS.INSTANCE_INFO table.

Inserts primary catalog ID into the DVSYS.INSTANCE_INFO table.

Inserts primary catalog ID into the DVSYS.INSTANCE_INFO table.

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

WithContext method only

The PostPrimaryCatalog options.

The postPrimaryCatalog options.

parameters

  • Examples:

parameters

  • Examples:
  • 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

Status Code

  • Created

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Delete primary catalog

Deletes primary catalog item in the DVSYS.INSTANCE_INFO table.

Deletes primary catalog item in the DVSYS.INSTANCE_INFO table.

Deletes primary catalog item in the DVSYS.INSTANCE_INFO table.

Deletes primary catalog item in the DVSYS.INSTANCE_INFO table.

Deletes 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

The DeletePrimaryCatalog options.

The deletePrimaryCatalog options.

parameters

  • The Watson Query user name. If the value is Public, this API revokes access privileges from all Watson Query users.

    Examples:

parameters

  • The Watson Query user name. If the value is Public, this API revokes access privileges from all Watson Query users.

    Examples:
  • 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'
    )

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

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.

WithContext method only

The PublishAssets options.

The publishAssets options.

parameters

  • Examples:
  • The type of the data source that you want to add.

    Examples:

parameters

  • Examples:
  • The type of the data source that you want to add.

    Examples:
  • 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

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Create a new cache

Create a new cache using the given SQL definition.

Create a new cache using the given SQL definition.

Create a new cache using the given SQL definition.

Create a new cache using the given SQL definition.

Create a new cache using the given SQL definition.

POST /dvapiserver/v2/caching/caches
(watsonQuery *WatsonQueryV1) CreateCache(createCacheOptions *CreateCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) CreateCacheWithContext(ctx context.Context, createCacheOptions *CreateCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
ServiceCall<Cache> createCache(CreateCacheOptions createCacheOptions)
create_cache(self,
        name: str,
        query: str,
        *,
        refresh_schedule: str = None,
        dry_run: bool = None,
        **kwargs
    ) -> DetailedResponse
createCache(params)

Request

Instantiate the CreateCacheOptions struct and set the fields to provide parameter values for the CreateCache method.

Use the CreateCacheOptions.Builder to create a CreateCacheOptions object that contains the parameter values for the createCache method.

Query Parameters

  • Indicates whether to verify that the cache can be created using the SQL that was was supplied. If dry_run is set to true, the cache is not created, it is just validated.

A JSON body with the cache's SQL definition and a name for the cache.

Examples:
{
  "name": "cache1",
  "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
  "refresh_schedule": "* * */5 * *"
}

WithContext method only

The CreateCache options.

The createCache options.

parameters

  • A unique user-defined name for the cache.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9-_ .]*$/

    Examples:
  • Cache definition provided by user and expressed in SQL.

    Possible values: 1 ≤ length ≤ 10000000, Value must match regular expression /.*/

    Examples:
  • An optional cron-style schedule to refresh the cache (Refer: https://www.unix.com/man-page/linux/5/crontab/).

    Possible values: 6 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\/ \\-*,]*$/

    Examples:
  • Indicates whether to verify that the cache can be created using the SQL that was was supplied. If dry_run is set to true, the cache is not created, it is just validated.

parameters

  • A unique user-defined name for the cache.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9-_ .]*$/

    Examples:
  • Cache definition provided by user and expressed in SQL.

    Possible values: 1 ≤ length ≤ 10000000, Value must match regular expression /.*/

    Examples:
  • An optional cron-style schedule to refresh the cache (Refer: https://www.unix.com/man-page/linux/5/crontab/).

    Possible values: 6 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\/ \\-*,]*$/

    Examples:
  • Indicates whether to verify that the cache can be created using the SQL that was was supplied. If dry_run is set to true, the cache is not created, it is just validated.

  • curl -k -X POST -H "cache-control: no-cache" -H "content-type: application/json" -H "Authorization: Bearer {token}" -d "{\"name\":\"cache1\",\"query\":\"SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6\",\"refresh_schedule\":\"* * */5 * *\"}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/caching/caches"
  • createCacheOptions := watsonQueryService.NewCreateCacheOptions(
      "cache1",
      "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
    )
    createCacheOptions.SetRefreshSchedule("* * */5 * *")
    
    cache, response, err := watsonQueryService.CreateCache(createCacheOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cache, "", "  ")
    fmt.Println(string(b))
  • CreateCacheOptions createCacheOptions = new CreateCacheOptions.Builder()
      .name("cache1")
      .query("SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6")
      .refreshSchedule("* * */5 * *")
      .build();
    
    Response<Cache> response = watsonQueryService.createCache(createCacheOptions).execute();
    Cache cache = response.getResult();
    
    System.out.println(cache);
  • const params = {
      name: 'cache1',
      query: 'SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6',
      refreshSchedule: '* * */5 * *',
    };
    
    let res;
    try {
      res = await watsonQueryService.createCache(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache = watson_query_service.create_cache(
      name='cache1',
      query='SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6',
      refresh_schedule='* * */5 * *'
    ).get_result()
    
    print(json.dumps(cache, indent=2))

Response

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

Status Code

  • Cache has been created and will start to populate.

  • Cache SQL validated

  • Client side error

  • Unauthorized operation

  • Server side error

Example responses
  • {
      "name": "cache1",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:20:21.497519Z",
      "state": "populating",
      "size": 0,
      "cardinality": 0,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "* * */5 * *",
      "refresh_schedule_description": "every minute every 5 days"
    }
  • {
      "name": "cache1",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:20:21.497519Z",
      "state": "populating",
      "size": 0,
      "cardinality": 0,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "* * */5 * *",
      "refresh_schedule_description": "every minute every 5 days"
    }
  • {
      "status_code": 400,
      "trace": "d50ea1bf-438a-42fb-84e2-f0b0fe95a6ac",
      "errors": [
        {
          "code": "",
          "message": "The request was invalid. Cache definition/query null is invalid",
          "more_info": ""
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d50ea1bf-438a-42fb-84e2-f0b0fe95a6ac",
      "errors": [
        {
          "code": "",
          "message": "The request was invalid. Cache definition/query null is invalid",
          "more_info": ""
        }
      ]
    }

Return details of a specific cache

Return the metadata of the specified cache ID.

Return the metadata of the specified cache ID.

Return the metadata of the specified cache ID.

Return the metadata of the specified cache ID.

Return the metadata of the specified cache ID.

GET /dvapiserver/v2/caching/caches/{id}
(watsonQuery *WatsonQueryV1) GetCache(getCacheOptions *GetCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GetCacheWithContext(ctx context.Context, getCacheOptions *GetCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
ServiceCall<Cache> getCache(GetCacheOptions getCacheOptions)
get_cache(self,
        id: str,
        **kwargs
    ) -> DetailedResponse
getCache(params)

Request

Instantiate the GetCacheOptions struct and set the fields to provide parameter values for the GetCache method.

Use the GetCacheOptions.Builder to create a GetCacheOptions object that contains the parameter values for the getCache method.

Path Parameters

  • The ID of the cache

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression ^DV\d+$

    Example: DV20220920162021591055

WithContext method only

The GetCache options.

The getCache options.

parameters

  • The ID of the cache.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

    Examples:

parameters

  • The ID of the cache.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

    Examples:
  • curl -k -X GET -H "cache-control: no-cache" -H "Authorization: Bearer {token}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/caching/caches/{id}"
  • getCacheOptions := watsonQueryService.NewGetCacheOptions(
      "DV20220920162021591055",
    )
    
    cache, response, err := watsonQueryService.GetCache(getCacheOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cache, "", "  ")
    fmt.Println(string(b))
  • GetCacheOptions getCacheOptions = new GetCacheOptions.Builder()
      .id("DV20220920162021591055")
      .build();
    
    Response<Cache> response = watsonQueryService.getCache(getCacheOptions).execute();
    Cache cache = response.getResult();
    
    System.out.println(cache);
  • const params = {
      id: 'DV20220920162021591055',
    };
    
    let res;
    try {
      res = await watsonQueryService.getCache(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache = watson_query_service.get_cache(
      id='DV20220920162021591055'
    ).get_result()
    
    print(json.dumps(cache, indent=2))

Response

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

Status Code

  • Successfully retrieved information about cache.

  • Client side error

  • Unauthorized operation

  • Object not found

  • Server side error

Example responses
  • {
      "name": "cache1",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:20:43.773141Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "enabled",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "* * */5 * *",
      "refresh_schedule_description": "every minute every 5 days"
    }
  • {
      "name": "cache1",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:20:43.773141Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "enabled",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "* * */5 * *",
      "refresh_schedule_description": "every minute every 5 days"
    }

Drop an existing cache

Drop and delete the cache with the specified ID.

Drop and delete the cache with the specified ID.

Drop and delete the cache with the specified ID.

Drop and delete the cache with the specified ID.

Drop and delete the cache with the specified ID.

DELETE /dvapiserver/v2/caching/caches/{id}
(watsonQuery *WatsonQueryV1) DeleteCache(deleteCacheOptions *DeleteCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DeleteCacheWithContext(ctx context.Context, deleteCacheOptions *DeleteCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
ServiceCall<Cache> deleteCache(DeleteCacheOptions deleteCacheOptions)
delete_cache(self,
        id: str,
        **kwargs
    ) -> DetailedResponse
deleteCache(params)

Request

Instantiate the DeleteCacheOptions struct and set the fields to provide parameter values for the DeleteCache method.

Use the DeleteCacheOptions.Builder to create a DeleteCacheOptions object that contains the parameter values for the deleteCache method.

Path Parameters

  • The ID of the cache to drop.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression ^DV\d+$

WithContext method only

The DeleteCache options.

The deleteCache options.

parameters

  • The ID of the cache to drop.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

parameters

  • The ID of the cache to drop.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

  • curl -k -X DELETE -H "cache-control: no-cache" -H "Authorization: Bearer {token}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/caching/caches/{id}"
  • deleteCacheOptions := watsonQueryService.NewDeleteCacheOptions(
      "testString",
    )
    
    cache, response, err := watsonQueryService.DeleteCache(deleteCacheOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cache, "", "  ")
    fmt.Println(string(b))
  • DeleteCacheOptions deleteCacheOptions = new DeleteCacheOptions.Builder()
      .id("testString")
      .build();
    
    Response<Cache> response = watsonQueryService.deleteCache(deleteCacheOptions).execute();
    Cache cache = response.getResult();
    
    System.out.println(cache);
  • const params = {
      id: 'testString',
    };
    
    let res;
    try {
      res = await watsonQueryService.deleteCache(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache = watson_query_service.delete_cache(
      id='testString'
    ).get_result()
    
    print(json.dumps(cache, indent=2))

Response

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

Status Code

  • This request will change the cache state to deleting. When the cache has been deleted, its state will turn to deleted.

  • Client side error

  • Unauthorized operation

  • Object not found

  • Operation cannot be performed

  • Server side error

Example responses
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "deleting",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 26443,
      "refresh_count": 1,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "deleting",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 26443,
      "refresh_count": 1,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }

Edit an existing cache

Edit the name of the cache with the specific ID, the refresh schedule of the cache, or both.

Edit the name of the cache with the specific ID, the refresh schedule of the cache, or both.

Edit the name of the cache with the specific ID, the refresh schedule of the cache, or both.

Edit the name of the cache with the specific ID, the refresh schedule of the cache, or both.

Edit the name of the cache with the specific ID, the refresh schedule of the cache, or both.

PATCH /dvapiserver/v2/caching/caches/{id}
(watsonQuery *WatsonQueryV1) UpdateCache(updateCacheOptions *UpdateCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) UpdateCacheWithContext(ctx context.Context, updateCacheOptions *UpdateCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
ServiceCall<Cache> updateCache(UpdateCacheOptions updateCacheOptions)
update_cache(self,
        id: str,
        *,
        refresh_schedule: str = None,
        name: str = None,
        **kwargs
    ) -> DetailedResponse
updateCache(params)

Request

Instantiate the UpdateCacheOptions struct and set the fields to provide parameter values for the UpdateCache method.

Use the UpdateCacheOptions.Builder to create a UpdateCacheOptions object that contains the parameter values for the updateCache method.

Path Parameters

  • The ID of the cache to edit.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression ^DV\d+$

A JSON body with the cache's new name, new refresh schedule, or both.

Examples:
{
  "refresh_schedule": "10 * * * *",
  "name": "cache2"
}

WithContext method only

The UpdateCache options.

The updateCache options.

parameters

  • The ID of the cache to edit.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

  • New refresh schedule in a cron-style format (Refer https://www.unix.com/man-page/linux/5/crontab/). An empty input schedule string will stop all scheduling jobs of the cache immediately. In all other cases, the new schedule will take effect after the older schedule, if any, is canceled.

    Possible values: 0 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\/ \\-*,]*$/

    Examples:
  • A new unique name for the cache. An empty name is invalid.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9-_ .]*$/

    Examples:

parameters

  • The ID of the cache to edit.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

  • New refresh schedule in a cron-style format (Refer https://www.unix.com/man-page/linux/5/crontab/). An empty input schedule string will stop all scheduling jobs of the cache immediately. In all other cases, the new schedule will take effect after the older schedule, if any, is canceled.

    Possible values: 0 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\/ \\-*,]*$/

    Examples:
  • A new unique name for the cache. An empty name is invalid.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9-_ .]*$/

    Examples:
  • curl -k -X PATCH -H "cache-control: no-cache" -H "content-type: application/json" -H "Authorization: Bearer {token}" -d "{\"name\":\"cache2\",\"refresh_schedule\":\"10 * * * *\"}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/caching/caches/{id}"
  • updateCacheOptions := watsonQueryService.NewUpdateCacheOptions(
      "testString",
    )
    updateCacheOptions.SetRefreshSchedule("10 * * * *")
    updateCacheOptions.SetName("cache2")
    
    cache, response, err := watsonQueryService.UpdateCache(updateCacheOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cache, "", "  ")
    fmt.Println(string(b))
  • UpdateCacheOptions updateCacheOptions = new UpdateCacheOptions.Builder()
      .id("testString")
      .refreshSchedule("10 * * * *")
      .name("cache2")
      .build();
    
    Response<Cache> response = watsonQueryService.updateCache(updateCacheOptions).execute();
    Cache cache = response.getResult();
    
    System.out.println(cache);
  • const params = {
      id: 'testString',
      refreshSchedule: '10 * * * *',
      name: 'cache2',
    };
    
    let res;
    try {
      res = await watsonQueryService.updateCache(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache = watson_query_service.update_cache(
      id='testString',
      refresh_schedule='10 * * * *',
      name='cache2'
    ).get_result()
    
    print(json.dumps(cache, indent=2))

Response

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

Status Code

  • Successfully edited cache

  • Client side error

  • Unauthorized operation

  • Object not found

  • Server side error

Example responses
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "enabled",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "enabled",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }

Enable an inactive cache

Enable an inactive cache with the specified ID.

Enable an inactive cache with the specified ID.

Enable an inactive cache with the specified ID.

Enable an inactive cache with the specified ID.

Enable an inactive cache with the specified ID.

POST /dvapiserver/v2/caching/caches/{id}/enable
(watsonQuery *WatsonQueryV1) EnableCache(enableCacheOptions *EnableCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) EnableCacheWithContext(ctx context.Context, enableCacheOptions *EnableCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
ServiceCall<Cache> enableCache(EnableCacheOptions enableCacheOptions)
enable_cache(self,
        id: str,
        **kwargs
    ) -> DetailedResponse
enableCache(params)

Request

Instantiate the EnableCacheOptions struct and set the fields to provide parameter values for the EnableCache method.

Use the EnableCacheOptions.Builder to create a EnableCacheOptions object that contains the parameter values for the enableCache method.

Path Parameters

  • The ID of the cache to be enabled.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression ^DV\d+$

WithContext method only

The EnableCache options.

The enableCache options.

parameters

  • The ID of the cache to be enabled.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

parameters

  • The ID of the cache to be enabled.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

  • curl -k -X POST -H "cache-control: no-cache" -H "Authorization: Bearer {token}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/caching/caches/{id}/enable"
  • enableCacheOptions := watsonQueryService.NewEnableCacheOptions(
      "testString",
    )
    
    cache, response, err := watsonQueryService.EnableCache(enableCacheOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cache, "", "  ")
    fmt.Println(string(b))
  • EnableCacheOptions enableCacheOptions = new EnableCacheOptions.Builder()
      .id("testString")
      .build();
    
    Response<Cache> response = watsonQueryService.enableCache(enableCacheOptions).execute();
    Cache cache = response.getResult();
    
    System.out.println(cache);
  • const params = {
      id: 'testString',
    };
    
    let res;
    try {
      res = await watsonQueryService.enableCache(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache = watson_query_service.enable_cache(
      id='testString'
    ).get_result()
    
    print(json.dumps(cache, indent=2))

Response

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

Status Code

  • This request will change the cache state to enabling. When the cache has been enabled, its state will turn to enabled.

  • Client side error

  • Unauthorized operation

  • Object not found

  • Operation cannot be performed

  • Server side error

Example responses
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "enabling",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "enabling",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }

Disable an active cache

Disable an active cache with the specified ID.

Disable an active cache with the specified ID.

Disable an active cache with the specified ID.

Disable an active cache with the specified ID.

Disable an active cache with the specified ID.

POST /dvapiserver/v2/caching/caches/{id}/disable
(watsonQuery *WatsonQueryV1) DisableCache(disableCacheOptions *DisableCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) DisableCacheWithContext(ctx context.Context, disableCacheOptions *DisableCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
ServiceCall<Cache> disableCache(DisableCacheOptions disableCacheOptions)
disable_cache(self,
        id: str,
        **kwargs
    ) -> DetailedResponse
disableCache(params)

Request

Instantiate the DisableCacheOptions struct and set the fields to provide parameter values for the DisableCache method.

Use the DisableCacheOptions.Builder to create a DisableCacheOptions object that contains the parameter values for the disableCache method.

Path Parameters

  • The ID of the cache to disable.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression ^DV\d+$

WithContext method only

The DisableCache options.

The disableCache options.

parameters

  • The ID of the cache to disable.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

parameters

  • The ID of the cache to disable.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

  • curl -k -X POST -H "cache-control: no-cache" -H "Authorization: Bearer {token}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/caching/caches/{id}/disable"
  • disableCacheOptions := watsonQueryService.NewDisableCacheOptions(
      "testString",
    )
    
    cache, response, err := watsonQueryService.DisableCache(disableCacheOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cache, "", "  ")
    fmt.Println(string(b))
  • DisableCacheOptions disableCacheOptions = new DisableCacheOptions.Builder()
      .id("testString")
      .build();
    
    Response<Cache> response = watsonQueryService.disableCache(disableCacheOptions).execute();
    Cache cache = response.getResult();
    
    System.out.println(cache);
  • const params = {
      id: 'testString',
    };
    
    let res;
    try {
      res = await watsonQueryService.disableCache(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache = watson_query_service.disable_cache(
      id='testString'
    ).get_result()
    
    print(json.dumps(cache, indent=2))

Response

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

Status Code

  • This request will change the cache state to disabling. When the cache has been disabled, its state will turn to disabled.

  • Client side error

  • Unauthorized operation

  • Object not found

  • Operation cannot be performed

  • Server side error

Example responses
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "disabling",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }
  • {
      "name": "cache2",
      "id": "DV20220920162021591055",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 6",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T16:20:21.497519Z",
      "last_modified_at": "2022-09-20T16:31:28.816238Z",
      "last_refreshed_at": "2022-09-20T16:20:34.592605Z",
      "state": "disabling",
      "size": 6,
      "cardinality": 5,
      "time_taken_for_refresh": 0,
      "refresh_count": 0,
      "hit_count": 0,
      "refresh_schedule": "10 * * * *",
      "refresh_schedule_description": "every hour at minute 10"
    }

Refresh an active cache

Refresh an active cache with the specified ID.

Refresh an active cache with the specified ID.

Refresh an active cache with the specified ID.

Refresh an active cache with the specified ID.

Refresh an active cache with the specified ID.

POST /dvapiserver/v2/caching/caches/{id}/refresh
(watsonQuery *WatsonQueryV1) RefreshCache(refreshCacheOptions *RefreshCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) RefreshCacheWithContext(ctx context.Context, refreshCacheOptions *RefreshCacheOptions) (result *Cache, response *core.DetailedResponse, err error)
ServiceCall<Cache> refreshCache(RefreshCacheOptions refreshCacheOptions)
refresh_cache(self,
        id: str,
        **kwargs
    ) -> DetailedResponse
refreshCache(params)

Request

Instantiate the RefreshCacheOptions struct and set the fields to provide parameter values for the RefreshCache method.

Use the RefreshCacheOptions.Builder to create a RefreshCacheOptions object that contains the parameter values for the refreshCache method.

Path Parameters

  • The ID of the cache to refresh.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression ^DV\d+$

WithContext method only

The RefreshCache options.

The refreshCache options.

parameters

  • The ID of the cache to refresh.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

parameters

  • The ID of the cache to refresh.

    Possible values: 20 ≤ length ≤ 25, Value must match regular expression /^DV\\d+$/

  • curl -k -X POST -H "cache-control: no-cache" -H "Authorization: Bearer {token}" "https://{region}.data-virtualization.cloud.ibm.com/dvapiserver/v2/caching/caches/{id}/refresh"
  • refreshCacheOptions := watsonQueryService.NewRefreshCacheOptions(
      "testString",
    )
    
    cache, response, err := watsonQueryService.RefreshCache(refreshCacheOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cache, "", "  ")
    fmt.Println(string(b))
  • RefreshCacheOptions refreshCacheOptions = new RefreshCacheOptions.Builder()
      .id("testString")
      .build();
    
    Response<Cache> response = watsonQueryService.refreshCache(refreshCacheOptions).execute();
    Cache cache = response.getResult();
    
    System.out.println(cache);
  • const params = {
      id: 'testString',
    };
    
    let res;
    try {
      res = await watsonQueryService.refreshCache(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache = watson_query_service.refresh_cache(
      id='testString'
    ).get_result()
    
    print(json.dumps(cache, indent=2))

Response

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

A cache and its metadata.

Status Code

  • To refresh a cache, its current state must be enabled. When the cache has been refreshed, its state will change to enabled.

  • Client side error

  • Unauthorized operation

  • Object not found

  • Operation cannot be performed

  • Server side error

Example responses
  • {
      "name": "cache3",
      "id": "DV20220920191349389436",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 7",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T19:13:49.28874Z",
      "last_modified_at": "2022-09-21T00:07:40.689536Z",
      "last_refreshed_at": "2022-09-21T00:07:18.403959Z",
      "last_used_at": "2022-09-21T00:02:24.962Z",
      "state": "refreshing",
      "size": 6,
      "cardinality": 6,
      "time_taken_for_refresh": 17553,
      "refresh_count": 22,
      "hit_count": 6,
      "refresh_schedule": "* * */5 * *",
      "refresh_schedule_description": "every minute every 5 days"
    }
  • {
      "name": "cache3",
      "id": "DV20220920191349389436",
      "query": "SELECT * FROM ADMIN.CUSTOMER WHERE C_CUSTOMER_SK < 7",
      "owner_id": "ADMIN",
      "created_at": "2022-09-20T19:13:49.28874Z",
      "last_modified_at": "2022-09-21T00:07:40.689536Z",
      "last_refreshed_at": "2022-09-21T00:07:18.403959Z",
      "last_used_at": "2022-09-21T00:02:24.962Z",
      "state": "refreshing",
      "size": 6,
      "cardinality": 6,
      "time_taken_for_refresh": 17553,
      "refresh_count": 22,
      "hit_count": 6,
      "refresh_schedule": "* * */5 * *",
      "refresh_schedule_description": "every minute every 5 days"
    }

List caches

Lists all active, inactive, and deleted caches in Watson Query.

Lists all active, inactive, and deleted caches in Watson Query.

Lists all active, inactive, and deleted caches in Watson Query.

Lists all active, inactive, and deleted caches in Watson Query.

Lists all active, inactive, and deleted caches in Watson Query.

GET /dvapiserver/v1/caching/caches
(watsonQuery *WatsonQueryV1) GetCachesList(getCachesListOptions *GetCachesListOptions) (result *CacheListResponse, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GetCachesListWithContext(ctx context.Context, getCachesListOptions *GetCachesListOptions) (result *CacheListResponse, response *core.DetailedResponse, err error)
ServiceCall<CacheListResponse> getCachesList()
get_caches_list(self,
        **kwargs
    ) -> DetailedResponse
getCachesList(params)

Request

No Request Parameters

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any 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/v1/caching/caches"
  • getCachesListOptions := watsonQueryService.NewGetCachesListOptions()
    
    cacheListResponse, response, err := watsonQueryService.GetCachesList(getCachesListOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cacheListResponse, "", "  ")
    fmt.Println(string(b))
  • GetCachesListOptions getCachesListOptions = new GetCachesListOptions();
    
    Response<CacheListResponse> response = watsonQueryService.getCachesList(getCachesListOptions).execute();
    CacheListResponse cacheListResponse = response.getResult();
    
    System.out.println(cacheListResponse);
  • let res;
    try {
      res = await watsonQueryService.getCachesList({});
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache_list_response = watson_query_service.get_caches_list().get_result()
    
    print(json.dumps(cache_list_response, indent=2))

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

List a cache

Lists a specific cache in Watson Query.

Lists a specific cache in Watson Query.

Lists a specific cache in Watson Query.

Lists a specific cache in Watson Query.

Lists a specific cache in Watson Query.

GET /dvapiserver/v1/caching/caches/{id}
(watsonQuery *WatsonQueryV1) GetCacheV1(getCacheV1Options *GetCacheV1Options) (result *CacheResponse, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GetCacheV1WithContext(ctx context.Context, getCacheV1Options *GetCacheV1Options) (result *CacheResponse, response *core.DetailedResponse, err error)
ServiceCall<CacheResponse> getCacheV1(GetCacheV1Options getCacheV1Options)
get_cache_v1(self,
        id: str,
        **kwargs
    ) -> DetailedResponse
getCacheV1(params)

Request

Instantiate the GetCacheV1Options struct and set the fields to provide parameter values for the GetCacheV1 method.

Use the GetCacheV1Options.Builder to create a GetCacheV1Options object that contains the parameter values for the getCacheV1 method.

Path Parameters

  • The ID of the cache to be listed.

    Example: DV20210810191252390327

WithContext method only

The GetCacheV1 options.

The getCacheV1 options.

parameters

  • The ID of the cache to be listed.

    Examples:

parameters

  • The ID of the cache to be listed.

    Examples:
  • 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/v1/caching/caches/DV20210810191252390327"
  • getCacheV1Options := watsonQueryService.NewGetCacheV1Options(
      "DV20210810191252390327",
    )
    
    cacheResponse, response, err := watsonQueryService.GetCacheV1(getCacheV1Options)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(cacheResponse, "", "  ")
    fmt.Println(string(b))
  • GetCacheV1Options getCacheV1Options = new GetCacheV1Options.Builder()
      .id("DV20210810191252390327")
      .build();
    
    Response<CacheResponse> response = watsonQueryService.getCacheV1(getCacheV1Options).execute();
    CacheResponse cacheResponse = response.getResult();
    
    System.out.println(cacheResponse);
  • const params = {
      id: 'DV20210810191252390327',
    };
    
    let res;
    try {
      res = await watsonQueryService.getCacheV1(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • cache_response = watson_query_service.get_cache_v1(
      id='DV20210810191252390327'
    ).get_result()
    
    print(json.dumps(cache_response, indent=2))

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Fetch the cache storage

Fetches the total cache storage and indicates used capacities for active and inactive caches in Watson Query.

Fetches the total cache storage and indicates used capacities for active and inactive caches in Watson Query.

Fetches the total cache storage and indicates used capacities for active and inactive caches in Watson Query.

Fetches the total cache storage and indicates used capacities for active and inactive caches in Watson Query.

Fetches the total cache storage and indicates used capacities for active and inactive caches in Watson Query.

GET /dvapiserver/v1/caching/storage
(watsonQuery *WatsonQueryV1) GetCacheStorageDetail(getCacheStorageDetailOptions *GetCacheStorageDetailOptions) (result *StorageDetails, response *core.DetailedResponse, err error)
(watsonQuery *WatsonQueryV1) GetCacheStorageDetailWithContext(ctx context.Context, getCacheStorageDetailOptions *GetCacheStorageDetailOptions) (result *StorageDetails, response *core.DetailedResponse, err error)
ServiceCall<StorageDetails> getCacheStorageDetail()
get_cache_storage_detail(self,
        **kwargs
    ) -> DetailedResponse
getCacheStorageDetail(params)

Request

No Request Parameters

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any 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/v1/caching/storage"
  • getCacheStorageDetailOptions := watsonQueryService.NewGetCacheStorageDetailOptions()
    
    storageDetails, response, err := watsonQueryService.GetCacheStorageDetail(getCacheStorageDetailOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(storageDetails, "", "  ")
    fmt.Println(string(b))
  • GetCacheStorageDetailOptions getCacheStorageDetailOptions = new GetCacheStorageDetailOptions();
    
    Response<StorageDetails> response = watsonQueryService.getCacheStorageDetail(getCacheStorageDetailOptions).execute();
    StorageDetails storageDetails = response.getResult();
    
    System.out.println(storageDetails);
  • let res;
    try {
      res = await watsonQueryService.getCacheStorageDetail({});
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • storage_details = watson_query_service.get_cache_storage_detail().get_result()
    
    print(json.dumps(storage_details, indent=2))

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

id=curlclassName=tab-item-selected