IBM Cloud API Docs

Introduction

Use the Db2 Warehouse on Cloud v5 API to access data, view and create database objects, administer, and monitor your Db2 Warehouse on Cloud service.

Root URL

The context root for the Db2 Warehouse on Cloud API is /dbapi/v5/.

Error handling

This API uses the following standard HTTP response codes to indicate whether a method completed successfully:

  • 200: The request was successful.
  • 400: An error occurred.

Security

Every request must include the Authorization HTTP header with the value Bearer [access_token]. You can get an access token in one of the following ways:

The token is used by Db2 Warehouse on Cloud to identify who you are.

Every request must include an X-Deployment-Id HTTP header with the value of your Db2 Warehouse on Cloud tenant deployment ID. The ID starts with crn.

Db2 Warehouse on Cloud negotiates SSL connections by using the TLS v1.2 protocol.

With current versions of cURL, protocol negotiation happens automatically by using TLS v1.2. If you are using an older version of cURL, include the --tlsv1.2 option in your cURL commands to force the request to use the TLS 1.2 protocol.

Methods

Request a new access token

Authenticates the user credentials and returns an access token that can be used when invoking the operations.

POST /auth/tokens

Request

User credentials

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth/tokens"
    
    	payload := strings.NewReader("{\"userid\":\"<ADD STRING VALUE>\",\"password\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"userid\":\"<ADD STRING VALUE>\",\"password\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth/tokens")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth/tokens",
      "headers": {
        "content-type": "application/json",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({userid: '<ADD STRING VALUE>', password: '<ADD STRING VALUE>'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"userid\":\"<ADD STRING VALUE>\",\"password\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/auth/tokens", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/auth/tokens   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"userid":"<ADD STRING VALUE>","password":"<ADD STRING VALUE>"}'

Response

Token generated after successful authentication.

Status Code

  • Authentication token

  • Invalid credentials

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns public key of Json Web Token

Returns public key of Json Web Token.

GET /auth/token/publickey

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth/token/publickey"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth/token/publickey")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth/token/publickey",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/auth/token/publickey", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/auth/token/publickey   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Public key of token.

Status Code

  • Token public key and key id.

No Sample Response

This method does not specify any sample responses.

Perform logout operation for a token

Perform logout operation for a token.

DELETE /auth/token/logout

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth/token/logout"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth/token/logout")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth/token/logout",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/auth/token/logout", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/auth/token/logout   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Logout successfully.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists all authentication policies **ADMIN ONLY**

Returns a list of authentication policies.

GET /auth_policies

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth_policies"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth_policies")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth_policies",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/auth_policies", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/auth_policies   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Policy defining user's password rules.

Status Code

  • List of authentication policies

  • Only administrators can execute this operation

  • Error payload

No Sample Response

This method does not specify any sample responses.

Creates a new authentication policy **ADMIN ONLY**

Creates a new authentication policy which can be used to control password parameters.

POST /auth_policies

Request

Authentication policy

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth_policies"
    
    	payload := strings.NewReader("{\"id\":\"this_id_is_ignored\",\"name\":\"test_policy\",\"password_history\":5,\"password_expiration\":30,\"failed_login_attempts\":6,\"lockout_duration\":30,\"min_password_length\":15}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"id\":\"this_id_is_ignored\",\"name\":\"test_policy\",\"password_history\":5,\"password_expiration\":30,\"failed_login_attempts\":6,\"lockout_duration\":30,\"min_password_length\":15}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth_policies")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth_policies",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      id: 'this_id_is_ignored',
      name: 'test_policy',
      password_history: 5,
      password_expiration: 30,
      failed_login_attempts: 6,
      lockout_duration: 30,
      min_password_length: 15
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"id\":\"this_id_is_ignored\",\"name\":\"test_policy\",\"password_history\":5,\"password_expiration\":30,\"failed_login_attempts\":6,\"lockout_duration\":30,\"min_password_length\":15}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/auth_policies", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/auth_policies   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"id":"this_id_is_ignored","name":"test_policy","password_history":5,"password_expiration":30,"failed_login_attempts":6,"lockout_duration":30,"min_password_length":15}'

Response

Collection of authentication policies

Status Code

  • Authentication policy created

  • Only administrators can execute this operation

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns an authentication policy **ADMIN ONLY**

Returns an authentication policy.

GET /auth_policies/{id}

Request

Path Parameters

  • policy ID

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth_policies/Default"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth_policies/Default")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth_policies/Default",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/auth_policies/Default", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/auth_policies/Default   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Policy defining user's password rules.

Status Code

  • Authentication policy

  • Only administrators can execute this operation

  • Policy not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Updates an authentication policy **ADMIN ONLY**

Updates an authentication policy.

PUT /auth_policies/{id}

Request

Path Parameters

  • policy ID

Authentication policy

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth_policies/{id}"
    
    	payload := strings.NewReader("{\"id\":\"this_id_is_ignored\",\"name\":\"test_policy\",\"password_history\":5,\"password_expiration\":30,\"failed_login_attempts\":6,\"lockout_duration\":30,\"min_password_length\":15}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"id\":\"this_id_is_ignored\",\"name\":\"test_policy\",\"password_history\":5,\"password_expiration\":30,\"failed_login_attempts\":6,\"lockout_duration\":30,\"min_password_length\":15}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth_policies/{id}")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth_policies/{id}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      id: 'this_id_is_ignored',
      name: 'test_policy',
      password_history: 5,
      password_expiration: 30,
      failed_login_attempts: 6,
      lockout_duration: 30,
      min_password_length: 15
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"id\":\"this_id_is_ignored\",\"name\":\"test_policy\",\"password_history\":5,\"password_expiration\":30,\"failed_login_attempts\":6,\"lockout_duration\":30,\"min_password_length\":15}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/auth_policies/{id}", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/auth_policies/{id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"id":"this_id_is_ignored","name":"test_policy","password_history":5,"password_expiration":30,"failed_login_attempts":6,"lockout_duration":30,"min_password_length":15}'

Response

Policy defining user's password rules.

Status Code

  • Authentication policy

  • Only administrators can execute this operation

  • Policy not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Deletes an existing policy **ADMIN ONLY**

Deletes an existing policy.

Only administratos can delete policies.

DELETE /auth_policies/{id}

Request

Path Parameters

  • ID of the policy to be deleted.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth_policies/{id}"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth_policies/{id}")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth_policies/{id}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/auth_policies/{id}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/auth_policies/{id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Policy deleted

  • Removal of this policy is not allowed

  • The policy does not exist

  • Error payload

No Sample Response

This method does not specify any sample responses.

Sets a new password using dswebToken

Sets a new password using the dswebToken obtained from /auth/reset.

PUT /auth/password

Request

New password and dswebToken

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth/password"
    
    	payload := strings.NewReader("{\"password\":\"<ADD STRING VALUE>\",\"dswebToken\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"password\":\"<ADD STRING VALUE>\",\"dswebToken\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth/password")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth/password",
      "headers": {
        "content-type": "application/json",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({password: '<ADD STRING VALUE>', dswebToken: '<ADD STRING VALUE>'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"password\":\"<ADD STRING VALUE>\",\"dswebToken\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/auth/password", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/auth/password   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"password":"<ADD STRING VALUE>","dswebToken":"<ADD STRING VALUE>"}'

Response

Status Code

  • Password changed

  • Invalid or missing new password

  • If dswebToken is missing or invalid

  • Error payload

No Sample Response

This method does not specify any sample responses.

Requests a password reset based on user's email

An email is sent with the password reset link and code. To set a new password, the user can open the link on a web browser, or use the /auth/password endpoint providing the dswebToken. The dswebToken is valid for 12 hours.

POST /auth/reset

Request

User's email address and ID

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/auth/reset"
    
    	payload := strings.NewReader("{\"email\":\"<ADD STRING VALUE>\",\"userId\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"email\":\"<ADD STRING VALUE>\",\"userId\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/auth/reset")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/auth/reset",
      "headers": {
        "content-type": "application/json",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({email: '<ADD STRING VALUE>', userId: '<ADD STRING VALUE>'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"email\":\"<ADD STRING VALUE>\",\"userId\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/auth/reset", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/auth/reset   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"email":"<ADD STRING VALUE>","userId":"<ADD STRING VALUE>"}'

Response

Status Code

  • Request accepted

  • Invalid or missing email address and userId

  • The user name and email address do not match.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists all schemas in the database

Returns a list of schemas.

GET /schemas

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/schemas"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/schemas")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/schemas",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/schemas", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/schemas   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of schemas

Status Code

  • List of schemas

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns schema information

Returns schema information.

GET /schemas/{schema_name}

Request

Path Parameters

  • Schema name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/schemas/SYSIBM",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/schemas/SYSIBM", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Schema information

  • Schema not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists tables in a schema

Returns the list of tables in a schema.

GET /schemas/{schema_name}/tables

Request

Path Parameters

  • Schema name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM/tables"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM/tables")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/schemas/SYSIBM/tables",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/schemas/SYSIBM/tables", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM/tables   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of tables

Status Code

  • List of tables

  • Database or schema not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns information about a table

Return information about a table.

GET /schemas/{schema_name}/tables/{table_name}

Request

Path Parameters

  • Schema name

  • Table name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM/tables/SYSROLES"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM/tables/SYSROLES")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/schemas/SYSIBM/tables/SYSROLES",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/schemas/SYSIBM/tables/SYSROLES", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/schemas/SYSIBM/tables/SYSROLES   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Includes table definition and statistics. Note that statistics such as row count and size are not updated real time. Check the stats_timestamp value to know how current that information is.

Status Code

  • Table information

  • Table not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Deletes all table data

Deletes all table data using a TRUNCATE operation.

DELETE /schemas/{schema_name}/tables/{table_name}/data

Request

Path Parameters

  • Schema name

  • Table name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/schemas/NOT_EXIST_SCHEMA/tables/NOT_EXIST_TABLE/data"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/schemas/NOT_EXIST_SCHEMA/tables/NOT_EXIST_TABLE/data")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/schemas/NOT_EXIST_SCHEMA/tables/NOT_EXIST_TABLE/data",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/schemas/NOT_EXIST_SCHEMA/tables/NOT_EXIST_TABLE/data", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/schemas/NOT_EXIST_SCHEMA/tables/NOT_EXIST_TABLE/data   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Success

  • Not authorized to access table data

  • Table not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query the list of object schemas

Query the list of object schemas.

GET /admin/schemas/obj_type/{obj_type}

Request

Path Parameters

  • Object type.

    Allowable values: [table,hadooptable,view,index,mqt,alias,sequence,procedure,nickname,udt,function,datalake_table]

Query Parameters

  • Object type.

  • Whether to show system objects.

    Allowable values: [true,false]

  • The amount of return records.

    Default: 500

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/obj_type/table?search_name=SYSIBM&show_systems=true&rows_return=50"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/obj_type/table?search_name=SYSIBM&show_systems=true&rows_return=50")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/obj_type/table?search_name=SYSIBM&show_systems=true&rows_return=50",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/obj_type/table?search_name=SYSIBM&show_systems=true&rows_return=50", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/schemas/obj_type/table?search_name=SYSIBM&show_systems=true&rows_return=50'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Query the list of object schemas.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create schema

Creates a new schema. Any user with enough database authority can create schemas using dbapi directly. Regular users can create new schemas indirectly by creating a new table or other database object and specifying the name of the new schema where the object will be placed.

POST /admin/schemas

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas"
    
    	payload := strings.NewReader("{\"name\":\"TESTSCHEMA\",\"authorization\":\"SYSIBM\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"name\":\"TESTSCHEMA\",\"authorization\":\"SYSIBM\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({name: 'TESTSCHEMA', authorization: 'SYSIBM'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"name\":\"TESTSCHEMA\",\"authorization\":\"SYSIBM\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/schemas", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/schemas   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"name":"TESTSCHEMA","authorization":"SYSIBM"}'

Response

Status Code

  • Schema created.

  • Invalid parameters or schema already exists

  • Only administrators can create schemas directly.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drops multiple schemas

Drops multiple schema. An error is returned if the schema contains any objects.

PUT /admin/schemas/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/delete"
    
    	payload := strings.NewReader("[{\"name\":\"TESTSCHEMA\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"name\":\"TESTSCHEMA\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{name: 'TESTSCHEMA'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"name\":\"TESTSCHEMA\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/schemas/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/schemas/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"name":"TESTSCHEMA"}]'

Response

Status Code

  • The schema was dropped successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get single object privilege

Get single object privilege.

GET /admin/privileges

Request

Query Parameters

  • Object type.

    Allowable values: [TABLE,VIEW,DATABASE,PROCEDURE,FUNCTION,MQT,SEQUENCE,HADOOP_TABLE,NICKNAME,SCHEMA,UDT]

  • Schema name of the object. For table and database, this parameter is not required.

  • Name of the object. For database, this parameter is not required.

  • The amount of return records.

    Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges?obj_type=VIEW&schema=SYSCAT&obj_name=VIEWS&rows_return=10"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges?obj_type=VIEW&schema=SYSCAT&obj_name=VIEWS&rows_return=10")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges?obj_type=VIEW&schema=SYSCAT&obj_name=VIEWS&rows_return=10",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/privileges?obj_type=VIEW&schema=SYSCAT&obj_name=VIEWS&rows_return=10", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/privileges?obj_type=VIEW&schema=SYSCAT&obj_name=VIEWS&rows_return=10'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get object privilege.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Grant or revoke privileges

Grant or revoke privileges

PUT /admin/privileges

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges"
    
    	payload := strings.NewReader("{\"stop_on_error\":true,\"privileges\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"stop_on_error\":true,\"privileges\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      stop_on_error: true,
      privileges: [
        {
          schema: 'SYSCAT',
          obj_name: 'TABLES',
          obj_type: 'VIEW',
          grantee: {authid: 'PUBLIC', authid_type: 'GROUP'},
          grant: ['select'],
          revoke: ['insert']
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"stop_on_error\":true,\"privileges\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/privileges", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/privileges   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"stop_on_error":true,"privileges":[{"schema":"SYSCAT","obj_name":"TABLES","obj_type":"VIEW","grantee":{"authid":"PUBLIC","authid_type":"GROUP"},"grant":["select"],"revoke":["insert"]}]}'

Response

Status Code

  • The status of grant or revoke

  • Get error when grant or revoke

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Privilege list of selected objects

Privilege list of selected objects.

POST /admin/privileges

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges"
    
    	payload := strings.NewReader("{\"obj_type\":\"VIEW\",\"rows_return\":10,\"filter\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\"}]}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"obj_type\":\"VIEW\",\"rows_return\":10,\"filter\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\"}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      obj_type: 'VIEW',
      rows_return: 10,
      filter: [{schema: 'SYSCAT', obj_name: 'TABLES'}]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"obj_type\":\"VIEW\",\"rows_return\":10,\"filter\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\"}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/privileges", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/privileges   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"obj_type":"VIEW","rows_return":10,"filter":[{"schema":"SYSCAT","obj_name":"TABLES"}]}'

Response

Status Code

  • Privilege list of selected objects

  • Get error when search authid

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate schema DDL

Generate schema DDL.

POST /admin/schemas/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [more]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/ddl?action=more"
    
    	payload := strings.NewReader("{\"objects\":[{\"schema\":\"SCHEMA_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"objects\":[{\"schema\":\"SCHEMA_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/ddl?action=more")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/ddl?action=more",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({objects: [{schema: 'SCHEMA_NAME'}], options: [{}], stat_terminator: ';'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"objects\":[{\"schema\":\"SCHEMA_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/schemas/ddl?action=more", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/schemas/ddl?action=more'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"objects":[{"schema":"SCHEMA_NAME"}],"options":[{}],"stat_terminator":";"}'

Response

Status Code

  • Generate schema DDL.

  • Invalid parameters.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create a new table

Create a new table.

PUT /admin/tables

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables"
    
    	payload := strings.NewReader("{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\",\"objStorage\":\"Y\",\"column_info\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}]}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\",\"objStorage\":\"Y\",\"column_info\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      schema: 'TABLE_SCHEMA',
      table: 'TABLE_NAME',
      objStorage: 'Y',
      column_info: [
        {
          data_type: 'DECIMAL',
          length: 5,
          scale: {},
          column_name: 'COL_NAME',
          nullable: true
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\",\"objStorage\":\"Y\",\"column_info\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/tables", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/tables   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"TABLE_SCHEMA","table":"TABLE_NAME","objStorage":"Y","column_info":[{"data_type":"DECIMAL","length":5,"scale":{},"column_name":"COL_NAME","nullable":true}]}'

Response

Status Code

  • The table was created successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple tables

Drop multiple tables.

PUT /admin/tables/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'TABLE_SCHEMA', table: 'TABLE_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/tables/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/tables/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"TABLE_SCHEMA","table":"TABLE_NAME"}]'

Response

Status Code

  • The alias was dropped successfully.

  • Invalid parameters.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get table definition

Get table definition.

GET /admin/schemas/{schema_name}/tables/{table_name}/definition

Request

Path Parameters

  • Schema name of the object.

  • Table name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/definition"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/definition")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/definition",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/definition", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/definition   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get table definition.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query table data

Fetches the table data up to a maximum of 100,000 rows. Currently it's not possible to retrieve data from tables that contain CLOB, BLOB or DBCLOB values.

GET /admin/schemas/{schema_name}/tables/{table_name}/data

Request

Path Parameters

  • Schema name of the object.

  • Table name.

Query Parameters

  • The amount of return records.

    Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/data?rows_return=1000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/data?rows_return=1000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/data?rows_return=1000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/data?rows_return=1000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/data?rows_return=1000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get column detail properties

Get column detail properties.

GET /admin/schemas/{schema_name}/tables/{table_name}/columns/{column_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Table name.

  • Column name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/columns/CREATE_TIME/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/columns/CREATE_TIME/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/columns/CREATE_TIME/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/columns/CREATE_TIME/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/columns/CREATE_TIME/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get column detail properties.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the metadata type

Get the metadata type.

GET /admin/tables/meta/datatype

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/meta/datatype"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/meta/datatype")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/meta/datatype",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tables/meta/datatype", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/tables/meta/datatype   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get the metadata type.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate table DDL

Generate table DDL.

POST /admin/tables/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create,alter,more]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/ddl?action=create"
    
    	payload := strings.NewReader("{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\",\"objStorage\":\"Y\",\"column_info\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}],\"objects\":[{\"schema\":\"TABLE_SCHEMA\",\"name\":\"TABLE_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\",\"objStorage\":\"Y\",\"column_info\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}],\"objects\":[{\"schema\":\"TABLE_SCHEMA\",\"name\":\"TABLE_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      schema: 'TABLE_SCHEMA',
      table: 'TABLE_NAME',
      objStorage: 'Y',
      column_info: [
        {
          data_type: 'DECIMAL',
          length: 5,
          scale: {},
          column_name: 'COL_NAME',
          nullable: true
        }
      ],
      objects: [{schema: 'TABLE_SCHEMA', name: 'TABLE_NAME'}],
      options: [{}],
      stat_terminator: ';'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"TABLE_SCHEMA\",\"table\":\"TABLE_NAME\",\"objStorage\":\"Y\",\"column_info\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}],\"objects\":[{\"schema\":\"TABLE_SCHEMA\",\"name\":\"TABLE_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/tables/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"TABLE_SCHEMA","table":"TABLE_NAME","objStorage":"Y","column_info":[{"data_type":"DECIMAL","length":5,"scale":{},"column_name":"COL_NAME","nullable":true}],"objects":[{"schema":"TABLE_SCHEMA","name":"TABLE_NAME"}],"options":[{}],"stat_terminator":";"}'

Response

Status Code

  • Generate table DDL.

  • Invalid parameters.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get distributin keys

Get distributin keys.

GET /admin/schemas/{schema_name}/tables/{table_name}/distribution_keys

Request

Path Parameters

  • Schema name of the table.

  • Name of the table.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distribution_keys"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distribution_keys")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distribution_keys",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distribution_keys", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distribution_keys   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get distributin keys.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get data distributin property

Get data distributin property.

GET /admin/schemas/{schema_name}/tables/{table_name}/distributions/properties

Request

Path Parameters

  • Schema name of the table.

  • Name of the table.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distributions/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distributions/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distributions/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distributions/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/distributions/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get data distributin property.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get partition expressions

Get partition expressions.

GET /admin/schemas/{schema_name}/tables/{table_name}/partitions/expressions

Request

Path Parameters

  • Schema name of the table.

  • Name of the table.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions/expressions"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions/expressions")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions/expressions",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions/expressions", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions/expressions   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get partition expressions.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get data partitions

Get data partitions.

GET /admin/schemas/{schema_name}/tables/{table_name}/partitions

Request

Path Parameters

  • Schema name of the table.

  • Name of the table.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/partitions   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get data partitions.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Move tables

Move tables to another tablespace.

POST /admin/tables/move_activity

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/move_activity"
    
    	payload := strings.NewReader("{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"table_space\":\"<ADD STRING VALUE>\"}]}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"table_space\":\"<ADD STRING VALUE>\"}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/move_activity")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/move_activity",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table_space: 'TABLE_SPACE',
      tables: [
        {
          schema_name: '<ADD STRING VALUE>',
          table_name: '<ADD STRING VALUE>',
          table_space: '<ADD STRING VALUE>'
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"table_space\":\"<ADD STRING VALUE>\"}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/move_activity", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/move_activity   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table_space":"TABLE_SPACE","tables":[{"schema_name":"<ADD STRING VALUE>","table_name":"<ADD STRING VALUE>","table_space":"<ADD STRING VALUE>"}]}'

Response

Status Code

  • Move table started successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Move tables script

Get script of move tables to another tablespace.

POST /admin/tables/move_activity/script

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/move_activity/script"
    
    	payload := strings.NewReader("{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"table_space\":\"<ADD STRING VALUE>\"}]}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"table_space\":\"<ADD STRING VALUE>\"}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/move_activity/script")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/move_activity/script",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table_space: 'TABLE_SPACE',
      tables: [
        {
          schema_name: '<ADD STRING VALUE>',
          table_name: '<ADD STRING VALUE>',
          table_space: '<ADD STRING VALUE>'
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"table_space\":\"<ADD STRING VALUE>\"}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/move_activity/script", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/move_activity/script   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table_space":"TABLE_SPACE","tables":[{"schema_name":"<ADD STRING VALUE>","table_name":"<ADD STRING VALUE>","table_space":"<ADD STRING VALUE>"}]}'

Response

Status Code

  • Get move table script successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Copy tables

Copy tables to another tablespace.

POST /admin/tables/copy_activity

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/copy_activity"
    
    	payload := strings.NewReader("{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"target_schema\":\"<ADD STRING VALUE>\",\"target_table\":\"<ADD STRING VALUE>\"}]}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"target_schema\":\"<ADD STRING VALUE>\",\"target_table\":\"<ADD STRING VALUE>\"}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/copy_activity")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/copy_activity",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table_space: 'TABLE_SPACE',
      tables: [
        {
          schema_name: '<ADD STRING VALUE>',
          table_name: '<ADD STRING VALUE>',
          target_schema: '<ADD STRING VALUE>',
          target_table: '<ADD STRING VALUE>'
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"target_schema\":\"<ADD STRING VALUE>\",\"target_table\":\"<ADD STRING VALUE>\"}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/copy_activity", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/copy_activity   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table_space":"TABLE_SPACE","tables":[{"schema_name":"<ADD STRING VALUE>","table_name":"<ADD STRING VALUE>","target_schema":"<ADD STRING VALUE>","target_table":"<ADD STRING VALUE>"}]}'

Response

Status Code

  • Copy table started successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Copy tables script

Get script of copy tables to another tablespace.

POST /admin/tables/copy_activity/script

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/copy_activity/script"
    
    	payload := strings.NewReader("{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"target_schema\":\"<ADD STRING VALUE>\",\"target_table\":\"<ADD STRING VALUE>\"}]}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"target_schema\":\"<ADD STRING VALUE>\",\"target_table\":\"<ADD STRING VALUE>\"}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/copy_activity/script")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/copy_activity/script",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table_space: 'TABLE_SPACE',
      tables: [
        {
          schema_name: '<ADD STRING VALUE>',
          table_name: '<ADD STRING VALUE>',
          target_schema: '<ADD STRING VALUE>',
          target_table: '<ADD STRING VALUE>'
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table_space\":\"TABLE_SPACE\",\"tables\":[{\"schema_name\":\"<ADD STRING VALUE>\",\"table_name\":\"<ADD STRING VALUE>\",\"target_schema\":\"<ADD STRING VALUE>\",\"target_table\":\"<ADD STRING VALUE>\"}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/copy_activity/script", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/copy_activity/script   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table_space":"TABLE_SPACE","tables":[{"schema_name":"<ADD STRING VALUE>","table_name":"<ADD STRING VALUE>","target_schema":"<ADD STRING VALUE>","target_table":"<ADD STRING VALUE>"}]}'

Response

Status Code

  • Get copy table script successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the latest status after last updated time

Get the latest status after last updated time.

POST /admin/tables/tasks/status

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/tasks/status"
    
    	payload := strings.NewReader("{\"last_updated_time\":1684828233690}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"last_updated_time\":1684828233690}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/tasks/status")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/tasks/status",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({last_updated_time: 1684828233690}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"last_updated_time\":1684828233690}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/tasks/status", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/tasks/status   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"last_updated_time":1684828233690}'

Response

Status Code

  • Get copy table script successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query view detail properties

Query view detail properties.

GET /admin/schemas/{schema_name}/views/{view_name}/properties

Request

Path Parameters

  • Schema name of the view.

  • Name of the view.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Query view detail properties.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple views

Drop multiple views.

PUT /admin/views/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/views/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"VIEW_SCHEMA\",\"view\":\"VIEW_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"VIEW_SCHEMA\",\"view\":\"VIEW_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/views/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/views/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'VIEW_SCHEMA', view: 'VIEW_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"VIEW_SCHEMA\",\"view\":\"VIEW_NAME\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/views/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/views/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"VIEW_SCHEMA","view":"VIEW_NAME"}]'

Response

Status Code

  • The alias was dropped successfully.

  • Run sql exception.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query view data

Query view data.

GET /admin/schemas/{schema_name}/views/{view_name}/data

Request

Path Parameters

  • Schema name of the object.

  • View name.

Query Parameters

  • The amount of return records.

    Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/data?rows_return=100"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/data?rows_return=100")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/data?rows_return=100",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/data?rows_return=100", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/data?rows_return=100'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get View definition

Get view definition.

GET /admin/schemas/{schema_name}/views/{view_name}/definition

Request

Path Parameters

  • Schema name of the object.

  • View name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/definition"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/definition")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/definition",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/definition", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/definition   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get View definition.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate view DDL

Generate view DDL.

POST /admin/views/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create,alter,more]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/views/ddl?action=create"
    
    	payload := strings.NewReader("{\"schema\":\"VIEW_SCHEMA\",\"view\":\"VIEW_NAME\",\"objects\":[{\"schema\":\"VIEW_SCHEMA\",\"name\":\"VIEW_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"VIEW_SCHEMA\",\"view\":\"VIEW_NAME\",\"objects\":[{\"schema\":\"VIEW_SCHEMA\",\"name\":\"VIEW_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/views/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/views/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      schema: 'VIEW_SCHEMA',
      view: 'VIEW_NAME',
      objects: [{schema: 'VIEW_SCHEMA', name: 'VIEW_NAME'}],
      options: [{}],
      stat_terminator: ';'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"VIEW_SCHEMA\",\"view\":\"VIEW_NAME\",\"objects\":[{\"schema\":\"VIEW_SCHEMA\",\"name\":\"VIEW_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/views/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/views/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"VIEW_SCHEMA","view":"VIEW_NAME","objects":[{"schema":"VIEW_SCHEMA","name":"VIEW_NAME"}],"options":[{}],"stat_terminator":";"}'

Response

Status Code

  • Generate view DDL.

  • Invalid parameters.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the dependencies of the object

Get the dependencies of the object.

GET /admin/schemas/{schema_name}/{obj_type}/{object_name}/dependencies

Request

Path Parameters

  • Schema name of the object.

  • Type of object.

    Allowable values: [tables,views,nicknames,sequences,aliases,mqts,procedures,functions,udts]

  • Name of the object.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/dependencies"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/dependencies")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/dependencies",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/dependencies", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSCAT/views/TABLES/dependencies   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get the dependencies of the object.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the dependencies of the tablespace

Get the dependencies of the tablespace.

GET /admin/tablespaces/{tablespace}/dependencies

Request

Path Parameters

  • Tablespace name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/dependencies"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/dependencies")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tablespaces/SYSCATSPACE/dependencies",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tablespaces/SYSCATSPACE/dependencies", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/dependencies   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get the dependencies of the object.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query bufferpool detail properties

Query bufferpool detail properties.

GET /admin/bufferpools/{bufferpool_name}/properties

Request

Path Parameters

  • Name of the object.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/bufferpools/{bufferpool_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/bufferpools/{bufferpool_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/bufferpools/{bufferpool_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/bufferpools/{bufferpool_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/bufferpools/{bufferpool_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query constraint detail properties

Query constraint detail properties.

GET /admin/schemas/{schema_name}/tables/{table_name}/constraints/{constraint_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Table name.

  • Name of the constraint.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/constraints/{constraint_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/constraints/{constraint_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/constraints/{constraint_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/constraints/{constraint_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/constraints/{constraint_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query index detail properties

Query index detail properties.

GET /admin/schemas/{schema_name}/tables/{table_name}/indexes/{index_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Table name.

  • Name of the index.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/indexes/{index_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/indexes/{index_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/indexes/{index_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/indexes/{index_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/tables/{table_name}/indexes/{index_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query trigger detail properties

Query trigger detail properties.

GET /admin/schemas/{schema_name}/triggers/{trigger_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Name of the trigger.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/triggers/{trigger_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/triggers/{trigger_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/triggers/{trigger_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/triggers/{trigger_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/triggers/{trigger_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query MQT detail properties

Query MQT detail properties.

GET /admin/schemas/{schema_name}/mqts/{mqt_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Name of the MQT.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query UDF detail properties

Query UDF detail properties.

GET /admin/schemas/{schema_name}/functions/{specific_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Name of the UDF.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/functions/{specific_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/functions/{specific_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/functions/{specific_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/functions/{specific_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/functions/{specific_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query tablespace detail properties

Query tablespace detail properties.

GET /admin/tablespaces/{table_space}/properties

Request

Path Parameters

  • Tablespace name of the object.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tablespaces/{table_space}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tablespaces/{table_space}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tablespaces/{table_space}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tablespaces/{table_space}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/tablespaces/{table_space}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query procedure detail properties

Query procedure detail properties.

GET /admin/schemas/{schema_name}/procedures/{specific_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Name of the procedure.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/procedures/{specific_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/procedures/{specific_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/procedures/{specific_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/procedures/{specific_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/procedures/{specific_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query sequence detail properties

Query sequence detail properties.

GET /admin/schemas/{schema_name}/sequences/{sequence_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Name of the sequence.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/sequences/{sequence_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/sequences/{sequence_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/sequences/{sequence_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/sequences/{sequence_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/sequences/{sequence_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query package detail properties

Query package detail properties.

GET /admin/schemas/{schema_name}/packages/{package_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Name of the package.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/packages/{package_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/packages/{package_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/packages/{package_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/packages/{package_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/packages/{package_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query UDT detail properties

Query UDT detail properties.

GET /admin/schemas/{schema_name}/udts/{type_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Name of the user-defined type.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/udts/{type_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/udts/{type_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/udts/{type_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/udts/{type_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/udts/{type_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query alias detail properties

Query alias detail properties.

GET /admin/schemas/{schema_name}/aliases/{alias_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Alias name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Query alias detail properties.

  • Not authorized.

  • Schema or alias not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get table detail properties

Get table detail properties.

GET /admin/schemas/{schema_name}/tables/{table_name}/properties

Request

Path Parameters

  • Schema name of the object.

  • Table name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSIBM/tables/SYSROLES/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get table detail properties.

  • Not authorized.

  • Object not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create alias

Create alias.

PUT /admin/aliases

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/aliases"
    
    	payload := strings.NewReader("{\"base_obj_schema\":\"SYSCAT\",\"base_obj_name\":\"TABLES\",\"alias_name\":\"ALIAS_NAME\",\"alias_schema\":\"ALIAS_SCHEMA\"}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"base_obj_schema\":\"SYSCAT\",\"base_obj_name\":\"TABLES\",\"alias_name\":\"ALIAS_NAME\",\"alias_schema\":\"ALIAS_SCHEMA\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/aliases")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/aliases",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      base_obj_schema: 'SYSCAT',
      base_obj_name: 'TABLES',
      alias_name: 'ALIAS_NAME',
      alias_schema: 'ALIAS_SCHEMA'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"base_obj_schema\":\"SYSCAT\",\"base_obj_name\":\"TABLES\",\"alias_name\":\"ALIAS_NAME\",\"alias_schema\":\"ALIAS_SCHEMA\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/aliases", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/aliases   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"base_obj_schema":"SYSCAT","base_obj_name":"TABLES","alias_name":"ALIAS_NAME","alias_schema":"ALIAS_SCHEMA"}'

Response

Status Code

  • The alias was created successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple aliases

Drop multiple alias.

PUT /admin/aliases/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/aliases/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"ALIAS_SCHEMA\",\"alias\":\"ALIAS_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"ALIAS_SCHEMA\",\"alias\":\"ALIAS_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/aliases/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/aliases/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'ALIAS_SCHEMA', alias: 'ALIAS_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"ALIAS_SCHEMA\",\"alias\":\"ALIAS_NAME\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/aliases/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/aliases/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"ALIAS_SCHEMA","alias":"ALIAS_NAME"}]'

Response

Status Code

  • The alias was dropped successfully.

  • Invalid parameters or run sql exception.

  • Not authorized.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Generate Alias DDL

Generate Alias DDL.

POST /admin/aliases/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create,more]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/aliases/ddl?action=create"
    
    	payload := strings.NewReader("{\"base_obj_schema\":\"SYSCAT\",\"base_obj_name\":\"TABLES\",\"alias_name\":\"ALIAS_NAME\",\"alias_schema\":\"ALIAS_SCHEMA\",\"objects\":[{\"schema\":\"ALIAS_SCHEMA\",\"name\":\"ALIAS_NAME\",\"base_schema\":\"TABLE_SCHEMA\",\"base_name\":\"TABLE_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"base_obj_schema\":\"SYSCAT\",\"base_obj_name\":\"TABLES\",\"alias_name\":\"ALIAS_NAME\",\"alias_schema\":\"ALIAS_SCHEMA\",\"objects\":[{\"schema\":\"ALIAS_SCHEMA\",\"name\":\"ALIAS_NAME\",\"base_schema\":\"TABLE_SCHEMA\",\"base_name\":\"TABLE_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/aliases/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/aliases/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      base_obj_schema: 'SYSCAT',
      base_obj_name: 'TABLES',
      alias_name: 'ALIAS_NAME',
      alias_schema: 'ALIAS_SCHEMA',
      objects: [
        {
          schema: 'ALIAS_SCHEMA',
          name: 'ALIAS_NAME',
          base_schema: 'TABLE_SCHEMA',
          base_name: 'TABLE_NAME'
        }
      ],
      options: [{}],
      stat_terminator: ';'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"base_obj_schema\":\"SYSCAT\",\"base_obj_name\":\"TABLES\",\"alias_name\":\"ALIAS_NAME\",\"alias_schema\":\"ALIAS_SCHEMA\",\"objects\":[{\"schema\":\"ALIAS_SCHEMA\",\"name\":\"ALIAS_NAME\",\"base_schema\":\"TABLE_SCHEMA\",\"base_name\":\"TABLE_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/aliases/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/aliases/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"base_obj_schema":"SYSCAT","base_obj_name":"TABLES","alias_name":"ALIAS_NAME","alias_schema":"ALIAS_SCHEMA","objects":[{"schema":"ALIAS_SCHEMA","name":"ALIAS_NAME","base_schema":"TABLE_SCHEMA","base_name":"TABLE_NAME"}],"options":[{}],"stat_terminator":";"}'

Response

Status Code

  • Generate Alias DDL.

  • Invalid parameters.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query alias data

Query alias data.

GET /admin/schemas/{schema_name}/aliases/{alias_name}/data

Request

Path Parameters

  • Schema name of the object.

  • Alias name.

Query Parameters

  • The amount of return records.

    Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/data?rows_return=10"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/data?rows_return=10")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/data?rows_return=10",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/data?rows_return=10", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/schemas/SYSPUBLIC/aliases/DUAL/data?rows_return=10'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Not authorized.

  • Schema or alias not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the SQL statement template for creating MQT table

Get the SQL statement template for creating MQT table.

POST /admin/mqts/ddl

Request

Query Parameters

  • Allowable values: [create,more]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/mqts/ddl?action=SOME_STRING_VALUE"
    
    	payload := strings.NewReader("{\"schema\":\"schemaName\",\"objects\":[{\"schema\":\"MQT_SCHEMA\",\"name\":\"MQT_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"schemaName\",\"objects\":[{\"schema\":\"MQT_SCHEMA\",\"name\":\"MQT_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/mqts/ddl?action=SOME_STRING_VALUE")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/mqts/ddl?action=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      schema: 'schemaName',
      objects: [{schema: 'MQT_SCHEMA', name: 'MQT_NAME'}],
      options: [{}],
      stat_terminator: ';'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"schemaName\",\"objects\":[{\"schema\":\"MQT_SCHEMA\",\"name\":\"MQT_NAME\"}],\"options\":[{}],\"stat_terminator\":\";\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/mqts/ddl?action=SOME_STRING_VALUE", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/mqts/ddl?action=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"schemaName","objects":[{"schema":"MQT_SCHEMA","name":"MQT_NAME"}],"options":[{}],"stat_terminator":";"}'

Response

Status Code

  • The SQL statement of creating MQT table

  • Get error when create MQT table

  • Error payload

No Sample Response

This method does not specify any sample responses.

Delete multiple mqt tables

Delete mutliple mqt tables.

PUT /admin/mqts/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/mqts/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"schemaName\",\"mqt\":\"mqtName\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"schemaName\",\"mqt\":\"mqtName\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/mqts/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/mqts/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'schemaName', mqt: 'mqtName'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"schemaName\",\"mqt\":\"mqtName\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/mqts/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/mqts/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"schemaName","mqt":"mqtName"}]'

Response

Status Code

  • The status of deleting MQT tables

  • Error payload

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the definition of MQT table

Get the definition of MQT table.

GET /admin/schemas/{schema_name}/mqts/{mqt_name}/definition

Request

Path Parameters

  • Schema name

  • mqt name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/definition"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/definition")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/definition",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/definition", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/definition   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Definition of MTQ table

  • Error information when get mqt definition

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the data of specified mqt table

Get the data of specified mqt table.

GET /admin/schemas/{schema_name}/mqts/{mqt_name}/data

Request

Path Parameters

Query Parameters

  • Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/data?rows_return=10"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/data?rows_return=10")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/data?rows_return=10",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/data?rows_return=10", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/schemas/DB2GSE/mqts/GSE_SRS_REPLICATED_AST/data?rows_return=10'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get the data of MQT table,include table columns information and data

  • Error information when get mqt data

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get authentications through the authid filter

Get authentications through the authid filter

GET /admin/privileges/authentications

Request

Query Parameters

  • 0 means return all query results

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/authentications?rows_return=10&authid=PUBLIC"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/authentications?rows_return=10&authid=PUBLIC")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/authentications?rows_return=10&authid=PUBLIC",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/privileges/authentications?rows_return=10&authid=PUBLIC", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/privileges/authentications?rows_return=10&authid=PUBLIC'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The list of authid and authid type

  • Get error when search authid

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the privieles of auth id

Get the privieles of auth id

GET /admin/privileges/{authid_type}/{authid}/{obj_type}

Request

Path Parameters

  • authid type

    Allowable values: [GROUP,USER,ROLE]

  • Authorization id.

  • Type of object

    Allowable values: [VIEW,TABLE,DATABASE,PROCEDURE,FUNCTION,MQT,SEQUENCE,HADOOP_TABLE,NICKNAME,INDEX,TABLESPACE]

Query Parameters

  • Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/GROUP/PUBLIC/VIEW?rows_return=10"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/GROUP/PUBLIC/VIEW?rows_return=10")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/GROUP/PUBLIC/VIEW?rows_return=10",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/privileges/GROUP/PUBLIC/VIEW?rows_return=10", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/privileges/GROUP/PUBLIC/VIEW?rows_return=10'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returned result was successful.

  • Get error when get privileges

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get SQL statement of grant or revoke privileges

Get SQL statement of grant or revoke privileges

POST /admin/privileges/dcl

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/dcl"
    
    	payload := strings.NewReader("[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/dcl")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/dcl",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([
      {
        schema: 'SYSCAT',
        obj_name: 'TABLES',
        obj_type: 'VIEW',
        grantee: {authid: 'PUBLIC', authid_type: 'GROUP'},
        grant: ['select'],
        revoke: ['insert']
      }
    ]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/privileges/dcl", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/privileges/dcl   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"SYSCAT","obj_name":"TABLES","obj_type":"VIEW","grantee":{"authid":"PUBLIC","authid_type":"GROUP"},"grant":["select"],"revoke":["insert"]}]'

Response

Status Code

  • SQL statement for grant or revoke privileges

  • Get error when get privileges

  • Error payload

No Sample Response

This method does not specify any sample responses.

Grant or revoke the privilges of role

Grant or revoke the privilges of role

PUT /admin/privileges/roles

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/roles"
    
    	payload := strings.NewReader("{\"stop_on_error\":false,\"privileges\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"stop_on_error\":false,\"privileges\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/roles")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/roles",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      stop_on_error: false,
      privileges: [
        {
          schema: 'SYSCAT',
          obj_name: 'TABLES',
          obj_type: 'VIEW',
          grantee: {authid: 'PUBLIC', authid_type: 'GROUP'},
          grant: ['select'],
          revoke: ['insert']
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"stop_on_error\":false,\"privileges\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"obj_type\":\"VIEW\",\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"select\"],\"revoke\":[\"insert\"]}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/privileges/roles", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/privileges/roles   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"stop_on_error":false,"privileges":[{"schema":"SYSCAT","obj_name":"TABLES","obj_type":"VIEW","grantee":{"authid":"PUBLIC","authid_type":"GROUP"},"grant":["select"],"revoke":["insert"]}]}'

Response

Status Code

  • The status of grant or revoke the role's privileges

  • Error payload

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Add new role

Add new role

POST /admin/privileges/roles

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/roles"
    
    	payload := strings.NewReader("{\"authid\":\"authid\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"authid\":\"authid\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/roles")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/roles",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({authid: 'authid'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"authid\":\"authid\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/privileges/roles", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/privileges/roles   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"authid":"authid"}'

Response

Status Code

  • The status of adding new role

  • Get error when add new roles

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Delete one role

Delete one role

DELETE /admin/privileges/roles/{role_name}

Request

Path Parameters

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/roleName"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/roleName")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/roles/roleName",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/admin/privileges/roles/roleName", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/roleName   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The status of deleting one role

  • Error payload

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the membership of authid

Get the membership of authid

GET /admin/privileges/roles/{authid_type}/{authid}

Request

Path Parameters

  • authid type

    Allowable values: [USER,GROUP,ROLE]

  • authid

Query Parameters

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/GROUP/PUBLIC?rows_return=10"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/GROUP/PUBLIC?rows_return=10")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/roles/GROUP/PUBLIC?rows_return=10",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/privileges/roles/GROUP/PUBLIC?rows_return=10", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/GROUP/PUBLIC?rows_return=10'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The membership of one auth

  • Error payload

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get SQL statement of grant or revoke role

Get SQL statement of grant or revoke role

POST /admin/privileges/roles/dcl

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/dcl"
    
    	payload := strings.NewReader("[{\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"<ADD STRING VALUE>\"],\"revoke\":[\"<ADD STRING VALUE>\"]}]")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"<ADD STRING VALUE>\"],\"revoke\":[\"<ADD STRING VALUE>\"]}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/dcl")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/roles/dcl",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([
      {
        grantee: {authid: 'PUBLIC', authid_type: 'GROUP'},
        grant: ['<ADD STRING VALUE>'],
        revoke: ['<ADD STRING VALUE>']
      }
    ]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"grantee\":{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"},\"grant\":[\"<ADD STRING VALUE>\"],\"revoke\":[\"<ADD STRING VALUE>\"]}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/privileges/roles/dcl", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/privileges/roles/dcl   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"grantee":{"authid":"PUBLIC","authid_type":"GROUP"},"grant":["<ADD STRING VALUE>"],"revoke":["<ADD STRING VALUE>"]}]'

Response

Status Code

  • The SQL statement of grant or revoke role

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get SQL statement for grant or revoke privileges

Get SQL statement for grant or revoke privileges

POST /admin/privileges/multiple_objtypes/dcl

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_objtypes/dcl"
    
    	payload := strings.NewReader("{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"privileges\":[{\"obj_type\":\"VIEW\",\"grant\":[\"select\"],\"objects\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"specific_name\":\"<ADD STRING VALUE>\"}]}]}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"privileges\":[{\"obj_type\":\"VIEW\",\"grant\":[\"select\"],\"objects\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"specific_name\":\"<ADD STRING VALUE>\"}]}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_objtypes/dcl")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/multiple_objtypes/dcl",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      grantee: [{authid: 'PUBLIC', authid_type: 'GROUP'}],
      privileges: [
        {
          obj_type: 'VIEW',
          grant: ['select'],
          objects: [{schema: 'SYSCAT', obj_name: 'TABLES', specific_name: '<ADD STRING VALUE>'}]
        }
      ]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"privileges\":[{\"obj_type\":\"VIEW\",\"grant\":[\"select\"],\"objects\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"specific_name\":\"<ADD STRING VALUE>\"}]}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/privileges/multiple_objtypes/dcl", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_objtypes/dcl   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"grantee":[{"authid":"PUBLIC","authid_type":"GROUP"}],"privileges":[{"obj_type":"VIEW","grant":["select"],"objects":[{"schema":"SYSCAT","obj_name":"TABLES","specific_name":"<ADD STRING VALUE>"}]}]}'

Response

Status Code

  • The SQL statement for grant or revoke privileges

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Grant or revole privileges for multiple objects and objects type

Grant or revole privileges for multiple objects and objects type

PUT /admin/privileges/multiple_objtypes

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_objtypes"
    
    	payload := strings.NewReader("{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"privileges\":[{\"obj_type\":\"VIEW\",\"grant\":[\"select\"],\"objects\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"specific_name\":\"<ADD STRING VALUE>\"}]}],\"stop_on_error\":false}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"privileges\":[{\"obj_type\":\"VIEW\",\"grant\":[\"select\"],\"objects\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"specific_name\":\"<ADD STRING VALUE>\"}]}],\"stop_on_error\":false}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_objtypes")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/multiple_objtypes",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      grantee: [{authid: 'PUBLIC', authid_type: 'GROUP'}],
      privileges: [
        {
          obj_type: 'VIEW',
          grant: ['select'],
          objects: [{schema: 'SYSCAT', obj_name: 'TABLES', specific_name: '<ADD STRING VALUE>'}]
        }
      ],
      stop_on_error: false
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"privileges\":[{\"obj_type\":\"VIEW\",\"grant\":[\"select\"],\"objects\":[{\"schema\":\"SYSCAT\",\"obj_name\":\"TABLES\",\"specific_name\":\"<ADD STRING VALUE>\"}]}],\"stop_on_error\":false}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/privileges/multiple_objtypes", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_objtypes   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"grantee":[{"authid":"PUBLIC","authid_type":"GROUP"}],"privileges":[{"obj_type":"VIEW","grant":["select"],"objects":[{"schema":"SYSCAT","obj_name":"TABLES","specific_name":"<ADD STRING VALUE>"}]}],"stop_on_error":false}'

Response

Status Code

  • The status of grant or revoke privileges

  • Error payload

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the SQL statement for grant or revoke multiple roles

Get the SQL statement for grant or revoke multiple roles

POST /admin/privileges/multiple_roles/dcl

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_roles/dcl"
    
    	payload := strings.NewReader("[{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"grant\":[\"SYSTS_USR\"],\"revoke\":[\"SYSTS_USR\"]}]")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"grant\":[\"SYSTS_USR\"],\"revoke\":[\"SYSTS_USR\"]}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_roles/dcl")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/multiple_roles/dcl",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([
      {
        grantee: [{authid: 'PUBLIC', authid_type: 'GROUP'}],
        grant: ['SYSTS_USR'],
        revoke: ['SYSTS_USR']
      }
    ]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"grant\":[\"SYSTS_USR\"],\"revoke\":[\"SYSTS_USR\"]}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/privileges/multiple_roles/dcl", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_roles/dcl   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"grantee":[{"authid":"PUBLIC","authid_type":"GROUP"}],"grant":["SYSTS_USR"],"revoke":["SYSTS_USR"]}]'

Response

Status Code

  • The SQL statement for grant or revoke multiple roles

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Grant or revoke multiple roles

Grant or revoke multiple roles

PUT /admin/privileges/multiple_roles

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_roles"
    
    	payload := strings.NewReader("{\"privileges\":[{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"grant\":[\"SYSTS_USR\"],\"revoke\":[\"SYSTS_USR\"]}],\"stop_on_error\":false}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"privileges\":[{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"grant\":[\"SYSTS_USR\"],\"revoke\":[\"SYSTS_USR\"]}],\"stop_on_error\":false}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_roles")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/privileges/multiple_roles",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      privileges: [
        {
          grantee: [{authid: 'PUBLIC', authid_type: 'GROUP'}],
          grant: ['SYSTS_USR'],
          revoke: ['SYSTS_USR']
        }
      ],
      stop_on_error: false
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"privileges\":[{\"grantee\":[{\"authid\":\"PUBLIC\",\"authid_type\":\"GROUP\"}],\"grant\":[\"SYSTS_USR\"],\"revoke\":[\"SYSTS_USR\"]}],\"stop_on_error\":false}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/privileges/multiple_roles", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/privileges/multiple_roles   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"privileges":[{"grantee":[{"authid":"PUBLIC","authid_type":"GROUP"}],"grant":["SYSTS_USR"],"revoke":["SYSTS_USR"]}],"stop_on_error":false}'

Response

Status Code

  • The status of grant or revoke roles

  • Error payload

  • Error payload

  • Error payload

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create nicknames

Create nicknames.

PUT /admin/nicknames

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/nicknames"
    
    	payload := strings.NewReader("{\"nicknames\":[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\",\"remote_schema\":\"REMOTE_SCHEMA\",\"remote_table\":\"REMOTE_TABLE\",\"server_name\":\"SERVER_NAME\"}],\"server_type\":\"DB2/UDB\"}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"nicknames\":[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\",\"remote_schema\":\"REMOTE_SCHEMA\",\"remote_table\":\"REMOTE_TABLE\",\"server_name\":\"SERVER_NAME\"}],\"server_type\":\"DB2/UDB\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/nicknames")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/nicknames",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      nicknames: [
        {
          local_schema: 'LOCAL_SCHEMA',
          nickname: 'NICKNAME',
          remote_schema: 'REMOTE_SCHEMA',
          remote_table: 'REMOTE_TABLE',
          server_name: 'SERVER_NAME'
        }
      ],
      server_type: 'DB2/UDB'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"nicknames\":[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\",\"remote_schema\":\"REMOTE_SCHEMA\",\"remote_table\":\"REMOTE_TABLE\",\"server_name\":\"SERVER_NAME\"}],\"server_type\":\"DB2/UDB\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/nicknames", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/nicknames   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"nicknames":[{"local_schema":"LOCAL_SCHEMA","nickname":"NICKNAME","remote_schema":"REMOTE_SCHEMA","remote_table":"REMOTE_TABLE","server_name":"SERVER_NAME"}],"server_type":"DB2/UDB"}'

Response

Status Code

  • Nicknames created

  • Invalid parameters or nicknames already exist

  • Not authorized to create the nicknames

  • Error payload

No Sample Response

This method does not specify any sample responses.

Delete multiple nicknames

Delete multiple nicknames.

PUT /admin/nicknames/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/nicknames/delete"
    
    	payload := strings.NewReader("[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/nicknames/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/nicknames/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{local_schema: 'LOCAL_SCHEMA', nickname: 'NICKNAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/nicknames/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/nicknames/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"local_schema":"LOCAL_SCHEMA","nickname":"NICKNAME"}]'

Response

Status Code

  • Nicknames deleted

  • Invalid parameters or nicknames not exist

  • Not authorized to delete the nicknames

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get nickname definition

Get nickname definition.

GET /admin/schemas/{schema_name}/nicknames/{nickname}/definition

Request

Path Parameters

  • Schema name of the object.

  • nickname name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/definition"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/definition")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/definition",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/definition", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/definition   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the definition of nickname.

  • Not authorized to get the nicknames list

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate nickname DDL

Generate nickname DDL.

POST /admin/nicknames/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create,alter]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/nicknames/ddl?action=create"
    
    	payload := strings.NewReader("{\"nicknames\":[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\",\"remote_schema\":\"REMOTE_SCHEMA\",\"remote_table\":\"REMOTE_TABLE\",\"server_name\":\"SERVER_NAME\"}],\"server_type\":\"DB2/UDB\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"nicknames\":[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\",\"remote_schema\":\"REMOTE_SCHEMA\",\"remote_table\":\"REMOTE_TABLE\",\"server_name\":\"SERVER_NAME\"}],\"server_type\":\"DB2/UDB\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/nicknames/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/nicknames/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      nicknames: [
        {
          local_schema: 'LOCAL_SCHEMA',
          nickname: 'NICKNAME',
          remote_schema: 'REMOTE_SCHEMA',
          remote_table: 'REMOTE_TABLE',
          server_name: 'SERVER_NAME'
        }
      ],
      server_type: 'DB2/UDB'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"nicknames\":[{\"local_schema\":\"LOCAL_SCHEMA\",\"nickname\":\"NICKNAME\",\"remote_schema\":\"REMOTE_SCHEMA\",\"remote_table\":\"REMOTE_TABLE\",\"server_name\":\"SERVER_NAME\"}],\"server_type\":\"DB2/UDB\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/nicknames/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/nicknames/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"nicknames":[{"local_schema":"LOCAL_SCHEMA","nickname":"NICKNAME","remote_schema":"REMOTE_SCHEMA","remote_table":"REMOTE_TABLE","server_name":"SERVER_NAME"}],"server_type":"DB2/UDB"}'

Response

Status Code

  • Return the ddl of creating or altering nicknames.

  • Invalid parameters or miss some parameters

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get nickname detail properties

Get nickname detail properties.

GET /admin/schemas/{schema_name}/nicknames/{nickname}/properties

Request

Path Parameters

  • Schema name of the object.

  • nickname name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the detail properties of nickname.

  • Invalid parameters or miss some parameters.

  • Not authorized to return the detail properties of nickname.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get nickname data

Get nickname data.

GET /admin/schemas/{schema_name}/nicknames/{nickname}/data

Request

Path Parameters

  • Schema name of the object.

  • nickname name.

Query Parameters

  • The amount of return records.

    Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/data?rows_return=10"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/data?rows_return=10")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/data?rows_return=10",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/data?rows_return=10", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/schemas/SCHEMA_NAME/nicknames/NICKNAME/data?rows_return=10'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the data of nickname.

  • Invalid parameters or miss some parameters

  • Not authorized to return the data of nickname.

  • Error payload

No Sample Response

This method does not specify any sample responses.

List remote servers

List remote servers.

GET /admin/remoteServers

Request

Query Parameters

  • The amount of return records.

    Default: 1000

  • Type of the data source that contains the table or view for which the nickname was created.

    Allowable values: [DB2/UDB,DB2/ZOS,MYSQL,IMPALA,HIVE,MSSQLSERVER,MSSQL_ODBC,NETEZZA,ORACLE_ODBC,POSTGRESQL,TERADATA]

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/remoteServers?rows_return=10&server_type=DB2/UDB"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/remoteServers?rows_return=10&server_type=DB2/UDB")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/remoteServers?rows_return=10&server_type=DB2/UDB",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/remoteServers?rows_return=10&server_type=DB2/UDB", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/remoteServers?rows_return=10&server_type=DB2/UDB'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the list of remote servers

  • Not authorized to get the nicknames list

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create remote server

Create remote server.

POST /admin/remoteServers

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/remoteServers"
    
    	payload := strings.NewReader("{\"remote_user\":\"REMOTE_USER\",\"server_name\":\"SERVER_NAME\",\"local_user\":\"LOCAL_USER\",\"remote_password\":\"REMOTE_PASSWORD\",\"server_version\":11.1,\"server_type\":\"DB2/UDB\",\"node\":\"<ADD STRING VALUE>\",\"database\":\"DATABASE\",\"ssl_servercertificate\":\"./ssl_servercertificate_file\",\"port\":50000,\"ssl_keystore\":\"./ssl_keystore_file\",\"host\":\"HOST\",\"is_ssl\":false,\"ssl_keystash\":\"./ssl_keystash_file\",\"ssl_type\":\"CERTIFICATIONFILE\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"remote_user\":\"REMOTE_USER\",\"server_name\":\"SERVER_NAME\",\"local_user\":\"LOCAL_USER\",\"remote_password\":\"REMOTE_PASSWORD\",\"server_version\":11.1,\"server_type\":\"DB2/UDB\",\"node\":\"<ADD STRING VALUE>\",\"database\":\"DATABASE\",\"ssl_servercertificate\":\"./ssl_servercertificate_file\",\"port\":50000,\"ssl_keystore\":\"./ssl_keystore_file\",\"host\":\"HOST\",\"is_ssl\":false,\"ssl_keystash\":\"./ssl_keystash_file\",\"ssl_type\":\"CERTIFICATIONFILE\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/remoteServers")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/remoteServers",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      remote_user: 'REMOTE_USER',
      server_name: 'SERVER_NAME',
      local_user: 'LOCAL_USER',
      remote_password: 'REMOTE_PASSWORD',
      server_version: 11.1,
      server_type: 'DB2/UDB',
      node: '<ADD STRING VALUE>',
      database: 'DATABASE',
      ssl_servercertificate: './ssl_servercertificate_file',
      port: 50000,
      ssl_keystore: './ssl_keystore_file',
      host: 'HOST',
      is_ssl: false,
      ssl_keystash: './ssl_keystash_file',
      ssl_type: 'CERTIFICATIONFILE'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"remote_user\":\"REMOTE_USER\",\"server_name\":\"SERVER_NAME\",\"local_user\":\"LOCAL_USER\",\"remote_password\":\"REMOTE_PASSWORD\",\"server_version\":11.1,\"server_type\":\"DB2/UDB\",\"node\":\"<ADD STRING VALUE>\",\"database\":\"DATABASE\",\"ssl_servercertificate\":\"./ssl_servercertificate_file\",\"port\":50000,\"ssl_keystore\":\"./ssl_keystore_file\",\"host\":\"HOST\",\"is_ssl\":false,\"ssl_keystash\":\"./ssl_keystash_file\",\"ssl_type\":\"CERTIFICATIONFILE\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/remoteServers", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/remoteServers   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"remote_user":"REMOTE_USER","server_name":"SERVER_NAME","local_user":"LOCAL_USER","remote_password":"REMOTE_PASSWORD","server_version":11.1,"server_type":"DB2/UDB","node":"<ADD STRING VALUE>","database":"DATABASE","ssl_servercertificate":"./ssl_servercertificate_file","port":50000,"ssl_keystore":"./ssl_keystore_file","host":"HOST","is_ssl":false,"ssl_keystash":"./ssl_keystash_file","ssl_type":"CERTIFICATIONFILE"}'

Response

Status Code

  • Server created.

  • Invalid parameters or server already exists

  • Not authorized to create the server

  • Error payload

No Sample Response

This method does not specify any sample responses.

Delete multiple remote servers

Delete multiple remote servers.

PUT /admin/remoteServers/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/remoteServers/delete"
    
    	payload := strings.NewReader("[{\"server_name\":\"SERVER_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"server_name\":\"SERVER_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/remoteServers/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/remoteServers/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{server_name: 'SERVER_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"server_name\":\"SERVER_NAME\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/remoteServers/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/remoteServers/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"server_name":"SERVER_NAME"}]'

Response

Status Code

  • Server deleted.

  • Invalid parameters or servers not exist

  • Not authorized to delete the servers

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get server properties

Get server properties.

GET /admin/remoteServers/{server_name}/properties

Request

Path Parameters

  • Uppercase name of the server.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/remoteServers/SERVER_NAME/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/remoteServers/SERVER_NAME/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/remoteServers/SERVER_NAME/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/remoteServers/SERVER_NAME/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/remoteServers/SERVER_NAME/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the detail properties of server.

  • Invalid parameters or miss some parameters.

  • Not authorized to return the detail properties of server.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate server DDL

Generate server DDL.

POST /admin/remoteServers/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create,alter]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/remoteServers/ddl?action=create"
    
    	payload := strings.NewReader("{\"server_name\":\"SERVER_NAME\",\"local_user\":\"LOCAL_USER\",\"server_version\":11.1,\"remote_user\":\"REMOTE_USER\",\"node\":\"NODE\",\"database\":\"DATABASE\",\"port\":50000,\"ssl_keystore\":\"./ssl_keystore_file\",\"host\":\"HOST\",\"is_ssl\":false,\"remote_password\":\"REMOTE_PASSWORD\",\"ssl_type\":\"CERTIFICATIONFILE\",\"server_type\":\"DB2/UDB\",\"ssl_servercertificate\":\"./ssl_servercertificate_file\",\"ssl_keystash\":\"./ssl_keystash_file\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"server_name\":\"SERVER_NAME\",\"local_user\":\"LOCAL_USER\",\"server_version\":11.1,\"remote_user\":\"REMOTE_USER\",\"node\":\"NODE\",\"database\":\"DATABASE\",\"port\":50000,\"ssl_keystore\":\"./ssl_keystore_file\",\"host\":\"HOST\",\"is_ssl\":false,\"remote_password\":\"REMOTE_PASSWORD\",\"ssl_type\":\"CERTIFICATIONFILE\",\"server_type\":\"DB2/UDB\",\"ssl_servercertificate\":\"./ssl_servercertificate_file\",\"ssl_keystash\":\"./ssl_keystash_file\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/remoteServers/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/remoteServers/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      server_name: 'SERVER_NAME',
      local_user: 'LOCAL_USER',
      server_version: 11.1,
      remote_user: 'REMOTE_USER',
      node: 'NODE',
      database: 'DATABASE',
      port: 50000,
      ssl_keystore: './ssl_keystore_file',
      host: 'HOST',
      is_ssl: false,
      remote_password: 'REMOTE_PASSWORD',
      ssl_type: 'CERTIFICATIONFILE',
      server_type: 'DB2/UDB',
      ssl_servercertificate: './ssl_servercertificate_file',
      ssl_keystash: './ssl_keystash_file'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"server_name\":\"SERVER_NAME\",\"local_user\":\"LOCAL_USER\",\"server_version\":11.1,\"remote_user\":\"REMOTE_USER\",\"node\":\"NODE\",\"database\":\"DATABASE\",\"port\":50000,\"ssl_keystore\":\"./ssl_keystore_file\",\"host\":\"HOST\",\"is_ssl\":false,\"remote_password\":\"REMOTE_PASSWORD\",\"ssl_type\":\"CERTIFICATIONFILE\",\"server_type\":\"DB2/UDB\",\"ssl_servercertificate\":\"./ssl_servercertificate_file\",\"ssl_keystash\":\"./ssl_keystash_file\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/remoteServers/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/remoteServers/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"server_name":"SERVER_NAME","local_user":"LOCAL_USER","server_version":11.1,"remote_user":"REMOTE_USER","node":"NODE","database":"DATABASE","port":50000,"ssl_keystore":"./ssl_keystore_file","host":"HOST","is_ssl":false,"remote_password":"REMOTE_PASSWORD","ssl_type":"CERTIFICATIONFILE","server_type":"DB2/UDB","ssl_servercertificate":"./ssl_servercertificate_file","ssl_keystash":"./ssl_keystash_file"}'

Response

Status Code

  • Return the ddl of creating or altering server.

  • Invalid parameters or miss some parameters

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists usermappings

Returns the list of usermappings.

GET /admin/usermappings

Request

Query Parameters

  • Uppercase name of the server.

  • The amount of return records.

    Default: 1000

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/usermappings?server_name=SERVER_NAME&rows_return=10"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/usermappings?server_name=SERVER_NAME&rows_return=10")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/usermappings?server_name=SERVER_NAME&rows_return=10",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/usermappings?server_name=SERVER_NAME&rows_return=10", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/usermappings?server_name=SERVER_NAME&rows_return=10'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the list of usermappings

  • Invalid parameters or miss some parameters

  • Not authorized to return the data of nickname.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Alter usermapping

Alter usermapping. Only remote_user, remote_password and options can be altered.

PUT /admin/usermappings

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/usermappings"
    
    	payload := strings.NewReader("{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/usermappings")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/usermappings",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      options: {
        accounting_string: 'ACCOUNTING_STRING',
        fed_proxy_user: 'FED_PROXY_USER',
        use_trusted_context: 'N'
      },
      properties: {
        local_user: 'LOCAL_USER',
        server_name: 'SERVER_NAME',
        remote_user: 'REMOTE_USER',
        remote_password: 'REMOTE_PASSWORD'
      }
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/usermappings", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/usermappings   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"options":{"accounting_string":"ACCOUNTING_STRING","fed_proxy_user":"FED_PROXY_USER","use_trusted_context":"N"},"properties":{"local_user":"LOCAL_USER","server_name":"SERVER_NAME","remote_user":"REMOTE_USER","remote_password":"REMOTE_PASSWORD"}}'

Response

Status Code

  • Usermapping altered.

  • Invalid parameters or miss some parameters.

  • Not authorized to create the usermapping.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create usermappings

Create usermapping.

POST /admin/usermappings

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/usermappings"
    
    	payload := strings.NewReader("{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/usermappings")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/usermappings",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      options: {
        accounting_string: 'ACCOUNTING_STRING',
        fed_proxy_user: 'FED_PROXY_USER',
        use_trusted_context: 'N'
      },
      properties: {
        local_user: 'LOCAL_USER',
        server_name: 'SERVER_NAME',
        remote_user: 'REMOTE_USER',
        remote_password: 'REMOTE_PASSWORD'
      }
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/usermappings", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/usermappings   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"options":{"accounting_string":"ACCOUNTING_STRING","fed_proxy_user":"FED_PROXY_USER","use_trusted_context":"N"},"properties":{"local_user":"LOCAL_USER","server_name":"SERVER_NAME","remote_user":"REMOTE_USER","remote_password":"REMOTE_PASSWORD"}}'

Response

Status Code

  • Usermapping created.

  • Invalid parameters or usermapping has exists.

  • Not authorized to create the usermapping.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Delete multiple usermappings

Delete multiple usermappings.

PUT /admin/usermappings/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/usermappings/delete"
    
    	payload := strings.NewReader("[{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/usermappings/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/usermappings/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{local_user: 'LOCAL_USER', server_name: 'SERVER_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/usermappings/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/usermappings/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"local_user":"LOCAL_USER","server_name":"SERVER_NAME"}]'

Response

Status Code

  • Useramppings deleted

  • Invalid parameters or Useramppings not exist

  • Not authorized to delete the Useramppings

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate usermapping DDL

Generate usermapping DDL.

POST /admin/usermappings/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create,alter]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/usermappings/ddl?action=create"
    
    	payload := strings.NewReader("{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/usermappings/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/usermappings/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      options: {
        accounting_string: 'ACCOUNTING_STRING',
        fed_proxy_user: 'FED_PROXY_USER',
        use_trusted_context: 'N'
      },
      properties: {
        local_user: 'LOCAL_USER',
        server_name: 'SERVER_NAME',
        remote_user: 'REMOTE_USER',
        remote_password: 'REMOTE_PASSWORD'
      }
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"options\":{\"accounting_string\":\"ACCOUNTING_STRING\",\"fed_proxy_user\":\"FED_PROXY_USER\",\"use_trusted_context\":\"N\"},\"properties\":{\"local_user\":\"LOCAL_USER\",\"server_name\":\"SERVER_NAME\",\"remote_user\":\"REMOTE_USER\",\"remote_password\":\"REMOTE_PASSWORD\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/usermappings/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/usermappings/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"options":{"accounting_string":"ACCOUNTING_STRING","fed_proxy_user":"FED_PROXY_USER","use_trusted_context":"N"},"properties":{"local_user":"LOCAL_USER","server_name":"SERVER_NAME","remote_user":"REMOTE_USER","remote_password":"REMOTE_PASSWORD"}}'

Response

Status Code

  • Return the ddl of creating or altering usermapping.

  • Invalid parameters or miss some parameters

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get usermapping detail properties

Get usermapping detail properties.

GET /admin/usermappings/localusers/{local_user}/remoteservers/{server_name}/properties

Request

Path Parameters

  • The user which can connect to the local database.

  • Uppercase name of the server.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/usermappings/localusers/LOCAL_USER/remoteservers/SERVER_NAME/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/usermappings/localusers/LOCAL_USER/remoteservers/SERVER_NAME/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/usermappings/localusers/LOCAL_USER/remoteservers/SERVER_NAME/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/usermappings/localusers/LOCAL_USER/remoteservers/SERVER_NAME/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/usermappings/localusers/LOCAL_USER/remoteservers/SERVER_NAME/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the detail properties of usermapping.

  • Not authorized to return the detail properties of nickname.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists the remote tables

Returns the list of remote tables.

POST /admin/remoteTables

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/remoteTables"
    
    	payload := strings.NewReader("{\"rows_return\":10,\"schemas\":[{\"name\":\"SCHEMA_NAME\"}],\"search_name\":\"SEARCH_NAME\",\"server_name\":\"SERVER_NAME\",\"server_type\":\"DB2/UDB\",\"show_systems\":false,\"sort\":{\"field\":\"remote_table\",\"is_ascend\":true}}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"rows_return\":10,\"schemas\":[{\"name\":\"SCHEMA_NAME\"}],\"search_name\":\"SEARCH_NAME\",\"server_name\":\"SERVER_NAME\",\"server_type\":\"DB2/UDB\",\"show_systems\":false,\"sort\":{\"field\":\"remote_table\",\"is_ascend\":true}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/remoteTables")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/remoteTables",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      rows_return: 10,
      schemas: [{name: 'SCHEMA_NAME'}],
      search_name: 'SEARCH_NAME',
      server_name: 'SERVER_NAME',
      server_type: 'DB2/UDB',
      show_systems: false,
      sort: {field: 'remote_table', is_ascend: true}
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"rows_return\":10,\"schemas\":[{\"name\":\"SCHEMA_NAME\"}],\"search_name\":\"SEARCH_NAME\",\"server_name\":\"SERVER_NAME\",\"server_type\":\"DB2/UDB\",\"show_systems\":false,\"sort\":{\"field\":\"remote_table\",\"is_ascend\":true}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/remoteTables", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/remoteTables   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"rows_return":10,"schemas":[{"name":"SCHEMA_NAME"}],"search_name":"SEARCH_NAME","server_name":"SERVER_NAME","server_type":"DB2/UDB","show_systems":false,"sort":{"field":"remote_table","is_ascend":true}}'

Response

Status Code

  • Return the list of remote tables.

  • Not authorized to get the remote tables list

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists the remote schemas

Returns the list of remote schemas.

POST /admin/remoteSchemas

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/remoteSchemas"
    
    	payload := strings.NewReader("{\"server_name\":\"SERVER_NAME\",\"search_name\":\"SEARCH_NAME\",\"rows_return\":10,\"show_systems\":false,\"server_type\":\"DB2/UDB\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"server_name\":\"SERVER_NAME\",\"search_name\":\"SEARCH_NAME\",\"rows_return\":10,\"show_systems\":false,\"server_type\":\"DB2/UDB\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/remoteSchemas")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/remoteSchemas",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      server_name: 'SERVER_NAME',
      search_name: 'SEARCH_NAME',
      rows_return: 10,
      show_systems: false,
      server_type: 'DB2/UDB'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"server_name\":\"SERVER_NAME\",\"search_name\":\"SEARCH_NAME\",\"rows_return\":10,\"show_systems\":false,\"server_type\":\"DB2/UDB\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/remoteSchemas", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/remoteSchemas   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"server_name":"SERVER_NAME","search_name":"SEARCH_NAME","rows_return":10,"show_systems":false,"server_type":"DB2/UDB"}'

Response

Status Code

  • Return the list of remote schemas.

  • Not authorized to get the remote schemas list

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate workload DDL

Generate workload DDL.

POST /admin/workloads/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/workloads/ddl?action=create"
    
    	payload := strings.NewReader("{\"categorization\":\"GetWorkloadDDLTemplate\",\"enable_coll_act_data\":true}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"categorization\":\"GetWorkloadDDLTemplate\",\"enable_coll_act_data\":true}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/workloads/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/workloads/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({categorization: 'GetWorkloadDDLTemplate', enable_coll_act_data: true}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"categorization\":\"GetWorkloadDDLTemplate\",\"enable_coll_act_data\":true}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/workloads/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/workloads/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"categorization":"GetWorkloadDDLTemplate","enable_coll_act_data":true}'

Response

Status Code

  • Return the ddl of creating workloads.

  • Invalid parameters or miss some parameters

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists workloads

Returns the list of workloads.

GET /admin/workloads

Request

Query Parameters

  • The amount of return records.

    Default: 1000

  • Workload name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/workloads?rows_return=10&search_name=SEARCH_NAME"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/workloads?rows_return=10&search_name=SEARCH_NAME")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/workloads?rows_return=10&search_name=SEARCH_NAME",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/workloads?rows_return=10&search_name=SEARCH_NAME", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/workloads?rows_return=10&search_name=SEARCH_NAME'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Return the list of workloads

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple sequences

Drop multiple sequences

PUT /admin/sequences/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/sequences/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"SEQUENCE_SCHEMA\",\"sequence\":\"SEQUENCE_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"SEQUENCE_SCHEMA\",\"sequence\":\"SEQUENCE_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/sequences/delete")
      .put(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/sequences/delete",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'SEQUENCE_SCHEMA', sequence: 'SEQUENCE_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"SEQUENCE_SCHEMA\",\"sequence\":\"SEQUENCE_NAME\"}]"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/sequences/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/sequences/delete   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"SEQUENCE_SCHEMA","sequence":"SEQUENCE_NAME"}]'

Response

Status Code

  • The status of dropping sequences

  • Faile to drop sequences

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple procedures

Drop multiple procedures

PUT /admin/procedures/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/procedures/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"PROCEDURE_SCHEMA\",\"procedure\":\"PROCEDURE_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"PROCEDURE_SCHEMA\",\"procedure\":\"PROCEDURE_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/procedures/delete")
      .put(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/procedures/delete",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'PROCEDURE_SCHEMA', procedure: 'PROCEDURE_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"PROCEDURE_SCHEMA\",\"procedure\":\"PROCEDURE_NAME\"}]"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/procedures/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/procedures/delete   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"PROCEDURE_SCHEMA","procedure":"PROCEDURE_NAME"}]'

Response

Status Code

  • Delete procedure successfully

  • Faile to drop procedures

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Retrieve parameters for procedure

Retrieve parameters for procedure.

GET /admin/schemas/{schema_name}/procedures/{specific_name}/parameters

Request

Path Parameters

  • The schema name of the procedure

  • The specificname of procedure

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/PROCEDURE_SCHEMA/procedures/PROCEDURE_NAME/parameters"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/PROCEDURE_SCHEMA/procedures/PROCEDURE_NAME/parameters")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/PROCEDURE_SCHEMA/procedures/PROCEDURE_NAME/parameters",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/PROCEDURE_SCHEMA/procedures/PROCEDURE_NAME/parameters", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/PROCEDURE_SCHEMA/procedures/PROCEDURE_NAME/parameters   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Retrieve parameters for procedure.

  • Error information when get procedure parameters.

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate create procedure template

POST /admin/procedures/ddl

Request

Query Parameters

  • Allowable values: [create]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/procedures/ddl?action=create"
    
    	payload := strings.NewReader("{\"schema\":\"PROCEDURE_SCHEMA\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"PROCEDURE_SCHEMA\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/procedures/ddl?action=create")
      .post(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/procedures/ddl?action=create",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({schema: 'PROCEDURE_SCHEMA'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"PROCEDURE_SCHEMA\"}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/procedures/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/procedures/ddl?action=create'   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"PROCEDURE_SCHEMA"}'

Response

Status Code

  • Generate the template of creating procedure

  • Faile to generate create procedure template

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple functions

Drop multiple functions

PUT /admin/functions/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/functions/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"UDT_SCHEMA\",\"function\":\"UDT_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"UDT_SCHEMA\",\"function\":\"UDT_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/functions/delete")
      .put(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/functions/delete",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'UDT_SCHEMA', function: 'UDT_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"UDT_SCHEMA\",\"function\":\"UDT_NAME\"}]"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/functions/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/functions/delete   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"UDT_SCHEMA","function":"UDT_NAME"}]'

Response

Status Code

  • Delete function successfully

  • Faile to drop functions

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Retrieve parameters for specific udf

Retrieve parameters for specific udf.

GET /admin/schemas/{schema_name}/functions/{specific_name}/parameters

Request

Path Parameters

  • The schema name of the function.

  • The specific name of function.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/UDF_SCHEMA/functions/UDF_NAME/parameters"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/UDF_SCHEMA/functions/UDF_NAME/parameters")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/UDF_SCHEMA/functions/UDF_NAME/parameters",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/UDF_SCHEMA/functions/UDF_NAME/parameters", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/UDF_SCHEMA/functions/UDF_NAME/parameters   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Retrieve parameters for specific udf.

  • Error information when get procedure parameters

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate create function template

POST /admin/functions/ddl

Request

Query Parameters

  • Allowable values: [create]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/functions/ddl?action=create"
    
    	payload := strings.NewReader("{\"schema\":\"UDF_SCHEMA\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"UDF_SCHEMA\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/functions/ddl?action=create")
      .post(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/functions/ddl?action=create",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({schema: 'UDF_SCHEMA'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"UDF_SCHEMA\"}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/functions/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/functions/ddl?action=create'   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"UDF_SCHEMA"}'

Response

Status Code

  • Generate the template of creating function.

  • Faile to generate create function template.

  • SQLException

  • SQLException

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple User-defined Types

Drop multiple User-defined Types

PUT /admin/udts/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/udts/delete"
    
    	payload := strings.NewReader("[{\"schema\":\"UDT_SCHEMA\",\"udt\":\"UDT_NAME\"}]")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "[{\"schema\":\"UDT_SCHEMA\",\"udt\":\"UDT_NAME\"}]");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/udts/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/udts/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify([{schema: 'UDT_SCHEMA', udt: 'UDT_NAME'}]));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "[{\"schema\":\"UDT_SCHEMA\",\"udt\":\"UDT_NAME\"}]"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/udts/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/udts/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '[{"schema":"UDT_SCHEMA","udt":"UDT_NAME"}]'

Response

Status Code

  • The UDTs was dropped successfully.

  • Invalid parameters or run sql exception.

  • Not authorized.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Retrieve row definition for User-defined Type object

Retrieve row definition for User-defined Type object

GET /admin/schemas/{schema_name}/udts/{udt_name}/definition

Request

Path Parameters

  • The schema name of User-defined Type.

  • The name of User-defined Type.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/UDT_SCHEMA/udts/UDT_NAME/definition"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/UDT_SCHEMA/udts/UDT_NAME/definition")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/UDT_SCHEMA/udts/UDT_NAME/definition",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/UDT_SCHEMA/udts/UDT_NAME/definition", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/UDT_SCHEMA/udts/UDT_NAME/definition   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Retrieve row definition for User-defined Type object.

  • Not authorized.

  • Schema or alias not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate Create User-defined Types template

Generate Create User-defined Types template.

POST /admin/udts/ddl

Request

Query Parameters

  • Type of operation.

    Allowable values: [create]

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/udts/ddl?action=create"
    
    	payload := strings.NewReader("{\"schema\":\"UDT_SCHEMA\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"UDT_SCHEMA\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/udts/ddl?action=create")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/udts/ddl?action=create",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({schema: 'UDT_SCHEMA'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"UDT_SCHEMA\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/udts/ddl?action=create", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   'https://{HOSTNAME}/dbapi/v5/admin/udts/ddl?action=create'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"UDT_SCHEMA"}'

Response

Status Code

  • Generate Create User-defined Types template.

  • Not authorized.

  • Schema or alias not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query the list of tablespace

Query the list of tablespace.

GET /admin/tablespaces

Request

Query Parameters

  • Tablespace name.

  • The amount of return records.

    Default: 500

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tablespaces?search_name=SYSCATSPACE&rows_return=50"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tablespaces?search_name=SYSCATSPACE&rows_return=50")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tablespaces?search_name=SYSCATSPACE&rows_return=50",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tablespaces?search_name=SYSCATSPACE&rows_return=50", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/tablespaces?search_name=SYSCATSPACE&rows_return=50'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Query the list of tablespace.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Drop multiple tablespaces

Drop multiple tablespaces.

PUT /admin/tablespaces/delete

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tablespaces/delete"
    
    	payload := strings.NewReader("{\"tablespaces\":[\"TBSTEST\"]}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"tablespaces\":[\"TBSTEST\"]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tablespaces/delete")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tablespaces/delete",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({tablespaces: ['TBSTEST']}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"tablespaces\":[\"TBSTEST\"]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/tablespaces/delete", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/tablespaces/delete   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"tablespaces":["TBSTEST"]}'

Response

Status Code

  • The tablespaces was dropped successfully.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the I/O settings of the tablespace

Get the I/O settings of the tablespace.

GET /admin/tablespaces/{tablespace}/iosetting

Request

Path Parameters

  • Tablespace name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/iosetting"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/iosetting")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tablespaces/SYSCATSPACE/iosetting",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tablespaces/SYSCATSPACE/iosetting", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/iosetting   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get the I/O settings of the tablespace.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the tablespace size

Get the tablespace size.

GET /admin/tablespaces/{tablespace}/size

Request

Path Parameters

  • Tablespace name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/size"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/size")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tablespaces/SYSCATSPACE/size",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tablespaces/SYSCATSPACE/size", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/tablespaces/SYSCATSPACE/size   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Get the tablespace size.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get all admin tasks list

Get all admin tasks list.

GET /admin/tables/tasks

Request

Query Parameters

  • keyword to search.

  • The start time of the tasks.

  • The end time of the tasks.

  • The type of the task.

  • The status of the task.

    Allowable values: [completed,running,pending,failed,completed_with_warning]

  • Sort by this field.

  • The start number of return records.

  • The end number of return records.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/tasks?search_name=test&filter_start=SOME_INTEGER_VALUE&filter_end=SOME_INTEGER_VALUE&filter_type=import&filter_status=SOME_STRING_VALUE&sort_field=start_time&is_ascend=false&first=0&last=100"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/tasks?search_name=test&filter_start=SOME_INTEGER_VALUE&filter_end=SOME_INTEGER_VALUE&filter_type=import&filter_status=SOME_STRING_VALUE&sort_field=start_time&is_ascend=false&first=0&last=100")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/tasks?search_name=test&filter_start=SOME_INTEGER_VALUE&filter_end=SOME_INTEGER_VALUE&filter_type=import&filter_status=SOME_STRING_VALUE&sort_field=start_time&is_ascend=false&first=0&last=100",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tables/tasks?search_name=test&filter_start=SOME_INTEGER_VALUE&filter_end=SOME_INTEGER_VALUE&filter_type=import&filter_status=SOME_STRING_VALUE&sort_field=start_time&is_ascend=false&first=0&last=100", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/tables/tasks?search_name=test&filter_start=SOME_INTEGER_VALUE&filter_end=SOME_INTEGER_VALUE&filter_type=import&filter_status=SOME_STRING_VALUE&sort_field=start_time&is_ascend=false&first=0&last=100'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The tasks were listed successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get detail information of a task

Get detail information of a task.

GET /admin/tables/tasks/detail/{task_id}

Request

Path Parameters

  • task id.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/tasks/detail/26fd406e-1677-45cf-b48a-286324602392"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/tasks/detail/26fd406e-1677-45cf-b48a-286324602392")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/tasks/detail/26fd406e-1677-45cf-b48a-286324602392",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tables/tasks/detail/26fd406e-1677-45cf-b48a-286324602392", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/tables/tasks/detail/26fd406e-1677-45cf-b48a-286324602392   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The detail information was listed successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Query the list of object storage aliases

Query the list of object storage aliases.

GET /admin/bucket_aliases

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/bucket_aliases"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/bucket_aliases")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/bucket_aliases",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/bucket_aliases", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/bucket_aliases   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The list of object storage aliases.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create object storage alias

Creates a new object storage alias.

PUT /admin/bucket_alias

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/bucket_alias"
    
    	payload := strings.NewReader("{\"name\":\"<ADD STRING VALUE>\",\"endpoint\":\"<ADD STRING VALUE>\",\"vendor\":\"<ADD STRING VALUE>\",\"object\":\"<ADD STRING VALUE>\",\"bucket_name\":\"<ADD STRING VALUE>\",\"grantee_type\":\"U\",\"grantee\":\"<ADD STRING VALUE>\",\"access_key\":\"<ADD STRING VALUE>\",\"access_secret\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"name\":\"<ADD STRING VALUE>\",\"endpoint\":\"<ADD STRING VALUE>\",\"vendor\":\"<ADD STRING VALUE>\",\"object\":\"<ADD STRING VALUE>\",\"bucket_name\":\"<ADD STRING VALUE>\",\"grantee_type\":\"U\",\"grantee\":\"<ADD STRING VALUE>\",\"access_key\":\"<ADD STRING VALUE>\",\"access_secret\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/bucket_alias")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/bucket_alias",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      name: '<ADD STRING VALUE>',
      endpoint: '<ADD STRING VALUE>',
      vendor: '<ADD STRING VALUE>',
      object: '<ADD STRING VALUE>',
      bucket_name: '<ADD STRING VALUE>',
      grantee_type: 'U',
      grantee: '<ADD STRING VALUE>',
      access_key: '<ADD STRING VALUE>',
      access_secret: '<ADD STRING VALUE>'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"name\":\"<ADD STRING VALUE>\",\"endpoint\":\"<ADD STRING VALUE>\",\"vendor\":\"<ADD STRING VALUE>\",\"object\":\"<ADD STRING VALUE>\",\"bucket_name\":\"<ADD STRING VALUE>\",\"grantee_type\":\"U\",\"grantee\":\"<ADD STRING VALUE>\",\"access_key\":\"<ADD STRING VALUE>\",\"access_secret\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/bucket_alias", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/bucket_alias   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"name":"<ADD STRING VALUE>","endpoint":"<ADD STRING VALUE>","vendor":"<ADD STRING VALUE>","object":"<ADD STRING VALUE>","bucket_name":"<ADD STRING VALUE>","grantee_type":"U","grantee":"<ADD STRING VALUE>","access_key":"<ADD STRING VALUE>","access_secret":"<ADD STRING VALUE>"}'

Response

Status Code

  • Object storage alias created.

  • Invalid parameters or object storage alias already exists

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Delete object storage alias

Delete object storage alias.

DELETE /admin/bucket_alias/{alias_name}

Request

Path Parameters

  • Object storage alias name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/bucket_alias/aliasname"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/bucket_alias/aliasname")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/bucket_alias/aliasname",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/admin/bucket_alias/aliasname", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/admin/bucket_alias/aliasname   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The object storage alias was deleted successfully.

  • Invalid parameters.

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Export table to ODF format

Export table to ODF format and stored in selected object storage alias.

POST /admin/tables/task/export_odf

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/task/export_odf"
    
    	payload := strings.NewReader("{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"temporary_table_name\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"temporary_table_name\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/task/export_odf")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/task/export_odf",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table: '<ADD STRING VALUE>',
      schema: '<ADD STRING VALUE>',
      file_format: 'PARQUET',
      bucket_alias: '<ADD STRING VALUE>',
      obj_path: '<ADD STRING VALUE>',
      bucket_path: '<ADD STRING VALUE>',
      temporary_table_name: '<ADD STRING VALUE>'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"temporary_table_name\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/task/export_odf", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/task/export_odf   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table":"<ADD STRING VALUE>","schema":"<ADD STRING VALUE>","file_format":"PARQUET","bucket_alias":"<ADD STRING VALUE>","obj_path":"<ADD STRING VALUE>","bucket_path":"<ADD STRING VALUE>","temporary_table_name":"<ADD STRING VALUE>"}'

Response

Status Code

  • Taske for exporting is created.

  • Invalid parameters

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get script used for exporting table to ODF format

Get script used for exporting table to ODF format to selected object storage alias.

POST /admin/tables/task/export_odf/script

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/task/export_odf/script"
    
    	payload := strings.NewReader("{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"temporary_table_name\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"temporary_table_name\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/task/export_odf/script")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/task/export_odf/script",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table: '<ADD STRING VALUE>',
      schema: '<ADD STRING VALUE>',
      file_format: 'PARQUET',
      bucket_alias: '<ADD STRING VALUE>',
      obj_path: '<ADD STRING VALUE>',
      bucket_path: '<ADD STRING VALUE>',
      temporary_table_name: '<ADD STRING VALUE>'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"temporary_table_name\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/task/export_odf/script", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/task/export_odf/script   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table":"<ADD STRING VALUE>","schema":"<ADD STRING VALUE>","file_format":"PARQUET","bucket_alias":"<ADD STRING VALUE>","obj_path":"<ADD STRING VALUE>","bucket_path":"<ADD STRING VALUE>","temporary_table_name":"<ADD STRING VALUE>"}'

Response

Status Code

  • Taske for exporting is created.

  • Invalid parameters

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Create a datalake table

Create a datalake table based on object storage alias

PUT /admin/datalaketables

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/datalaketables"
    
    	payload := strings.NewReader("{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"stored_by_iceberg\":false,\"bucket_alias\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"purge_data\":false}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"stored_by_iceberg\":false,\"bucket_alias\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"purge_data\":false}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/datalaketables")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/datalaketables",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table: '<ADD STRING VALUE>',
      schema: '<ADD STRING VALUE>',
      file_format: 'PARQUET',
      stored_by_iceberg: false,
      bucket_alias: '<ADD STRING VALUE>',
      bucket_path: '<ADD STRING VALUE>',
      obj_path: '<ADD STRING VALUE>',
      purge_data: false
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"stored_by_iceberg\":false,\"bucket_alias\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"purge_data\":false}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/admin/datalaketables", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/admin/datalaketables   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table":"<ADD STRING VALUE>","schema":"<ADD STRING VALUE>","file_format":"PARQUET","stored_by_iceberg":false,"bucket_alias":"<ADD STRING VALUE>","bucket_path":"<ADD STRING VALUE>","obj_path":"<ADD STRING VALUE>","purge_data":false}'

Response

Status Code

  • Datalake table is created successfully.

  • Invalid parameters

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get script of creating datalake table

Get script of creating datalake table based on object storage alias

POST /admin/datalaketables/ddl

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/datalaketables/ddl"
    
    	payload := strings.NewReader("{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"stored_by_iceberg\":false,\"bucket_alias\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"purge_data\":false}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"stored_by_iceberg\":false,\"bucket_alias\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"purge_data\":false}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/datalaketables/ddl")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/datalaketables/ddl",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table: '<ADD STRING VALUE>',
      schema: '<ADD STRING VALUE>',
      file_format: 'PARQUET',
      stored_by_iceberg: false,
      bucket_alias: '<ADD STRING VALUE>',
      bucket_path: '<ADD STRING VALUE>',
      obj_path: '<ADD STRING VALUE>',
      purge_data: false
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"file_format\":\"PARQUET\",\"stored_by_iceberg\":false,\"bucket_alias\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"purge_data\":false}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/datalaketables/ddl", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/datalaketables/ddl   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table":"<ADD STRING VALUE>","schema":"<ADD STRING VALUE>","file_format":"PARQUET","stored_by_iceberg":false,"bucket_alias":"<ADD STRING VALUE>","bucket_path":"<ADD STRING VALUE>","obj_path":"<ADD STRING VALUE>","purge_data":false}'

Response

Status Code

  • The datalake table is created.

  • Invalid parameters

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get properties of datalake table

Get properties of datalake table

GET /admin/schemas/{schema_name}/datalaketables/{table_name}/properties

Request

Path Parameters

  • Schema name of datalake table.

  • Name of datalake table.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/datalaketables/{table_name}/properties"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/datalaketables/{table_name}/properties")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/{schema_name}/datalaketables/{table_name}/properties",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/{schema_name}/datalaketables/{table_name}/properties", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/{schema_name}/datalaketables/{table_name}/properties   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Datalake table's properties are gotten successfully.

  • Invalid parameters

  • Not authorized.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Retrieve row definition for datalake table

Retrieve row definition for datalake table

GET /admin/schemas/{schema_name}/datalaketables/{table_name}/definition

Request

Path Parameters

  • Schema name of datalake table.

  • Name of datalake table.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/schemas/DATALAKE_SCHEMA/datalaketables/DATALAKE_NAME/definition"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/schemas/DATALAKE_SCHEMA/datalaketables/DATALAKE_NAME/definition")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/schemas/DATALAKE_SCHEMA/datalaketables/DATALAKE_NAME/definition",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/schemas/DATALAKE_SCHEMA/datalaketables/DATALAKE_NAME/definition", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/schemas/DATALAKE_SCHEMA/datalaketables/DATALAKE_NAME/definition   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Retrieve row definition for datalake table.

  • Not authorized.

  • Schema or alias not found.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Creates a data load job, load uses external table technology

Creates a data load job

POST /load_jobs_ET

Request

Data load job details

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/load_jobs_ET"
    
    	payload := strings.NewReader("{\"load_source\":\"SERVER\",\"load_action\":\"INSERT\",\"schema\":\"<ADD STRING VALUE>\",\"table\":\"<ADD STRING VALUE>\",\"max_row_count\":0,\"max_warning_count\":1000,\"cloud_source\":{\"endpoint\":\"<ADD STRING VALUE>\",\"path\":\"<ADD STRING VALUE>\",\"auth_id\":\"<ADD STRING VALUE>\",\"auth_secret\":\"<ADD STRING VALUE>\"},\"server_source\":{\"file_path\":\"<ADD STRING VALUE>\"},\"file_options\":{\"encoding\":\"<ADD STRING VALUE>\",\"code_page\":\"<ADD STRING VALUE>\",\"has_header_row\":\"no\",\"column_delimiter\":\",\",\"string_delimiter\":\"DOUBLE\",\"date_style\":\"<ADD STRING VALUE>\",\"time_style\":\"<ADD STRING VALUE>\",\"date_delimiter\":\"<ADD STRING VALUE>\",\"date_format\":\"<ADD STRING VALUE>\",\"time_format\":\"<ADD STRING VALUE>\",\"timestamp_format\":\"<ADD STRING VALUE>\",\"bool_style\":\"1_0 (this is the default)\",\"ignore_zero\":true,\"require_quotes\":\"<ADD STRING VALUE>\",\"ctrl_chars\":\"<ADD STRING VALUE>\",\"escape_char\":\"<ADD STRING VALUE>\"}}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"load_source\":\"SERVER\",\"load_action\":\"INSERT\",\"schema\":\"<ADD STRING VALUE>\",\"table\":\"<ADD STRING VALUE>\",\"max_row_count\":0,\"max_warning_count\":1000,\"cloud_source\":{\"endpoint\":\"<ADD STRING VALUE>\",\"path\":\"<ADD STRING VALUE>\",\"auth_id\":\"<ADD STRING VALUE>\",\"auth_secret\":\"<ADD STRING VALUE>\"},\"server_source\":{\"file_path\":\"<ADD STRING VALUE>\"},\"file_options\":{\"encoding\":\"<ADD STRING VALUE>\",\"code_page\":\"<ADD STRING VALUE>\",\"has_header_row\":\"no\",\"column_delimiter\":\",\",\"string_delimiter\":\"DOUBLE\",\"date_style\":\"<ADD STRING VALUE>\",\"time_style\":\"<ADD STRING VALUE>\",\"date_delimiter\":\"<ADD STRING VALUE>\",\"date_format\":\"<ADD STRING VALUE>\",\"time_format\":\"<ADD STRING VALUE>\",\"timestamp_format\":\"<ADD STRING VALUE>\",\"bool_style\":\"1_0 (this is the default)\",\"ignore_zero\":true,\"require_quotes\":\"<ADD STRING VALUE>\",\"ctrl_chars\":\"<ADD STRING VALUE>\",\"escape_char\":\"<ADD STRING VALUE>\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/load_jobs_ET")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/load_jobs_ET",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      load_source: 'SERVER',
      load_action: 'INSERT',
      schema: '<ADD STRING VALUE>',
      table: '<ADD STRING VALUE>',
      max_row_count: 0,
      max_warning_count: 1000,
      cloud_source: {
        endpoint: '<ADD STRING VALUE>',
        path: '<ADD STRING VALUE>',
        auth_id: '<ADD STRING VALUE>',
        auth_secret: '<ADD STRING VALUE>'
      },
      server_source: {file_path: '<ADD STRING VALUE>'},
      file_options: {
        encoding: '<ADD STRING VALUE>',
        code_page: '<ADD STRING VALUE>',
        has_header_row: 'no',
        column_delimiter: ',',
        string_delimiter: 'DOUBLE',
        date_style: '<ADD STRING VALUE>',
        time_style: '<ADD STRING VALUE>',
        date_delimiter: '<ADD STRING VALUE>',
        date_format: '<ADD STRING VALUE>',
        time_format: '<ADD STRING VALUE>',
        timestamp_format: '<ADD STRING VALUE>',
        bool_style: '1_0 (this is the default)',
        ignore_zero: true,
        require_quotes: '<ADD STRING VALUE>',
        ctrl_chars: '<ADD STRING VALUE>',
        escape_char: '<ADD STRING VALUE>'
      }
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"load_source\":\"SERVER\",\"load_action\":\"INSERT\",\"schema\":\"<ADD STRING VALUE>\",\"table\":\"<ADD STRING VALUE>\",\"max_row_count\":0,\"max_warning_count\":1000,\"cloud_source\":{\"endpoint\":\"<ADD STRING VALUE>\",\"path\":\"<ADD STRING VALUE>\",\"auth_id\":\"<ADD STRING VALUE>\",\"auth_secret\":\"<ADD STRING VALUE>\"},\"server_source\":{\"file_path\":\"<ADD STRING VALUE>\"},\"file_options\":{\"encoding\":\"<ADD STRING VALUE>\",\"code_page\":\"<ADD STRING VALUE>\",\"has_header_row\":\"no\",\"column_delimiter\":\",\",\"string_delimiter\":\"DOUBLE\",\"date_style\":\"<ADD STRING VALUE>\",\"time_style\":\"<ADD STRING VALUE>\",\"date_delimiter\":\"<ADD STRING VALUE>\",\"date_format\":\"<ADD STRING VALUE>\",\"time_format\":\"<ADD STRING VALUE>\",\"timestamp_format\":\"<ADD STRING VALUE>\",\"bool_style\":\"1_0 (this is the default)\",\"ignore_zero\":true,\"require_quotes\":\"<ADD STRING VALUE>\",\"ctrl_chars\":\"<ADD STRING VALUE>\",\"escape_char\":\"<ADD STRING VALUE>\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/load_jobs_ET", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/load_jobs_ET   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"load_source":"SERVER","load_action":"INSERT","schema":"<ADD STRING VALUE>","table":"<ADD STRING VALUE>","max_row_count":0,"max_warning_count":1000,"cloud_source":{"endpoint":"<ADD STRING VALUE>","path":"<ADD STRING VALUE>","auth_id":"<ADD STRING VALUE>","auth_secret":"<ADD STRING VALUE>"},"server_source":{"file_path":"<ADD STRING VALUE>"},"file_options":{"encoding":"<ADD STRING VALUE>","code_page":"<ADD STRING VALUE>","has_header_row":"no","column_delimiter":",","string_delimiter":"DOUBLE","date_style":"<ADD STRING VALUE>","time_style":"<ADD STRING VALUE>","date_delimiter":"<ADD STRING VALUE>","date_format":"<ADD STRING VALUE>","time_format":"<ADD STRING VALUE>","timestamp_format":"<ADD STRING VALUE>","bool_style":"1_0 (this is the default)","ignore_zero":true,"require_quotes":"<ADD STRING VALUE>","ctrl_chars":"<ADD STRING VALUE>","escape_char":"<ADD STRING VALUE>"}}'

Response

Confirmation of load job created

Status Code

  • load jobs.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists all data load jobs, load uses Db2 load utility technology

Lists all data load jobs for the user.

GET /load_jobs

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/load_jobs"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/load_jobs")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/load_jobs",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/load_jobs", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/load_jobs   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Information about a data load job

Status Code

  • Data load jobs

  • Error payload

No Sample Response

This method does not specify any sample responses.

Creates a data load job

Creates a data load job

POST /load_jobs

Request

Data load job details

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/load_jobs"
    
    	payload := strings.NewReader("{\"load_source\":\"SERVER\",\"load_action\":\"INSERT\",\"schema\":\"<ADD STRING VALUE>\",\"table\":\"<ADD STRING VALUE>\",\"max_row_count\":0,\"max_warning_count\":1000,\"cloud_source\":{\"endpoint\":\"<ADD STRING VALUE>\",\"path\":\"<ADD STRING VALUE>\",\"auth_id\":\"<ADD STRING VALUE>\",\"auth_secret\":\"<ADD STRING VALUE>\"},\"server_source\":{\"file_path\":\"<ADD STRING VALUE>\"},\"file_options\":{\"code_page\":\"<ADD STRING VALUE>\",\"has_header_row\":\"no\",\"column_delimiter\":\",\",\"date_format\":\"YYYY-MM-DD\",\"time_format\":\"HH:MM:SS\",\"timestamp_format\":\"YYYY-MM-DD HH:MM:SS\"}}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"load_source\":\"SERVER\",\"load_action\":\"INSERT\",\"schema\":\"<ADD STRING VALUE>\",\"table\":\"<ADD STRING VALUE>\",\"max_row_count\":0,\"max_warning_count\":1000,\"cloud_source\":{\"endpoint\":\"<ADD STRING VALUE>\",\"path\":\"<ADD STRING VALUE>\",\"auth_id\":\"<ADD STRING VALUE>\",\"auth_secret\":\"<ADD STRING VALUE>\"},\"server_source\":{\"file_path\":\"<ADD STRING VALUE>\"},\"file_options\":{\"code_page\":\"<ADD STRING VALUE>\",\"has_header_row\":\"no\",\"column_delimiter\":\",\",\"date_format\":\"YYYY-MM-DD\",\"time_format\":\"HH:MM:SS\",\"timestamp_format\":\"YYYY-MM-DD HH:MM:SS\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/load_jobs")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/load_jobs",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      load_source: 'SERVER',
      load_action: 'INSERT',
      schema: '<ADD STRING VALUE>',
      table: '<ADD STRING VALUE>',
      max_row_count: 0,
      max_warning_count: 1000,
      cloud_source: {
        endpoint: '<ADD STRING VALUE>',
        path: '<ADD STRING VALUE>',
        auth_id: '<ADD STRING VALUE>',
        auth_secret: '<ADD STRING VALUE>'
      },
      server_source: {file_path: '<ADD STRING VALUE>'},
      file_options: {
        code_page: '<ADD STRING VALUE>',
        has_header_row: 'no',
        column_delimiter: ',',
        date_format: 'YYYY-MM-DD',
        time_format: 'HH:MM:SS',
        timestamp_format: 'YYYY-MM-DD HH:MM:SS'
      }
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"load_source\":\"SERVER\",\"load_action\":\"INSERT\",\"schema\":\"<ADD STRING VALUE>\",\"table\":\"<ADD STRING VALUE>\",\"max_row_count\":0,\"max_warning_count\":1000,\"cloud_source\":{\"endpoint\":\"<ADD STRING VALUE>\",\"path\":\"<ADD STRING VALUE>\",\"auth_id\":\"<ADD STRING VALUE>\",\"auth_secret\":\"<ADD STRING VALUE>\"},\"server_source\":{\"file_path\":\"<ADD STRING VALUE>\"},\"file_options\":{\"code_page\":\"<ADD STRING VALUE>\",\"has_header_row\":\"no\",\"column_delimiter\":\",\",\"date_format\":\"YYYY-MM-DD\",\"time_format\":\"HH:MM:SS\",\"timestamp_format\":\"YYYY-MM-DD HH:MM:SS\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/load_jobs", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/load_jobs   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"load_source":"SERVER","load_action":"INSERT","schema":"<ADD STRING VALUE>","table":"<ADD STRING VALUE>","max_row_count":0,"max_warning_count":1000,"cloud_source":{"endpoint":"<ADD STRING VALUE>","path":"<ADD STRING VALUE>","auth_id":"<ADD STRING VALUE>","auth_secret":"<ADD STRING VALUE>"},"server_source":{"file_path":"<ADD STRING VALUE>"},"file_options":{"code_page":"<ADD STRING VALUE>","has_header_row":"no","column_delimiter":",","date_format":"YYYY-MM-DD","time_format":"HH:MM:SS","timestamp_format":"YYYY-MM-DD HH:MM:SS"}}'

Response

Confirmation of load job created

Status Code

  • load jobs.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns details about a load job including its progress

Returns details about a load job including its progress.

GET /load_jobs/{id}

Request

Path Parameters

  • Load job ID

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/load_jobs/{id}"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/load_jobs/{id}")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/load_jobs/{id}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/load_jobs/{id}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/load_jobs/{id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Information about a data load job

Status Code

  • Data load job

  • Not authorized to access load job

  • Job not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Removes load job from history

Removes a data load job from history. This operation has no effect on the data already loaded. In-progress jobs cannot be deleted.

DELETE /load_jobs/{id}

Request

Path Parameters

  • Load job ID

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/load_jobs/{id}"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/load_jobs/{id}")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/load_jobs/{id}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/load_jobs/{id}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/load_jobs/{id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Load job deleted

  • Not authorized to delete load job

  • Job not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Downloads log file for a data load job

Downloads log file for a data load job

GET /load_jobs/{id}/log

Request

Path Parameters

  • Load job ID

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/load_jobs/{id}/log"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "file")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/load_jobs/{id}/log")
      .get()
      .addHeader("content-type", "file")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/load_jobs/{id}/log",
      "headers": {
        "content-type": "file",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "file",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/load_jobs/{id}/log", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/load_jobs/{id}/log   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: file'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Log file

  • Not authorized to access load log

  • Log not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Import to table from storage alias

POST /admin/tables/task/import_alias

Request

Data import job details.

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/task/import_alias"
    
    	payload := strings.NewReader("{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"file_format\":\"ORC\",\"exist\":false,\"new_data_type\":\"append\",\"columns\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}],\"max_warning_count\":1000,\"drop_temporary_table\":true}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"file_format\":\"ORC\",\"exist\":false,\"new_data_type\":\"append\",\"columns\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}],\"max_warning_count\":1000,\"drop_temporary_table\":true}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/task/import_alias")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/task/import_alias",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      table: '<ADD STRING VALUE>',
      schema: '<ADD STRING VALUE>',
      bucket_alias: '<ADD STRING VALUE>',
      obj_path: '<ADD STRING VALUE>',
      bucket_path: '<ADD STRING VALUE>',
      file_format: 'ORC',
      exist: false,
      new_data_type: 'append',
      columns: [
        {
          data_type: 'DECIMAL',
          length: 5,
          scale: {},
          column_name: 'COL_NAME',
          nullable: true
        }
      ],
      max_warning_count: 1000,
      drop_temporary_table: true
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"table\":\"<ADD STRING VALUE>\",\"schema\":\"<ADD STRING VALUE>\",\"bucket_alias\":\"<ADD STRING VALUE>\",\"obj_path\":\"<ADD STRING VALUE>\",\"bucket_path\":\"<ADD STRING VALUE>\",\"file_format\":\"ORC\",\"exist\":false,\"new_data_type\":\"append\",\"columns\":[{\"data_type\":\"DECIMAL\",\"length\":5,\"scale\":{},\"column_name\":\"COL_NAME\",\"nullable\":true}],\"max_warning_count\":1000,\"drop_temporary_table\":true}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/tables/task/import_alias", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/tables/task/import_alias   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"table":"<ADD STRING VALUE>","schema":"<ADD STRING VALUE>","bucket_alias":"<ADD STRING VALUE>","obj_path":"<ADD STRING VALUE>","bucket_path":"<ADD STRING VALUE>","file_format":"ORC","exist":false,"new_data_type":"append","columns":[{"data_type":"DECIMAL","length":5,"scale":{},"column_name":"COL_NAME","nullable":true}],"max_warning_count":1000,"drop_temporary_table":true}'

Response

Status Code

  • Import successfully

  • File not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Discover schema of object data from object storage alias

GET /admin/tables/import_alias/{alias_name}/objects/schema_discovery

Request

Path Parameters

  • Object storage alias to be used.

Query Parameters

  • Object path defined in object storage alias.

  • Additional path under object path.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/tables/import_alias/{alias_name}/objects/schema_discovery?obj_path=SOME_STRING_VALUE&additional_path=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/tables/import_alias/{alias_name}/objects/schema_discovery?obj_path=SOME_STRING_VALUE&additional_path=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/tables/import_alias/{alias_name}/objects/schema_discovery?obj_path=SOME_STRING_VALUE&additional_path=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/tables/import_alias/{alias_name}/objects/schema_discovery?obj_path=SOME_STRING_VALUE&additional_path=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/admin/tables/import_alias/{alias_name}/objects/schema_discovery?obj_path=SOME_STRING_VALUE&additional_path=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Discovered schema for the object data from the storage alias.

Status Code

  • Discover schema of object data from object storage alias successfully.

  • File not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns metadata of an item in the user's home storage

Returns metadata of an item files and folders stored in the user's home storage. Only support file with suffix '.csv','.txt','dat','crt' and 'del'.

GET /home/{path}

Request

Path Parameters

  • Path of a file or folder

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/home/{path}"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/home/{path}")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/home/{path}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/home/{path}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/home/{path}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Describes a file or folder.

Status Code

  • Metadata about a file or folder

  • File or folder not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Deletes a file in the user's home storage

Deletes a file in the user's home storage

DELETE /home/{path}

Request

Path Parameters

  • File path

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/home/{path}"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/home/{path}")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/home/{path}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/home/{path}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/home/{path}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • File deleted

  • Error payload

No Sample Response

This method does not specify any sample responses.

Download file from user's home storage

Download file from user's home storage.

GET /home_content/{path}

Request

Custom Headers

  • Allowable values: [application/json,application/octet-stream]

Path Parameters

  • File path

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/home_content/{path}"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/octet-stream")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/home_content/{path}")
      .get()
      .addHeader("content-type", "application/octet-stream")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/home_content/{path}",
      "headers": {
        "content-type": "application/octet-stream",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/octet-stream",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/home_content/{path}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/home_content/{path}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/octet-stream'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Describes a file or folder.

Status Code

  • Metadata about a file or folder

  • File not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Uploads a file to the user's home storage

Uploads a file to a folder under the user's home storage. The target folder is automatically created if it does not exit.

POST /home_content/{path}

Request

Path Parameters

  • Target folder

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/home_content/{path}"
    
    	req, _ := http.NewRequest("POST", url, nil)
    
    	req.Header.Add("content-type", "multipart/form-data")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/home_content/{path}")
      .post(null)
      .addHeader("content-type", "multipart/form-data")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/home_content/{path}",
      "headers": {
        "content-type": "multipart/form-data",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "multipart/form-data",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/home_content/{path}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/home_content/{path}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: multipart/form-data'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Describes a file or folder.

Status Code

  • Files successfully uploaded

  • Error payload

No Sample Response

This method does not specify any sample responses.

Executes SQL statements

Executes one or more SQL statements as a background job. This endpoint returns a job ID that can be used to retrieve the results.

POST /sql_jobs

Request

SQL script and execution options

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/sql_jobs"
    
    	payload := strings.NewReader("{\"commands\":\"select TABNAME, TABSCHEMA, OWNER from syscat.tables fetch first 5 rows only;select * from INVALID_TABLE fetch first 5 rows only;\",\"limit\":10,\"separator\":\";\",\"stop_on_error\":\"no\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"commands\":\"select TABNAME, TABSCHEMA, OWNER from syscat.tables fetch first 5 rows only;select * from INVALID_TABLE fetch first 5 rows only;\",\"limit\":10,\"separator\":\";\",\"stop_on_error\":\"no\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/sql_jobs")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/sql_jobs",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      commands: 'select TABNAME, TABSCHEMA, OWNER from syscat.tables fetch first 5 rows only;select * from INVALID_TABLE fetch first 5 rows only;',
      limit: 10,
      separator: ';',
      stop_on_error: 'no'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"commands\":\"select TABNAME, TABSCHEMA, OWNER from syscat.tables fetch first 5 rows only;select * from INVALID_TABLE fetch first 5 rows only;\",\"limit\":10,\"separator\":\";\",\"stop_on_error\":\"no\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/sql_jobs", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/sql_jobs   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"commands":"select TABNAME, TABSCHEMA, OWNER from syscat.tables fetch first 5 rows only;select * from INVALID_TABLE fetch first 5 rows only;","limit":10,"separator":";","stop_on_error":"no"}'

Response

Status Code

  • SQL execution job

  • Error payload

No Sample Response

This method does not specify any sample responses.

Fetches partial results of a SQL job execution

Returns the current status of a SQL job execution along with any results of SQL statements that have already been executed. Clients are supposed to poll this endpoint until the status returned is either 'completed', which indicates all SQL statements have completed executing, or 'failed', which indicates the job failed to execute and therefore is considered terminated. The returned list of results is not cumulative. That means, results that were fetched in a previous call will not be returned again, only new results (i.e. that were not fetched yet) will be included. For example, assuming a job with 10 SQL statements, the first call returns status "running" and 6 results, the second call returns status "running" and an empty list of results, a third call status "completed" and 4 results. Any subsequent calls would return status "completed" and an empty list of results.

GET /sql_jobs/{id}

Request

Path Parameters

  • ID of the SQL execution job

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/sql_jobs/{id}"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/sql_jobs/{id}")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/sql_jobs/{id}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/sql_jobs/{id}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/sql_jobs/{id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Contains the results of executing the SQL statements associated with a SQL execution job

Status Code

  • Result of a SQL job

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the results of a SQL query to CSV

Executes the specified SQL query and returns the data as a CSV file. The amount of data returned is limited to 100,000 rows.

POST /sql_query_export

Request

The SQL query to be executed

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/sql_query_export"
    
    	payload := strings.NewReader("{\"command\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "text/csv")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"command\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/sql_query_export")
      .post(body)
      .addHeader("content-type", "text/csv")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/sql_query_export",
      "headers": {
        "content-type": "text/csv",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({command: '<ADD STRING VALUE>'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"command\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "text/csv",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/sql_query_export", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/sql_query_export   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: text/csv'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"command":"<ADD STRING VALUE>"}'

Response

Status Code

  • CSV file containing query results

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns overall status of system components

Returns overall status of system components.

GET /monitor

Request

Custom Headers

  • Database profile name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/monitor"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/monitor")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/monitor",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/monitor", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/monitor   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Services status

Status Code

  • System status

  • Operation is only available to administrators

  • Error payload

No Sample Response

This method does not specify any sample responses.

Return the average response time for a specified time frame. **DB ADMIN ONLY**

Return the average response time for a specified time frame.

GET /metrics/average_response_time

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/average_response_time?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/average_response_time?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/average_response_time?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/average_response_time?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/average_response_time?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Event monitor stats top.

Status Code

  • Return the average response time for a specified time frame.

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the average number of statements executed every minutes for a specified time frame. **DB ADMIN ONLY**

Return the average number of statements executed every minutes for a specified time frame.

GET /metrics/average_statements_rate

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/average_statements_rate?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/average_statements_rate?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/average_statements_rate?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/average_statements_rate?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/average_statements_rate?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

SQL rate(sql/min).

Status Code

  • Return the average number of statements executed every minutes for a specified time frame

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the average number of rows read(rows/min) for a specified time frame. **DB ADMIN ONLY**

Return the average number of rows read(rows/min) for a specified time frame.

GET /metrics/average_rows_read

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/average_rows_read?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/average_rows_read?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/average_rows_read?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/average_rows_read?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/average_rows_read?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Rows read(rows/min).

Status Code

  • Return the average number of rows read(rows/min) for a specified time frame.

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the numbers of rows read(rows/min) for a specified time frame. **DB ADMIN ONLY**

Return the numbers of rows read(rows/min) for a specified time frame.

GET /metrics/rows_read

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/rows_read?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/rows_read?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/rows_read?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/rows_read?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/rows_read?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of rows read(rows/min).

Status Code

  • Return the numbers of rows read(rows/min) for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the maximum number of concurrent connections for a specified time frame **DB ADMIN ONLY**

Return the maximum number of concurrent connections for a specified time frame

GET /metrics/max_connections_count

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/max_connections_count?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/max_connections_count?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/max_connections_count?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/max_connections_count?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/max_connections_count?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

The maximum connections count.

Status Code

  • Return the maximum number of concurrent connections for a specified time frame end

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return maximum numbers of concurrent connections for a specified time frame. **DB ADMIN ONLY**

Return maximum numbers of concurrent connections for a specified time frame.

GET /metrics/connections_count

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/connections_count?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/connections_count?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/connections_count?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/connections_count?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/connections_count?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of connection count.

Status Code

  • Return maximum numbers of concurrent connections for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the maximum lockwaits per minute for a specified time frame. **DB ADMIN ONLY**

Return the maximum lockwaits per minute for a specified time frame.

GET /metrics/max_lockwaits_rate

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/max_lockwaits_rate?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/max_lockwaits_rate?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/max_lockwaits_rate?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/max_lockwaits_rate?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/max_lockwaits_rate?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

The maximum lockwaits rate(lockwaits/min).

Status Code

  • Return the maximum lockwaits per minute for a specified time frame

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the maximum lockwaits per minute for a specified time frame. **DB ADMIN ONLY**

Return the maximum lockwaits per minute for a specified time frame.

GET /metrics/lockwaits_rate

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/lockwaits_rate?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/lockwaits_rate?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/lockwaits_rate?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/lockwaits_rate?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/lockwaits_rate?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of lockwaits rate(lockwaits/min).

Status Code

  • Return the maximum lockwaits per minute for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the maximum usage percentage of logs for a specified time frame. **DB ADMIN ONLY**

Return the maximum usage percentage of logs for a specified time frame.

GET /metrics/max_log_space

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/max_log_space?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/max_log_space?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/max_log_space?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/max_log_space?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/max_log_space?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

The maximum log space.

Status Code

  • Return the maximum usage percentage of logs for a specified time frame.

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the maximum usage percentages of logs for a specified time frame. **DB ADMIN ONLY**

Return the maximum usage percentages of logs for a specified time frame.

GET /metrics/log_space

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/log_space?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/log_space?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/log_space?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/log_space?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/log_space?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of LogSpace.

Status Code

  • Return the maximum usage percentages of logs in for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the maximum percent of node CPU usage for a specified time frame. **DB ADMIN ONLY**

Return the maximum percent of node CPU usage for a specified time frame.

GET /metrics/max_cpu

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/max_cpu?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/max_cpu?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/max_cpu?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/max_cpu?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/max_cpu?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of CPU.

Status Code

  • Return the maximum percent of node CPU usage for a specified time frame.

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the percent of node CPU usage for a specified time frame. **DB ADMIN ONLY**

Return the percent of node CPU usage for a specified time frame.

GET /metrics/cpu_summary

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/cpu_summary?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/cpu_summary?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/cpu_summary?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/cpu_summary?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/cpu_summary?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of CPU.

Status Code

  • Return the percent of node CPU usage for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the maximum percent of node memory usage for a specified time frame. **DB ADMIN ONLY**

Return the maximum percent of node memory usage for a specified time frame.

GET /metrics/max_memory

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/max_memory?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/max_memory?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/max_memory?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/max_memory?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/max_memory?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of Memory.

Status Code

  • Return the maximum percent of node memory usage for a specified time frame.

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the percent of node memory usage for a specified time frame. **DB ADMIN ONLY**

Return the percent of node memory usage for a specified time frame.

GET /metrics/memory_summary

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory_summary?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory_summary?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory_summary?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory_summary?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory_summary?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of Memory.

Status Code

  • Return the percent of memory usage in each node for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the time spent in each operation for a specified time frame. **DB ADMIN ONLY**

Return the time spent in each operation for a specified time frame.

GET /metrics/timespent

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/timespent?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/timespent?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/timespent?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/timespent?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/timespent?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Timespent.

Status Code

  • Return the time spent in each operation for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Returns performance metrics for schemas **DB ADMIN ONLY**

Returns performance metrics for schemas. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/schemas

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system schemas in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of Sechmas

Status Code

  • returns performance of schemas

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of blocking transactions. **DB ADMIN ONLY**

Returns a list of hisoty blocking transactions. Only return the last locked objects with waiting connections. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/locking/blocking_and_waiting_connections

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Field to filter by holder application name.

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/blocking_and_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/blocking_and_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of blocking and waiting connections

Status Code

  • Returns the blocking transactions

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of blocking transactions. **DB ADMIN ONLY**

Returns a list of current blocking transactions. Only return the last collected blocking transactions. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/locking/blocking_and_waiting_connections/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Field to filter by holder application name.

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/current/list?limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/current/list?limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/blocking_and_waiting_connections/current/list?limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/blocking_and_waiting_connections/current/list?limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/current/list?limit=100&offset=0&holder_application_name=SOME_STRING_VALUE&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of blocking and waiting connections

Status Code

  • Returns the blocking transactions

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the blocking transactions. **DB ADMIN ONLY**

Returns the blocking transactions.

GET /metrics/locking/blocking_and_waiting_connections/holder/{application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/holder/{application_handle}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/holder/{application_handle}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/blocking_and_waiting_connections/holder/{application_handle}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/blocking_and_waiting_connections/holder/{application_handle}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/holder/{application_handle}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Returns the blocking transactions.

Status Code

  • Returns the blocking transactions

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the waiting transactions. **DB ADMIN ONLY**

Returns the waiting transactions.

GET /metrics/locking/blocking_and_waiting_connections/waiter/{application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/waiter/{application_handle}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/waiter/{application_handle}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/blocking_and_waiting_connections/waiter/{application_handle}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/blocking_and_waiting_connections/waiter/{application_handle}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/blocking_and_waiting_connections/waiter/{application_handle}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Returns the blocking transactions.

Status Code

  • Returns the blocking transactions

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of history locked objects with waiting connections. **DB ADMIN ONLY**

Returns a list of history locked objects with waiting connections. Only return the last locked objects with waiting connections. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/locking/locked_objects_with_waiting_connections

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of locked objects with waiting connections data

Status Code

  • Returns the locked objects with waiting connections

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current locked objects with waiting connections. **DB ADMIN ONLY**

Returns a list of current locked objects with waiting connections. Only return the last locked objects with waiting connections. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/locking/locked_objects_with_waiting_connections/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/current/list?limit=100&offset=0&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/current/list?limit=100&offset=0&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/current/list?limit=100&offset=0&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/current/list?limit=100&offset=0&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/current/list?limit=100&offset=0&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of locked objects with waiting connections data

Status Code

  • Returns the locked objects with waiting connections

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the locked objects with waiting connections. **DB ADMIN ONLY**

Returns the locked objects with waiting connections.

GET /metrics/locking/locked_objects_with_waiting_connections/{hld_application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/{hld_application_handle}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/{hld_application_handle}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/{hld_application_handle}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/{hld_application_handle}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/locked_objects_with_waiting_connections/{hld_application_handle}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Returns the locked objects with waiting connections.

Status Code

  • Returns the locked objects with waiting connections

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of history locked objects

Returns a list of history locked objects. Only return the last locked objects.

GET /metrics/locking/find_locked_objects

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/find_locked_objects?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/find_locked_objects?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of locked ojbects data

Status Code

  • Returns the locked objects

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current locked objects

Returns a list of current locked objects. Only return the last locked objects.

GET /metrics/locking/find_locked_objects/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects/current/list?limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects/current/list?limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/find_locked_objects/current/list?limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/find_locked_objects/current/list?limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects/current/list?limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of locked ojbects data

Status Code

  • Returns the locked objects

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the locked objects

Returns the locked objects.

GET /metrics/locking/find_locked_objects/{application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects/{application_handle}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects/{application_handle}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/find_locked_objects/{application_handle}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/find_locked_objects/{application_handle}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/find_locked_objects/{application_handle}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Returns the locked objects.

Status Code

  • Returns the locked objects

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a summary of event monitoring locking

Returns a summary of event monitoring locking.

GET /metrics/locking/evmon_locking

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • Used to filter by holder_application_name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/evmon_locking?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/evmon_locking?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of event monitor locking

Status Code

  • Returns event monitor locking with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current event monitor locking

Returns a list of current event monitor locking. Only return the last collected event monitor locking.

GET /metrics/locking/evmon_locking/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • Used to filter by holder_application_name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking/current/list?limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking/current/list?limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/evmon_locking/current/list?limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/evmon_locking/current/list?limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking/current/list?limit=100&offset=0&sort=-holder_sql_hash_id&holder_application_name=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

current event monitor locking

Status Code

  • Returns event monitor locking with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns an event monitor locking detail

Returns an event monitor locking detail

GET /metrics/locking/evmon_locking/event_id/{id}/holder_member/{member}/waiter_member/{w_member}/holder_application_handle/{handle}/waiter_application_handle/{w_handle}/holder_activity_id/{h_id}/waiter_activity_id/{w_id}/event_timestamp/{timestamp}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the locking event.

  • Holder member.

  • Waiter member.

  • Holder application handle.

  • Waiter application handle.

  • Holder activity ID.

  • Waiter activity ID.

  • Event timestamp.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking/event_id/{id}/holder_member/{member}/waiter_member/{w_member}/holder_application_handle/{handle}/waiter_application_handle/{w_handle}/holder_activity_id/{h_id}/waiter_activity_id/{w_id}/event_timestamp/{timestamp}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking/event_id/{id}/holder_member/{member}/waiter_member/{w_member}/holder_application_handle/{handle}/waiter_application_handle/{w_handle}/holder_activity_id/{h_id}/waiter_activity_id/{w_id}/event_timestamp/{timestamp}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/locking/evmon_locking/event_id/{id}/holder_member/{member}/waiter_member/{w_member}/holder_application_handle/{handle}/waiter_application_handle/{w_handle}/holder_activity_id/{h_id}/waiter_activity_id/{w_id}/event_timestamp/{timestamp}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/locking/evmon_locking/event_id/{id}/holder_member/{member}/waiter_member/{w_member}/holder_application_handle/{handle}/waiter_application_handle/{w_handle}/holder_activity_id/{h_id}/waiter_activity_id/{w_id}/event_timestamp/{timestamp}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/locking/evmon_locking/event_id/{id}/holder_member/{member}/waiter_member/{w_member}/holder_application_handle/{handle}/waiter_application_handle/{w_handle}/holder_activity_id/{h_id}/waiter_activity_id/{w_id}/event_timestamp/{timestamp}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

event monitor locking details

Status Code

  • Returns event monitor locking details with the specific profile name and locking event id, holder member, waiter member, holder activity id, waiter activity id, event timestamp

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Return the number of statements for a specified time frame. **DB ADMIN ONLY**

Return the number of statements for a specified time frame.

GET /metrics/statements_count

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements_count?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements_count?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements_count?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements_count?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements_count?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Number of statements.

Status Code

  • Return the number of statements for a specified time frame.

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return numbers of statements executed every minutes for a specified time frame. **DB ADMIN ONLY**

Return numbers of statements executed every minutes for a specified time frame.

GET /metrics/statements_rate

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements_rate?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements_rate?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements_rate?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements_rate?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements_rate?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of SQL rate(sql/min).

Status Code

  • Return numbers of statements executed every minutes for a specified time frame

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Returns a list of inflight executions

Returns a list of inflight executions.Only returns the same statement once and the last collected one between start and end.

GET /metrics/statements/inflight_executions

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offset should be set together.

    Default: 100

  • The starting position of return records. Limit and offset should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by statement text

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/inflight_executions?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/inflight_executions?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/inflight_executions?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/inflight_executions?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/inflight_executions?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of in flight execution data

Status Code

  • Returns a list of inflight executions name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current inflight executions

Returns a list of current inflight executions

GET /metrics/statements/inflight_executions/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offset should be set together.

    Default: 100

  • The starting position of return records. Limit and offset should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by statement text

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/inflight_executions/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/inflight_executions/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/inflight_executions/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/inflight_executions/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/inflight_executions/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&stmt_text=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-entry_time'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of in flight execution data

Status Code

  • Returns a list of current inflight executions

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance of package cache **DB ADMIN ONLY**

Returns the performance data of package cache. If there are multiple collections. They’ll been aggregated by average.

GET /metrics/statements/package_cache

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • field to set if include system queries in the return list. By default, false.

    Default: false

  • field to set the amount of return records.

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • returns average data or summary data. By default, false.

  • Field to filter by statement text.

  • Field to filter by stmtid.

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/package_cache?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/package_cache?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of package cache

Status Code

  • Returns performance of package cache

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns current performance of package cache **DB ADMIN ONLY**

Returns the current performance data of package cache.

GET /metrics/statements/package_cache/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • field to set if include system tables in the return list. By default, false.

    Default: false

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • returns average data or summary data. By default, false.

  • Field to filter by statement text.

  • Field to filter by stmtid.

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/current/list?include_sys=false&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/current/list?include_sys=false&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/package_cache/current/list?include_sys=false&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/package_cache/current/list?include_sys=false&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/current/list?include_sys=false&limit=100&offset=0&is_average=SOME_BOOLEAN_VALUE&stmt_text=SOME_STRING_VALUE&stmtid=SOME_INTEGER_VALUE&sort=-stmt_exec_time_ms'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of package cache

Status Code

  • Returns performance of package cache

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance of one sql in package cache **DB ADMIN ONLY**

Returns the performance data of one sql in package cache. If there are multiple collections. They’ll been aggregated by average.

GET /metrics/statements/package_cache/{sql_hash_id}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • sql hash id

Query Parameters

  • Start timestamp.

  • End timestamp.

  • returns average data or summary data. By default, false.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Package cache

Status Code

  • Returns performance of one sql in package cache

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the time series performance data. **DB ADMIN ONLY**

Returns the time series performance data of one sql in package cache.

GET /metrics/statements/package_cache/{sql_hash_id}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • sql hash id

Query Parameters

  • Start timestamp.

  • End timestamp.

  • returns average data or summary data. By default, false.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}/timeseries?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}/timeseries?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}/timeseries?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}/timeseries?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/package_cache/{sql_hash_id}/timeseries?start=1546272000000&end=1546272300000&is_average=SOME_BOOLEAN_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of package cache time series data.

Status Code

  • Returns the performance date of one sql in package cache

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of event monitor activities **DB ADMIN ONLY**

Returns a list of event monitor activities.

GET /metrics/statements/evmon_activity

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by statement text

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/evmon_activity?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/evmon_activity?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of event monitor activity

Status Code

  • Returns event monitor activities with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of event monitor activities group by a specific field **DB ADMIN ONLY**

Returns a list of event monitor activities group by a specific field.

GET /metrics/statements/evmon_activity/groupby/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Used to group by the given field. The name of given field can be found from the response. Note: only support one field each time.

  • Returns average data or summary data. By default, false. Note: This option should be provided along with "groupby_id" option.

  • Start timestamp.

  • End timestamp.

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by statement text

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/evmon_activity/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/evmon_activity/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of event monitor activity

Status Code

  • Returns event monitor activities with the specific profile name group by a specific field

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current event monitor activities **DB ADMIN ONLY**

Returns a list of current event monitor activities. Only return the last collected event monitor activities.

GET /metrics/statements/evmon_activity/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by statement text

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/current/list?include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/current/list?include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/evmon_activity/current/list?include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/evmon_activity/current/list?include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/current/list?include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

current event monitor activities

Status Code

  • Returns event monitor activity with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current event monitor activities group by a specific field **DB ADMIN ONLY**

Returns a list of current event monitor activities group by a specific field. Only return the last collected event monitor activities.

GET /metrics/statements/evmon_activity/current/list/groupby/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Used to group by the given field. The name of given field can be found from the response. Note: only support one field each time.

  • Returns average data or summary data. By default, false. Note: This option should be provided along with "groupby_id" option.

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by statement text

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/current/list/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/current/list/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/evmon_activity/current/list/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/evmon_activity/current/list/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/current/list/groupby/list?groupby_id=SOME_STRING_VALUE&is_average=SOME_BOOLEAN_VALUE&include_sys=false&limit=100&offset=0&address=SOME_STRING_VALUE&sql_text=SOME_STRING_VALUE&appl_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-service_subclass_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

current event monitor activities

Status Code

  • Returns event monitor activity with the specific profile name group by a specific field

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns an event monitor activity detail **DB ADMIN ONLY**

Returns an event monitor activity detail

GET /metrics/statements/evmon_activity/{application_handle}/uow/{uow_id}/activity/{activity_id}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

  • The unit of work identifier.

  • A system-wide unique ID for the activity.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/{application_handle}/uow/{uow_id}/activity/{activity_id}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/{application_handle}/uow/{uow_id}/activity/{activity_id}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/evmon_activity/{application_handle}/uow/{uow_id}/activity/{activity_id}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/evmon_activity/{application_handle}/uow/{uow_id}/activity/{activity_id}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/evmon_activity/{application_handle}/uow/{uow_id}/activity/{activity_id}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

event monitor activities details

Status Code

  • Returns event monitor activity details with the specific profile name and specific activity id

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of stored procedures

Returns a list of stored procedures. If there are multiple collections, they are aggregated.

GET /metrics/statements/stored_procedures

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Field to filter by routine schema.

  • Field to filter by routine name.

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/stored_procedures?start=1546272000000&end=1546272300000&limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/stored_procedures?start=1546272000000&end=1546272300000&limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/stored_procedures?start=1546272000000&end=1546272300000&limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/stored_procedures?start=1546272000000&end=1546272300000&limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/stored_procedures?start=1546272000000&end=1546272300000&limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of stored procedures data

Status Code

  • Returns the stored procedures

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current stored procedures

Returns a list of current stored procedures. Only return the last collected stored procedures. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/statements/stored_procedures/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Field to filter by routine schema.

  • Field to filter by routine name.

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/statements/stored_procedures/current/list?limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/statements/stored_procedures/current/list?limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/statements/stored_procedures/current/list?limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/statements/stored_procedures/current/list?limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/statements/stored_procedures/current/list?limit=100&offset=0&routine_schema=SOME_STRING_VALUE&routine_name=SOME_STRING_VALUE&sort=-routine_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of stored procedures data

Status Code

  • Returns the stored procedures

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a infight execution detail

Returns a infight execution detail. Only returns the last one between start and end

GET /metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

  • The unit of work identifier.

  • Counter which uniquely identifies an activity for an application within a given unit of work.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

inflight statement Execution details

Status Code

  • Returns a infight execution detail

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Terminates a statement **DB ADMIN ONLY**

Terminates a statement

DELETE /metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

  • The unit of work identifier.

  • Counter which uniquely identifies an activity for an application within a given unit of work.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/inflight_executions/{activity_id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Connection terminated

  • Operation is only available to administrators

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of connections

Returns a list of connections. Each connection represents a row. If there are multiple collections. They'll been aggregated averagely.

GET /metrics/applications/connections

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offset should be set together.

    Default: 100

  • The starting position of return records. Limit and offset should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/connections?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/connections?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/connections?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/connections?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/connections?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of application connections

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current connections

Returns a list of current connections. Only return the last collected connections. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/applications/connections/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system statements in the return list

    Default: false

  • The amount of return records. Limit and offset should be set together.

    Default: 100

  • The starting position of return records. Limit and offset should be set together

    Default: 0

  • Used to filter by IP address

  • Used to filter by application_name

  • Used to filter by session_auth_id

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/connections/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/connections/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/current/list?include_sys=false&limit=100&offset=0&client_ipaddr=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&session_auth_id=SOME_STRING_VALUE&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of application connections

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a connection detail

Returns a connection detail

GET /metrics/applications/connections/{application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/connections/{application_handle}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/connections/{application_handle}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

application connections

Status Code

  • Returns connection details with the specific profile name and specific application handle

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Terminates a database connection **DB ADMIN ONLY**

Terminates an active database connection.

DELETE /metrics/applications/connections/{application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Application handle name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/connections/{application_handle}",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/metrics/applications/connections/{application_handle}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Connection terminated

  • Operation is only available to administrators

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of timeseries of a connection

Returns a list of timeseries of a connection. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/applications/connections/{application_handle}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/connections/{application_handle}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/connections/{application_handle}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/connections/{application_handle}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of application connections

Status Code

  • Returns connection details of timeseries with the specific profile name and specific application handle

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of units of works **DB ADMIN ONLY**

Returns a list of units of works.

GET /metrics/applications/uow

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system unit of works in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to filter by application_handle

  • Used to filter by application_name

  • Used to filter by workload_occurrence_state

  • Used to sort by application_handle, application_name, workload_occurrence_state. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/uow?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/uow?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/uow?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/uow?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/uow?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of tables

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current connections **DB ADMIN ONLY**

Returns a list of current units of works.

GET /metrics/applications/uow/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system unit of works in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to filter by application_handle

  • Used to filter by application_name

  • Used to filter by workload_occurrence_state

  • Used to sort by application_handle, application_name, workload_occurrence_state. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/uow/current/list?include_sys=false&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/uow/current/list?include_sys=false&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/uow/current/list?include_sys=false&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/uow/current/list?include_sys=false&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/uow/current/list?include_sys=false&limit=100&offset=0&application_handle=SOME_STRING_VALUE&application_name=SOME_STRING_VALUE&workload_occurrence_state=SOME_STRING_VALUE&sort=-application_handle'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of in flight execution data

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a units of works detail **DB ADMIN ONLY**

Returns list of units of works of specific id under a specific application.

GET /metrics/applications/{application_handle}/uow/{uow_id}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

  • The unit of work identifier.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

application units of works List

Status Code

  • Returns a infight execution detail

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a units of works detail **DB ADMIN ONLY**

Returns list of units of works of specific id under a specific application. aggregated by member.

GET /metrics/applications/{application_handle}/uow/{uow_id}/members

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

  • The unit of work identifier.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/{application_handle}/uow/{uow_id}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance list

Status Code

  • Returns a infight execution detail

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a summary of event monitoring utility

Returns a summary of event monitoring utility.

GET /metrics/applications/evmon_utility

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • Used to filter by utility_type

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/evmon_utility?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/evmon_utility?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of event monitor utility

Status Code

  • Returns event monitor utility with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current event monitor utility

Returns a list of current event monitor utility. Only return the last collected event monitor utility.

GET /metrics/applications/evmon_utility/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • Used to filter by utility_type

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility/current/list?limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility/current/list?limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/evmon_utility/current/list?limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/evmon_utility/current/list?limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility/current/list?limit=100&offset=0&sort=-utility_invocation_id&utility_type=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

current event monitor utility

Status Code

  • Returns event monitor utility with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns an event monitor utility detail

Returns an event monitor utility detail

GET /metrics/applications/evmon_utility/utility_invocation_id/{utility_invocation_id}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Utility invocation ID.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility/utility_invocation_id/{utility_invocation_id}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility/utility_invocation_id/{utility_invocation_id}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/evmon_utility/utility_invocation_id/{utility_invocation_id}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/evmon_utility/utility_invocation_id/{utility_invocation_id}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/evmon_utility/utility_invocation_id/{utility_invocation_id}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

event monitor utility details

Status Code

  • Returns event monitor utlity details with the specific profile name and utility invocation ID

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a summary of the current top consumer metrics detail

Returns top consumer for 20 metrics, including their basic information, max value, avg value without max, and its rank.

GET /metrics/applications/topconsumer/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system objects in the return list, the default value is true.

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/current/list?include_sys=SOME_STRING_VALUE&limit=100&offset=0"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/current/list?include_sys=SOME_STRING_VALUE&limit=100&offset=0")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/topconsumer/current/list?include_sys=SOME_STRING_VALUE&limit=100&offset=0",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/topconsumer/current/list?include_sys=SOME_STRING_VALUE&limit=100&offset=0", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/current/list?include_sys=SOME_STRING_VALUE&limit=100&offset=0'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of topconsumer list

Status Code

  • Returns 20 metrics information for top consumers

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a summary of historical top consumers during a time period

Returns 20 metrics historical top consumers during the time scope. For each resource its hightest value, timestamp and other informations are recorded.

GET /metrics/applications/topconsumer/

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/?start=1546272000000&end=1546272300000&limit=100&offset=0"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/?start=1546272000000&end=1546272300000&limit=100&offset=0")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/topconsumer/?start=1546272000000&end=1546272300000&limit=100&offset=0",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/topconsumer/?start=1546272000000&end=1546272300000&limit=100&offset=0", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/?start=1546272000000&end=1546272300000&limit=100&offset=0'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of topconsumer list

Status Code

  • Returns historical top consumers metrics

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of timeseries of certain metric's top consumers

Returns a list of timeseries of certain metric's top consumers.

GET /metrics/applications/topconsumer/{category}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Category name.

    Allowable values: [bottleCpu,bottleDirectReads,bottleDirectWrites,bottleNumLocks,bottleLockWait,bottleSorts,bottleSortOverflows,bottleSortTime,bottleLogSpace,bottleRowsRead,bottleRowsMod,bottleRowsReturned,bottleElapsedTime,bottleFcmRw,bottleQueryCost,bottleMemory,bottleWlmQTime,bottleFedRowsRead,bottleFedWaitTime,bottleFedWaitTotal]

Query Parameters

  • Start timestamp.

  • End timestamp.

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/bottleCpu/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/bottleCpu/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/applications/topconsumer/bottleCpu/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/applications/topconsumer/bottleCpu/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/applications/topconsumer/bottleCpu/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of topconsumer list

Status Code

  • Returns a time series list for this categories metric

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Lists active database connections **DB ADMIN ONLY**

Returns a list of active database connections.

GET /monitor/connections

Request

Custom Headers

  • Database profile name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/monitor/connections"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/monitor/connections")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/monitor/connections",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/monitor/connections", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/monitor/connections   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of active database connections

Status Code

  • Active connections

  • Operation is only available to administrators

  • Error payload

No Sample Response

This method does not specify any sample responses.

Terminates a database connection **DB ADMIN ONLY**

Terminates an active database connection.

DELETE /monitor/connections/{application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Application handle name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/monitor/connections/{application_handle}"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/monitor/connections/{application_handle}")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/monitor/connections/{application_handle}",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/monitor/connections/{application_handle}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/monitor/connections/{application_handle}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Connection terminated

  • Operation is only available to administrators

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of member summary **DB ADMIN ONLY**

Returns a list of member sumaary.

GET /metrics/throughput/partition_summary

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to filter by member

  • Used to sort by member. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Member summary list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a current list of member summary **DB ADMIN ONLY**

Returns a list of current member summary.

GET /metrics/throughput/partition_summary/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system tables in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to filter by member

  • Used to sort by member. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/current/list?include_sys=false&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/current/list?include_sys=false&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_summary/current/list?include_sys=false&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_summary/current/list?include_sys=false&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/current/list?include_sys=false&limit=100&offset=0&member=SOME_STRING_VALUE&sort=-member'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of in flight execution data

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a current list of member summary of a specific member. **DB ADMIN ONLY**

Returns a list of member summary.One return secific application and member.

GET /metrics/throughput/partition_summary/{member}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The member identifier.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/{member}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/{member}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_summary/{member}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_summary/{member}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/{member}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of member summary

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a time series list of member summary of a specific member. **DB ADMIN ONLY**

Returns a time series list of member summary.

GET /metrics/throughput/partition_summary/{member}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The member identifier.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/{member}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/{member}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_summary/{member}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_summary/{member}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_summary/{member}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Member summary list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of wlm workload summary **DB ADMIN ONLY**

Returns a list of wlm workload summary.

GET /metrics/throughput/wlm_workload_summary

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to filter by workload names

  • Used to sort by workload_name. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_workload_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_workload_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of WLM workload summary

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of wlm workload summary of a specific workload name. **DB ADMIN ONLY**

Returns a list of wlm workload summary.

GET /metrics/throughput/wlm_workload_summary/{workload_name}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Used to filter by workload names

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

application WLM workload summary list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a current list of wlm workload summary . **DB ADMIN ONLY**

Returns a list of wlm workload summary.

GET /metrics/throughput/wlm_workload_summary/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to filter by workload names

  • Used to sort by workload_name. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/current/list?limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/current/list?limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_workload_summary/current/list?limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_workload_summary/current/list?limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/current/list?limit=100&offset=0&workload_name=SOME_STRING_VALUE&sort=-workload_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of in flight execution data

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of wlm workload summary of a specific workload name.aggregated by member. **DB ADMIN ONLY**

Returns a list of wlm workload summary.

GET /metrics/throughput/wlm_workload_summary/{workload_name}/members

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The workload name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of wlm workload summary of a specific workload name. **DB ADMIN ONLY**

Returns a list of wlm workload summary.

GET /metrics/throughput/wlm_workload_summary/{workload_name}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The workload name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_workload_summary/{workload_name}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of WLM service class summary **DB ADMIN ONLY**

Returns a list of WLM service class summary

GET /metrics/throughput/wlm_service_class_summary

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to filter by service_superclass_name

  • Used to filter by service_subclass_name

  • Used to sort by service_superclass_name,service_subclass_nam. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_service_class_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_service_class_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary?start=1546272000000&end=1546272300000&limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of WLM workload summary

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a current list of wlm service class summary **DB ADMIN ONLY**

Returns a current list of wlm service class summary

GET /metrics/throughput/wlm_service_class_summary/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to filter by service_superclass_name

  • Used to filter by service_subclass_name

  • Used to sort by service_superclass_name, service_subclass_name. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/current/list?limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/current/list?limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_service_class_summary/current/list?limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_service_class_summary/current/list?limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/current/list?limit=100&offset=0&service_superclass_name=SOME_STRING_VALUE&service_subclass_name=SOME_STRING_VALUE&sort=-service_subclass_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of in flight execution data

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of WLM service class summary of specific wlm_service_class_summary and service_subclass_name **DB ADMIN ONLY**

Returns a list of WLM service class summary of specific wlm_service_class_summary and service_subclass_name

GET /metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The service_subclass_name.

  • The service superclass name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

application WLM service class summary list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of WLM service class summary of specific wlm_service_class_summary and service_subclass_name. **DB ADMIN ONLY**

Returns a list of WLM service class summary of specific wlm_service_class_summary and service_subclass_name.

GET /metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/members

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The service superclass name.

  • The service subclass name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of WLM service class summary of specific wlm_service_class_summary and service_subclass_name. **DB ADMIN ONLY**

Returns a list of WLM service class summary of specific wlm_service_class_summary and service_subclass_name.

GET /metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The service superclass name.

  • The service subclass name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/wlm_service_class_summary/service_superclass/{service_superclass_name}/service_subclass/{service_subclass_name}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance list

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of database member skew

Returns a list of database member skew

GET /metrics/throughput/partition_skew

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • The amount of return records. Limit and offest should be set together.

    Default: 100

  • The starting position of return records. Limit and offest should be set together

    Default: 0

  • Used to sort by member.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-total_cpu_time"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-total_cpu_time")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_skew?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-total_cpu_time",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_skew?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-total_cpu_time", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-total_cpu_time'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of partition skew data

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a current list of database member skew of specific member

Returns a list of database member skew of specific member.

GET /metrics/throughput/partition_skew/{member}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Used to filter by member

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/{member}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/{member}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_skew/{member}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_skew/{member}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/{member}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

partition skew

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a current list of member summary

Returns a current list of member summary

GET /metrics/throughput/partition_skew/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to sort by member.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/current/list?limit=100&offset=0&sort=-total_cpu_time"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/current/list?limit=100&offset=0&sort=-total_cpu_time")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_skew/current/list?limit=100&offset=0&sort=-total_cpu_time",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_skew/current/list?limit=100&offset=0&sort=-total_cpu_time", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/current/list?limit=100&offset=0&sort=-total_cpu_time'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of partition skew data

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a current list of database member skew of specific member

Returns a list of database member skew of specific member.

GET /metrics/throughput/partition_skew/{member}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Used to filter by member

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/{member}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/{member}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/partition_skew/{member}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/partition_skew/{member}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/partition_skew/{member}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of partition skew data

Status Code

  • Returns Connections with the specific profile name

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

getConnectionSummaryHistory

GET /metrics/throughput/connectionsummary

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to sort

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/connectionsummary?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/connectionsummary?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Error payload

No Sample Response

This method does not specify any sample responses.

getConnectionSummaryRealTime

GET /metrics/throughput/connectionsummary/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to sort

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/current/list?limit=100&offset=0&sort=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/current/list?limit=100&offset=0&sort=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/connectionsummary/current/list?limit=100&offset=0&sort=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/connectionsummary/current/list?limit=100&offset=0&sort=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/current/list?limit=100&offset=0&sort=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Error payload

No Sample Response

This method does not specify any sample responses.

showApplicationHandleDetail

GET /metrics/throughput/connectionsummary/{application_handle}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • application_handle

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}?start=1546272000000&end=1546272300000&limit=100&offset=0"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}?start=1546272000000&end=1546272300000&limit=100&offset=0")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}?start=1546272000000&end=1546272300000&limit=100&offset=0",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}?start=1546272000000&end=1546272300000&limit=100&offset=0", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}?start=1546272000000&end=1546272300000&limit=100&offset=0'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Error payload

No Sample Response

This method does not specify any sample responses.

showPartitionsForApplicationHandle

GET /metrics/throughput/connectionsummary/{application_handle}/partition

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to the starting position of return records.

    Default: 0

  • Used to sort

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=SOME_STRING_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Error payload

No Sample Response

This method does not specify any sample responses.

showPartitionDetailForApplicationHandle

GET /metrics/throughput/connectionsummary/{application_handle}/partition/{partition_id}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

  • partition id

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition/{partition_id}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition/{partition_id}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition/{partition_id}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition/{partition_id}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/partition/{partition_id}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Error payload

No Sample Response

This method does not specify any sample responses.

getConnectionSummaryHistoryTimeSeries

GET /metrics/throughput/connectionsummary/{application_handle}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • A system-wide unique ID for the application.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/connectionsummary/{application_handle}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a summary of operating system time spent

Returns multiple rows for the os time spent summary. Each column is a category of the summary.

GET /metrics/throughput/os_time_spent

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent?start=1546272000000&end=1546272300000&limit=100&offset=0"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent?start=1546272000000&end=1546272300000&limit=100&offset=0")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/os_time_spent?start=1546272000000&end=1546272300000&limit=100&offset=0",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/os_time_spent?start=1546272000000&end=1546272300000&limit=100&offset=0", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent?start=1546272000000&end=1546272300000&limit=100&offset=0'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of OS time spent summary

Status Code

  • Returns performance of Operating System Time Spent

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a summary of the current operating system time spent

Returns multiple rows for the current os time spent summary. Each column is a category of the summary.

GET /metrics/throughput/os_time_spent/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent/current/list?limit=100&offset=0"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent/current/list?limit=100&offset=0")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/os_time_spent/current/list?limit=100&offset=0",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/os_time_spent/current/list?limit=100&offset=0", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent/current/list?limit=100&offset=0'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A current list of OS time spent summary

Status Code

  • Returns performance of Operating System Time Spent

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of timeseries of system operating time spent

Returns a list of timeseries of system operating time spent.

GET /metrics/throughput/os_time_spent/{category}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Category name.

    Allowable values: [db2_cpu_user_percent,db2_cpu_system_percent,cpu_user_percent,cpu_system_percent,io_wait_time_percent,system_idling_time_percent,cpu_load_long,swap_page]

Query Parameters

  • Start timestamp.

  • End timestamp.

  • field to set the amount of return records.

    Default: 100

  • Field to the starting position of return records. Limit and offest should be set together

    Default: 0

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent/db2_cpu_user_percent/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent/db2_cpu_user_percent/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/throughput/os_time_spent/db2_cpu_user_percent/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/throughput/os_time_spent/db2_cpu_user_percent/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/throughput/os_time_spent/db2_cpu_user_percent/timeseries?start=1546272000000&end=1546272300000&limit=100&offset=0'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of timeseries for OS time spent summary

Status Code

  • Returns performance of Operating System Time Spent

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns current storage usage **DB ADMIN ONLY**

Returns current storage usage.

GET /monitor/storage

Request

Custom Headers

  • Database profile name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/monitor/storage"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/monitor/storage")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/monitor/storage",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/monitor/storage", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/monitor/storage   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Storage usage

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns storage usage history **DB ADMIN ONLY**

Returns a list of storage usage daily stats. Currenlty the history of the last seven days is returned.

GET /monitor/storage/history

Request

Custom Headers

  • Database profile name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/monitor/storage/history"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/monitor/storage/history")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/monitor/storage/history",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/monitor/storage/history", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/monitor/storage/history   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of system storage stats

Status Code

  • Storage usage history

  • Error payload

No Sample Response

This method does not specify any sample responses.

Storage utilization by schema **DB ADMIN ONLY**

Returns a list where each element represents a schema and its corresponding logical and physical sizes. Physical size is the amount of storage in disk allocated to objects in the schema. Logical size is the actual object size, which might be less than the physical size (e.g. in the case of a logical table truncation).

GET /monitor/storage/by_schema

Request

Custom Headers

  • Database profile name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/monitor/storage/by_schema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/monitor/storage/by_schema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/monitor/storage/by_schema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/monitor/storage/by_schema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/monitor/storage/by_schema   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of schema's storage usage data

Status Code

  • Storage usage by schema

  • Operation is only available to administrators

  • Error payload

No Sample Response

This method does not specify any sample responses.

Storage utilization of a schema **DB ADMIN ONLY**

Returns logical and physical sizes for one schema. Physical size is the amount of storage in disk allocated to objects in the schema. Logical size is the actual object size, which might be less than the physical size (e.g. in the case of a logical table truncation).

GET /monitor/storage/by_schema/{schema_name}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Schema name

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/monitor/storage/by_schema/{schema_name}"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/monitor/storage/by_schema/{schema_name}")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/monitor/storage/by_schema/{schema_name}",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/monitor/storage/by_schema/{schema_name}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/monitor/storage/by_schema/{schema_name}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Storage usage for a schema

  • Operation is only available to administrators

  • Schema does not exist

  • Error payload

No Sample Response

This method does not specify any sample responses.

Return the maximum usage percent of storage for a specified time frame. **DB ADMIN ONLY**

Return the maximum usage percent of storage for a specified time frame.

GET /metrics/max_storage

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/max_storage?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/max_storage?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/max_storage?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/max_storage?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/max_storage?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of Storage.

Status Code

  • Return the maximum usage percent of storage for a specified time frame.

  • Operation is only available to administrators.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the usage percent of storage for a specified time frame. **DB ADMIN ONLY**

Return the usage percent of storage for a specified time frame.

GET /metrics/storage

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/storage?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/storage?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/storage?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/storage?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/storage?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of Storage.

Status Code

  • Return the usage percent of storage for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return a table storage usage in a time range **DB ADMIN ONLY**

Return a table storage usage in a time range.

GET /metrics/schemas/{tabschema}/tables/{tabname}/storage/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Tabname

  • Tabschema

Query Parameters

  • end

  • start

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage/timeseries?end=SOME_INTEGER_VALUE&start=SOME_INTEGER_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage/timeseries?end=SOME_INTEGER_VALUE&start=SOME_INTEGER_VALUE")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage/timeseries?end=SOME_INTEGER_VALUE&start=SOME_INTEGER_VALUE",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage/timeseries?end=SOME_INTEGER_VALUE&start=SOME_INTEGER_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage/timeseries?end=SOME_INTEGER_VALUE&start=SOME_INTEGER_VALUE'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list for tables storage **DB ADMIN ONLY**

Returns a list for tables storage. Only returns the last collected data between start and end.

GET /metrics/tables/storage

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if includes system tables in the return list

    Default: false

  • The amount of return records. Limit and offset should be set together.

    Default: 100

  • The starting position of return records. Limit and offset should be set together

    Default: 0

  • Used to filter by schema

  • Used to filter by tabname

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/tables/storage?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&tabname=SOME_STRING_VALUE&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/tables/storage?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&tabname=SOME_STRING_VALUE&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/tables/storage?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&tabname=SOME_STRING_VALUE&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/tables/storage?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&tabname=SOME_STRING_VALUE&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/tables/storage?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&tabname=SOME_STRING_VALUE&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of table storage data.

Status Code

  • Returns a list for tables storage

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a table storage **DB ADMIN ONLY**

Returns a table storage. Only returns the last collected data between start and end.

GET /metrics/schemas/{tabschema}/tables/{tabname}/storage

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Used to filter by schema

  • Used to filter by tabname

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{tabschema}/tables/{tabname}/storage?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of schemas storage data.

Status Code

  • Returns the list for tables storage

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list for schemas storage **DB ADMIN ONLY**

Returns a list for schemas storage. Only returns the last collected data between start and end.

GET /metrics/storage/schemas

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if includes system schemas in the return list

    Default: false

  • The amount of return records. Limit and offset should be set together.

    Default: 100

  • The starting position of return records. Limit and offset should be set together

    Default: 0

  • Used to filter by schema

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/storage/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/storage/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&tabschema=SOME_STRING_VALUE&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of schemas storage data.

Status Code

  • Returns a list for schemas storage

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Return a schema used storage in a time range **DB ADMIN ONLY**

Return a schema used storage in a time range.

GET /metrics/storage/schemas/{tabschema}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Used to filter by schema

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas/{tabschema}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json;charset=utf-8")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas/{tabschema}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json;charset=utf-8")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/storage/schemas/{tabschema}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json;charset=utf-8",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json;charset=utf-8",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/storage/schemas/{tabschema}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas/{tabschema}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json;charset=utf-8'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a schema storage **DB ADMIN ONLY**

Returns a schema storage. Only returns the last collected data between start and end.

GET /metrics/storage/schemas/{tabschema}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Used to filter by schema

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas/{tabschema}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas/{tabschema}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/storage/schemas/{tabschema}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/storage/schemas/{tabschema}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/storage/schemas/{tabschema}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returns the list for schema storage

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Runs a tables storage collection **DB ADMIN ONLY**

Runs asynchronously a tables storage collection. Only allow one thread to run at the same time. If there is already a thread running, the new request will not kick off a new one. The returned handle will be the already running one. If there is no thread running, a new handle will be returned.

POST /metrics/tables/storage/collector

Request

Custom Headers

  • Database profile name.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/tables/storage/collector"
    
    	req, _ := http.NewRequest("POST", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/tables/storage/collector")
      .post(null)
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/tables/storage/collector",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/metrics/tables/storage/collector", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/metrics/tables/storage/collector   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Runs a tables storage collection

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance metrics for schemas **DB ADMIN ONLY**

Returns current performance metrics for schemas.

GET /metrics/schemas/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system schemas in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

a list of Sechmas

Status Code

  • returns performance of schemas

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance metrics for one schema **DB ADMIN ONLY**

Returns performance metrics for one schema. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/schemas/{schema_name}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Schema name

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{schema_name}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{schema_name}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Schema Perf

Status Code

  • Returns performance metrics for one schema

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance metrics on all members for one schema **DB ADMIN ONLY**

Returns performance metrics on all members for one schema. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/schemas/{schema_name}/members

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Schema name

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{schema_name}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{schema_name}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Schema Perf list

Status Code

  • Returns performance metrics on all members for one schema

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance metrics timeseries for one schema **DB ADMIN ONLY**

Returns performance metrics timeseries for one schema.

GET /metrics/schemas/{schema_name}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Schema name

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{schema_name}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{schema_name}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Schema Perf Timeseries list

Status Code

  • Returns performance metrics timeseries for one schema

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance of tables **DB ADMIN ONLY**

Returns performance of tables. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/tables

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system tables in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/tables?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/tables?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/tables?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/tables?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/tables?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of tables

Status Code

  • Returns performance of tables

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns current performance of tables **DB ADMIN ONLY**

Returns current performance of tables.

GET /metrics/tables/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set if include system tables in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/tables/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/tables/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/tables/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/tables/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/tables/current/list?include_sys=false&limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of tables

Status Code

  • Returns performance of tables

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance of one table **DB ADMIN ONLY**

Returns performance of one table. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/schemas/{schema_name}/tables/{table_name}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Schema name

  • Table name

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance

Status Code

  • Returns performance of one table

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance on all members for one table **DB ADMIN ONLY**

Returns performance on all members for one table. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/schemas/{schema_name}/tables/{table_name}/members

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Schema name

  • Table name

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance list

Status Code

  • Returns performance on all members for one table

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance timeseries for one table **DB ADMIN ONLY**

Returns performance timeseries for one table.

GET /metrics/schemas/{schema_name}/tables/{table_name}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • Schema name

  • Table name

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/schemas/{schema_name}/tables/{table_name}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Table performance timeseries list

Status Code

  • Returns performance timeseries for one table

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance of tables and schemas **DB ADMIN ONLY**

Returns performance of tables and schemas. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/tableperformance

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system tables in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/tableperformance?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/tableperformance?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/tableperformance?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/tableperformance?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/tableperformance?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Result of tables and schemas

Status Code

  • Returns performance of tables

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns current performance of tables and schemas **DB ADMIN ONLY**

Returns current performance of tables and schemas. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/tableperformance/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set if include system tables in the return list

    Default: false

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/tableperformance/current/list?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/tableperformance/current/list?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/tableperformance/current/list?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/tableperformance/current/list?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/tableperformance/current/list?include_sys=false&start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-tabschema'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Result of current tables and schemas

Status Code

  • Returns performance of tables

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of instance memory data

Returns a list of instance memory data.

GET /metrics/memory/instance_memory

Request

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-host_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-host_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/instance_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-host_name",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/instance_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-host_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-host_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of instance memory data

Status Code

  • Returns the instance memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current instance memory data

Returns a list of current instance memory data. Only return the last instance memory data. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/memory/instance_memory/current/list

Request

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/current/list?limit=100&offset=0&sort=-host_name"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/current/list?limit=100&offset=0&sort=-host_name")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/instance_memory/current/list?limit=100&offset=0&sort=-host_name",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/instance_memory/current/list?limit=100&offset=0&sort=-host_name", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/current/list?limit=100&offset=0&sort=-host_name'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of instance memory data

Status Code

  • Returns the instance memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the instance memory data

Returns the instance memory data.

GET /metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/members

Request

Path Parameters

  • The host name of the instance memory.

  • The db name of the instance memory.

  • The memory set type of the instance memory.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of instance memory data

Status Code

  • Returns the instance memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the instance memory data

Returns the instance memory data.

GET /metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/members

Request

Path Parameters

  • The host name of the instance memory.

  • The memory set type of the instance memory.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of instance memory data

Status Code

  • Returns the instance memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the time series performance data of instance memory data

Returns the time series performance data of instance memory data.

GET /metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/timeseries

Request

Path Parameters

  • The host name of the instance memory.

  • The db name of the instance memory.

  • The memory set type of the instance memory.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/db_name/{db_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of instance memory timeseries data

Status Code

  • Returns the time series performance data of instance memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the time series performance data of instance memory data

Returns the time series performance data of instance memory data.

GET /metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/timeseries

Request

Path Parameters

  • The host name of the instance memory.

  • The memory set type of the instance memory.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/instance_memory/host_name/{host_name}/memory_set_type/{memory_set_type}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of instance memory timeseries data

Status Code

  • Returns the time series performance data of instance memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of database memory data

Returns a list of database memory data.

GET /metrics/memory/database_memory

Request

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-memory_set_type"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-memory_set_type")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/database_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-memory_set_type",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/database_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-memory_set_type", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-memory_set_type'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of database memory data

Status Code

  • Returns the database memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current database memory data

Returns a list of current database memory data. Only return the last database memory data. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/memory/database_memory/current/list

Request

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/current/list?limit=100&offset=0&sort=-memory_set_type"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/current/list?limit=100&offset=0&sort=-memory_set_type")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/database_memory/current/list?limit=100&offset=0&sort=-memory_set_type",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/database_memory/current/list?limit=100&offset=0&sort=-memory_set_type", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/current/list?limit=100&offset=0&sort=-memory_set_type'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of database memory data

Status Code

  • Returns the database memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the database memory data

Returns the database memory data.

GET /metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/members

Request

Path Parameters

  • The memory pool type of the database memory.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of database memory data

Status Code

  • Returns the database memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the time series performance data of database memory data

Returns the time series performance data of database memory data.

GET /metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/timeseries

Request

Path Parameters

  • The memory pool type of the database memory.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/memory/database_memory/memory_pool_type/{memory_pool_type}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of database memory timeseries data

Status Code

  • Returns the time series performance data of database memory data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of buffer pool data

Returns a list of buffer pool data. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/io/buffer_pool

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-pool_col_l_reads"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-pool_col_l_reads")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/buffer_pool?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-pool_col_l_reads",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/buffer_pool?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-pool_col_l_reads", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-pool_col_l_reads'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of table space data

Status Code

  • Returns the buffer pool data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current buffer pool data

Returns a list of current buffer pool data. Only return the last buffer pool data. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/io/buffer_pool/current/list

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/current/list?limit=100&offset=0&sort=-pool_col_l_reads"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/current/list?limit=100&offset=0&sort=-pool_col_l_reads")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/buffer_pool/current/list?limit=100&offset=0&sort=-pool_col_l_reads",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/buffer_pool/current/list?limit=100&offset=0&sort=-pool_col_l_reads", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/current/list?limit=100&offset=0&sort=-pool_col_l_reads'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of table space data

Status Code

  • Returns the buffer pool data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the buffer pool data

Returns the buffer pool data. If there are multiple collections. They’ll been aggregated by average.

GET /metrics/io/buffer_pool/{bp_name}

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The name of the buffer pool.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/buffer_pool/{bp_name}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/buffer_pool/{bp_name}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Returns the buffer pool data.

Status Code

  • Returns the buffer pool data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns performance on all members for one buffer pool data

Returns performance on all members for one buffer pool data. If there are multiple collections. They’ll been aggregated averagely.

GET /metrics/io/buffer_pool/{bp_name}/members

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The name of the buffer pool.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}/members?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}/members?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/buffer_pool/{bp_name}/members?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/buffer_pool/{bp_name}/members?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}/members?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of table space data

Status Code

  • Returns performance on all members for one buffer pool data.

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the time series performance data of buffer pool data

Returns the time series performance data of buffer pool data.

GET /metrics/io/buffer_pool/{bp_name}/timeseries

Request

Custom Headers

  • Database profile name.

Path Parameters

  • The name of the buffer pool.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/buffer_pool/{bp_name}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/buffer_pool/{bp_name}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/buffer_pool/{bp_name}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of table space data

Status Code

  • Returns the time series performance data of buffer pool data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of logging performance data

Returns a list of logging performance data. If there are multiple collections. They will be aggregated averagely.

GET /metrics/io/logging_performance

Request

Query Parameters

  • Start timestamp.

  • End timestamp.

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-member"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-member")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/logging_performance?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-member",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/logging_performance?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-member", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance?start=1546272000000&end=1546272300000&limit=100&offset=0&sort=-member'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of logging performance data

Status Code

  • Returns the logging performance data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of current logging performance data

Returns a list of current logging performance data. Only return the last logging performance data. The values are calculated based on the last collected and privious collection rows to get rate like values.

GET /metrics/io/logging_performance/current/list

Request

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/current/list?limit=100&offset=0&sort=-member"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/current/list?limit=100&offset=0&sort=-member")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/logging_performance/current/list?limit=100&offset=0&sort=-member",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/logging_performance/current/list?limit=100&offset=0&sort=-member", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/current/list?limit=100&offset=0&sort=-member'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of logging performance data

Status Code

  • Returns the logging performance data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the logging performance data

Returns the logging performance data. If there are multiple collections. They’ll been aggregated by average.

GET /metrics/io/logging_performance/{member}

Request

Path Parameters

  • The Db2 member of the logging performance.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/{member}?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/{member}?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/logging_performance/{member}?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/logging_performance/{member}?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/{member}?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Returns the logging performance data.

Status Code

  • Returns the logging performance data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the time series performance data of logging performance data

Returns the time series performance data of logging performance data.

GET /metrics/io/logging_performance/{member}/timeseries

Request

Path Parameters

  • The Db2 member of the logging performance.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/{member}/timeseries?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/{member}/timeseries?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/io/logging_performance/{member}/timeseries?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/io/logging_performance/{member}/timeseries?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/io/logging_performance/{member}/timeseries?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of logging performance timeseries data

Status Code

  • Returns the time series performance data of logging performance data

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of active schedulers

Returns a list of active schedulers.

GET /report/scheduler_list

Request

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/scheduler_list?limit=100&offset=0&sort=-report_id"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/scheduler_list?limit=100&offset=0&sort=-report_id")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/scheduler_list?limit=100&offset=0&sort=-report_id",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/report/scheduler_list?limit=100&offset=0&sort=-report_id", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/report/scheduler_list?limit=100&offset=0&sort=-report_id'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of active schedule data.

Status Code

  • Returns the active schedulers

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a scheduler definition

Returns a scheduler definition.

GET /report/scheduler/scheduler_id/{scheduler_id}

Request

Path Parameters

  • A unique ID for the schedule definition.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/scheduler/scheduler_id/1600093820262"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/scheduler/scheduler_id/1600093820262")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/scheduler/scheduler_id/1600093820262",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/report/scheduler/scheduler_id/1600093820262", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/report/scheduler/scheduler_id/1600093820262   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Returns the report schedule data.

Status Code

  • Returns the active schedulers

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Edit a scheduler definition

Edit a scheduler definition.

PUT /report/scheduler/scheduler_id/{scheduler_id}

Request

Path Parameters

  • A unique ID for the schedule definition.

Active schedule definition.

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/scheduler/scheduler_id/1600093820262"
    
    	payload := strings.NewReader("{\"report_id\":\"<ADD STRING VALUE>\",\"report_settings\":{\"name\":\"<ADD STRING VALUE>\",\"interval\":\"<ADD STRING VALUE>\",\"start_time\":0,\"end_time\":0,\"type\":\"<ADD STRING VALUE>\",\"template\":\"<ADD STRING VALUE>\",\"database_list\":[\"<ADD STRING VALUE>\"],\"schedule_type\":\"<ADD STRING VALUE>\",\"kpi_info\":{}},\"scheduler_settings\":{\"start\":0,\"end_type\":\"<ADD STRING VALUE>\",\"end\":0,\"repeat\":false,\"repeat_interval\":[0],\"repeat_type\":\"<ADD STRING VALUE>\",\"timezone\":0},\"notification_settings\":{\"recipients\":\"<ADD STRING VALUE>\",\"slack\":\"<ADD STRING VALUE>\"}}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"report_id\":\"<ADD STRING VALUE>\",\"report_settings\":{\"name\":\"<ADD STRING VALUE>\",\"interval\":\"<ADD STRING VALUE>\",\"start_time\":0,\"end_time\":0,\"type\":\"<ADD STRING VALUE>\",\"template\":\"<ADD STRING VALUE>\",\"database_list\":[\"<ADD STRING VALUE>\"],\"schedule_type\":\"<ADD STRING VALUE>\",\"kpi_info\":{}},\"scheduler_settings\":{\"start\":0,\"end_type\":\"<ADD STRING VALUE>\",\"end\":0,\"repeat\":false,\"repeat_interval\":[0],\"repeat_type\":\"<ADD STRING VALUE>\",\"timezone\":0},\"notification_settings\":{\"recipients\":\"<ADD STRING VALUE>\",\"slack\":\"<ADD STRING VALUE>\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/scheduler/scheduler_id/1600093820262")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/scheduler/scheduler_id/1600093820262",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      report_id: '<ADD STRING VALUE>',
      report_settings: {
        name: '<ADD STRING VALUE>',
        interval: '<ADD STRING VALUE>',
        start_time: 0,
        end_time: 0,
        type: '<ADD STRING VALUE>',
        template: '<ADD STRING VALUE>',
        database_list: ['<ADD STRING VALUE>'],
        schedule_type: '<ADD STRING VALUE>',
        kpi_info: {}
      },
      scheduler_settings: {
        start: 0,
        end_type: '<ADD STRING VALUE>',
        end: 0,
        repeat: false,
        repeat_interval: [0],
        repeat_type: '<ADD STRING VALUE>',
        timezone: 0
      },
      notification_settings: {recipients: '<ADD STRING VALUE>', slack: '<ADD STRING VALUE>'}
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"report_id\":\"<ADD STRING VALUE>\",\"report_settings\":{\"name\":\"<ADD STRING VALUE>\",\"interval\":\"<ADD STRING VALUE>\",\"start_time\":0,\"end_time\":0,\"type\":\"<ADD STRING VALUE>\",\"template\":\"<ADD STRING VALUE>\",\"database_list\":[\"<ADD STRING VALUE>\"],\"schedule_type\":\"<ADD STRING VALUE>\",\"kpi_info\":{}},\"scheduler_settings\":{\"start\":0,\"end_type\":\"<ADD STRING VALUE>\",\"end\":0,\"repeat\":false,\"repeat_interval\":[0],\"repeat_type\":\"<ADD STRING VALUE>\",\"timezone\":0},\"notification_settings\":{\"recipients\":\"<ADD STRING VALUE>\",\"slack\":\"<ADD STRING VALUE>\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/report/scheduler/scheduler_id/1600093820262", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/report/scheduler/scheduler_id/1600093820262   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"report_id":"<ADD STRING VALUE>","report_settings":{"name":"<ADD STRING VALUE>","interval":"<ADD STRING VALUE>","start_time":0,"end_time":0,"type":"<ADD STRING VALUE>","template":"<ADD STRING VALUE>","database_list":["<ADD STRING VALUE>"],"schedule_type":"<ADD STRING VALUE>","kpi_info":{}},"scheduler_settings":{"start":0,"end_type":"<ADD STRING VALUE>","end":0,"repeat":false,"repeat_interval":[0],"repeat_type":"<ADD STRING VALUE>","timezone":0},"notification_settings":{"recipients":"<ADD STRING VALUE>","slack":"<ADD STRING VALUE>"}}'

Response

Status Code

  • Edit the active scheduler

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Creates a new active scheduler

Creates a new schedule definition which can be scheduled as active.

POST /report/scheduler

Request

Active schedule definition.

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/scheduler"
    
    	payload := strings.NewReader("{\"report_id\":\"<ADD STRING VALUE>\",\"report_settings\":{\"name\":\"<ADD STRING VALUE>\",\"interval\":\"<ADD STRING VALUE>\",\"start_time\":0,\"end_time\":0,\"type\":\"<ADD STRING VALUE>\",\"template\":\"<ADD STRING VALUE>\",\"database_list\":[\"<ADD STRING VALUE>\"],\"schedule_type\":\"<ADD STRING VALUE>\",\"kpi_info\":{}},\"scheduler_settings\":{\"start\":0,\"end_type\":\"<ADD STRING VALUE>\",\"end\":0,\"repeat\":false,\"repeat_interval\":[0],\"repeat_type\":\"<ADD STRING VALUE>\",\"timezone\":0},\"notification_settings\":{\"recipients\":\"<ADD STRING VALUE>\",\"slack\":\"<ADD STRING VALUE>\"}}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"report_id\":\"<ADD STRING VALUE>\",\"report_settings\":{\"name\":\"<ADD STRING VALUE>\",\"interval\":\"<ADD STRING VALUE>\",\"start_time\":0,\"end_time\":0,\"type\":\"<ADD STRING VALUE>\",\"template\":\"<ADD STRING VALUE>\",\"database_list\":[\"<ADD STRING VALUE>\"],\"schedule_type\":\"<ADD STRING VALUE>\",\"kpi_info\":{}},\"scheduler_settings\":{\"start\":0,\"end_type\":\"<ADD STRING VALUE>\",\"end\":0,\"repeat\":false,\"repeat_interval\":[0],\"repeat_type\":\"<ADD STRING VALUE>\",\"timezone\":0},\"notification_settings\":{\"recipients\":\"<ADD STRING VALUE>\",\"slack\":\"<ADD STRING VALUE>\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/scheduler")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/scheduler",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      report_id: '<ADD STRING VALUE>',
      report_settings: {
        name: '<ADD STRING VALUE>',
        interval: '<ADD STRING VALUE>',
        start_time: 0,
        end_time: 0,
        type: '<ADD STRING VALUE>',
        template: '<ADD STRING VALUE>',
        database_list: ['<ADD STRING VALUE>'],
        schedule_type: '<ADD STRING VALUE>',
        kpi_info: {}
      },
      scheduler_settings: {
        start: 0,
        end_type: '<ADD STRING VALUE>',
        end: 0,
        repeat: false,
        repeat_interval: [0],
        repeat_type: '<ADD STRING VALUE>',
        timezone: 0
      },
      notification_settings: {recipients: '<ADD STRING VALUE>', slack: '<ADD STRING VALUE>'}
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"report_id\":\"<ADD STRING VALUE>\",\"report_settings\":{\"name\":\"<ADD STRING VALUE>\",\"interval\":\"<ADD STRING VALUE>\",\"start_time\":0,\"end_time\":0,\"type\":\"<ADD STRING VALUE>\",\"template\":\"<ADD STRING VALUE>\",\"database_list\":[\"<ADD STRING VALUE>\"],\"schedule_type\":\"<ADD STRING VALUE>\",\"kpi_info\":{}},\"scheduler_settings\":{\"start\":0,\"end_type\":\"<ADD STRING VALUE>\",\"end\":0,\"repeat\":false,\"repeat_interval\":[0],\"repeat_type\":\"<ADD STRING VALUE>\",\"timezone\":0},\"notification_settings\":{\"recipients\":\"<ADD STRING VALUE>\",\"slack\":\"<ADD STRING VALUE>\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/report/scheduler", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/report/scheduler   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"report_id":"<ADD STRING VALUE>","report_settings":{"name":"<ADD STRING VALUE>","interval":"<ADD STRING VALUE>","start_time":0,"end_time":0,"type":"<ADD STRING VALUE>","template":"<ADD STRING VALUE>","database_list":["<ADD STRING VALUE>"],"schedule_type":"<ADD STRING VALUE>","kpi_info":{}},"scheduler_settings":{"start":0,"end_type":"<ADD STRING VALUE>","end":0,"repeat":false,"repeat_interval":[0],"repeat_type":"<ADD STRING VALUE>","timezone":0},"notification_settings":{"recipients":"<ADD STRING VALUE>","slack":"<ADD STRING VALUE>"}}'

Response

Return the result of schedule data operation.

Status Code

  • Schedule definition created

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns a list of completed schedulers

Returns a list of current completed schedulers.

GET /report/result_list

Request

Query Parameters

  • Field to set the amount of return records

    Default: 100

  • Field to set the starting position of return records.

    Default: 0

  • Used to sort by the given field. The name of given field can be found from the response. Plus + or - before the given filed to denote by ASC or DESC. By default if not specified it's by ASC. Note: only support one field each time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/result_list?limit=100&offset=0&sort=-report_id"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/result_list?limit=100&offset=0&sort=-report_id")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/result_list?limit=100&offset=0&sort=-report_id",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/report/result_list?limit=100&offset=0&sort=-report_id", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/report/result_list?limit=100&offset=0&sort=-report_id'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of completed schedule data.

Status Code

  • Returns the active schedulers

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the report history keep time(ms)

Returns the report history keep time(ms).

GET /report/retention/report_history_time

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/retention/report_history_time"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/retention/report_history_time")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/retention/report_history_time",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/report/retention/report_history_time", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/report/retention/report_history_time   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returns the millisecond value

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the report history keep count

Returns the report history keep count.

GET /report/retention/report_history_count

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/retention/report_history_count"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/retention/report_history_count")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/retention/report_history_count",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/report/retention/report_history_count", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/report/retention/report_history_count   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returns the count value

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Update the report history keep time(ms)

Update the report history keep time(ms).

PUT /report/retention/report_history_time/{report_history_time}

Request

Path Parameters

  • A millisecond value for report history keep time.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/retention/report_history_time/2592000000"
    
    	req, _ := http.NewRequest("PUT", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/retention/report_history_time/2592000000")
      .put(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/retention/report_history_time/2592000000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/report/retention/report_history_time/2592000000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/report/retention/report_history_time/2592000000   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Update the report history time.

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Update the report history keep count

Update the report history keep count.

PUT /report/retention/report_history_count/{report_history_count}

Request

Path Parameters

  • A count value of report history keeps.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/report/retention/report_history_count/10000"
    
    	req, _ := http.NewRequest("PUT", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/report/retention/report_history_count/10000")
      .put(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/report/retention/report_history_count/10000",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/report/retention/report_history_count/10000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/report/retention/report_history_count/10000   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Update the count value.

  • Current user does not have permission to access this database

  • Database profile not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate visual explain model for a given sql

Generate visual explain model for a given sql.

POST /explain/explain_model

Request

The SQL query to be explained.

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/explain/explain_model"
    
    	payload := strings.NewReader("{\"schema\":\"sysibm\",\"sql\":\"select * from sysibm.systables where name ='a'\",\"profileName\":\"<ADD STRING VALUE>\",\"showRecomm\":false}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"schema\":\"sysibm\",\"sql\":\"select * from sysibm.systables where name ='a'\",\"profileName\":\"<ADD STRING VALUE>\",\"showRecomm\":false}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/explain/explain_model")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/explain/explain_model",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      schema: 'sysibm',
      sql: 'select * from sysibm.systables where name =\'a\'',
      profileName: '<ADD STRING VALUE>',
      showRecomm: false
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"schema\":\"sysibm\",\"sql\":\"select * from sysibm.systables where name ='a'\",\"profileName\":\"<ADD STRING VALUE>\",\"showRecomm\":false}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/explain/explain_model", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/explain/explain_model   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"schema":"sysibm","sql":"select * from sysibm.systables where name ='\''a'\''","profileName":"<ADD STRING VALUE>","showRecomm":false}'

Response

Session id of visual explain

Status Code

  • return visual explain session id

  • Invalid parameters or invalid content type

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get visual explain nodes information

Get visual explain nodes including id and label information.

GET /explain/explain_model/{sessionId}/diagram/nodes/

Request

Path Parameters

  • The session id that used to generate the basic node information of visual explain.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

todo

Status Code

  • Return the ids and labels in visual explain

  • Invalid parameters or invalid content type

  • Error payload

No Sample Response

This method does not specify any sample responses.

Generate visual explain layout

Generate visual explain laytout.

POST /explain/explain_model/{sessionId}/diagram/layout

Request

Path Parameters

  • The session id that used to generate the basic node information of visual explain.

The ids and labels and their height and width of font that used to generate the layout of visual explain.

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/layout"
    
    	payload := strings.NewReader("{\"containerWidth\":0,\"idFontHeight\":0,\"ids\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}],\"label1FontHeight\":0,\"label1s\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}],\"label2s\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}]}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"containerWidth\":0,\"idFontHeight\":0,\"ids\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}],\"label1FontHeight\":0,\"label1s\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}],\"label2s\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}]}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/layout")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/explain/explain_model/{sessionId}/diagram/layout",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      containerWidth: 0,
      idFontHeight: 0,
      ids: [{text: '<ADD STRING VALUE>', width: 0}],
      label1FontHeight: 0,
      label1s: [{text: '<ADD STRING VALUE>', width: 0}],
      label2s: [{text: '<ADD STRING VALUE>', width: 0}]
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"containerWidth\":0,\"idFontHeight\":0,\"ids\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}],\"label1FontHeight\":0,\"label1s\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}],\"label2s\":[{\"text\":\"<ADD STRING VALUE>\",\"width\":0}]}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/explain/explain_model/{sessionId}/diagram/layout", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/layout   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"containerWidth":0,"idFontHeight":0,"ids":[{"text":"<ADD STRING VALUE>","width":0}],"label1FontHeight":0,"label1s":[{"text":"<ADD STRING VALUE>","width":0}],"label2s":[{"text":"<ADD STRING VALUE>","width":0}]}'

Response

The laytout information of visual explain

Status Code

  • Return the layout information in visual explain

  • Invalid parameters or invalid content type

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the data of the selected node

Get the data of the selected node

GET /explain/explain_model/{sessionId}/diagram/nodes/{nodeId}/description

Request

Path Parameters

  • The session id that used to get the node description of visual explain.

  • The node id that used to get the node description of visual explain.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/{nodeId}/description"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/{nodeId}/description")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/{nodeId}/description",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/{nodeId}/description", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/explain/explain_model/{sessionId}/diagram/nodes/{nodeId}/description   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

The description of the selected node in the visual explain

Status Code

  • Return the description of the selected node

  • Invalid parameters or invalid content type

  • Error payload

No Sample Response

This method does not specify any sample responses.

Search node based on the key word and predefined rule

Search node based on the key word and predefined rule

GET /explain/explain_model/search/{sessionId}/{namePattern}

Request

Path Parameters

  • The session id that used to get the node description of visual explain.

  • The key word to search node.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/explain/explain_model/search/{sessionId}/{namePattern}"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/explain/explain_model/search/{sessionId}/{namePattern}")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/explain/explain_model/search/{sessionId}/{namePattern}",
      "headers": {
        "content-type": "application/json",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/explain/explain_model/search/{sessionId}/{namePattern}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/explain/explain_model/search/{sessionId}/{namePattern}   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

The description of the selected node in the visual explain

Status Code

  • Return the list of nodes

  • Error payload

No Sample Response

This method does not specify any sample responses.

Search node based on the key word and predefined rule

Search node based on the key word and predefined rule

POST /explain/explain_model/search/{sessionId}

Request

Path Parameters

  • The session id that used to get the node description of visual explain.

The key word and predefined rule to search node

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/explain/explain_model/search/{sessionId}"
    
    	payload := strings.NewReader("{\"advanacedSearchRequests\":[{\"type\":\"COMMON.SEARCHBY.NODE_NAME\"}],\"namePattern\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"advanacedSearchRequests\":[{\"type\":\"COMMON.SEARCHBY.NODE_NAME\"}],\"namePattern\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/explain/explain_model/search/{sessionId}")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/explain/explain_model/search/{sessionId}",
      "headers": {
        "content-type": "application/json",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      advanacedSearchRequests: [{type: 'COMMON.SEARCHBY.NODE_NAME'}],
      namePattern: '<ADD STRING VALUE>'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"advanacedSearchRequests\":[{\"type\":\"COMMON.SEARCHBY.NODE_NAME\"}],\"namePattern\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/explain/explain_model/search/{sessionId}", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/explain/explain_model/search/{sessionId}   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"advanacedSearchRequests":[{"type":"COMMON.SEARCHBY.NODE_NAME"}],"namePattern":"<ADD STRING VALUE>"}'

Response

The description of the selected node in the visual explain

Status Code

  • Return the list of nodes

  • Error payload

No Sample Response

This method does not specify any sample responses.

Returns the system's current settings

Returns the system's current settings.

GET /settings

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/settings"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/settings")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/settings",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/settings", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/settings   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A collection of system settings.

Status Code

  • System settings

  • Error payload

No Sample Response

This method does not specify any sample responses.

Updates the system settings **ADMIN ONLY**

The only setting that can be modified is database_ssl_connections_enforced. By setting database_ssl_connections_enforced to true database connection requests must be secured. If set to false both secured and unsecured database connections are accepted.

This operation is only available to system administrators.

PUT /settings

Request

System settings

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/settings"
    
    	payload := strings.NewReader("{\"database_ssl_connections_enforced\":\"yes\"}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"database_ssl_connections_enforced\":\"yes\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/settings")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/settings",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({database_ssl_connections_enforced: 'yes'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"database_ssl_connections_enforced\":\"yes\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/settings", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/settings   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"database_ssl_connections_enforced":"yes"}'

Response

A collection of system settings.

Status Code

  • System settings

  • Error payload

No Sample Response

This method does not specify any sample responses.

Analyzes CSV data to return a list of data types of its values

Schema discovery analyzes data in CSV format and returns a list of suggested data types that can be used when creating a table to store the CSV data.

POST /schema_discovery

Request

Data to analyze

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/schema_discovery"
    
    	payload := strings.NewReader("{\"column_separator\":\"<ADD STRING VALUE>\",\"includes_header\":\"<ADD STRING VALUE>\",\"data\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"column_separator\":\"<ADD STRING VALUE>\",\"includes_header\":\"<ADD STRING VALUE>\",\"data\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/schema_discovery")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/schema_discovery",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      column_separator: '<ADD STRING VALUE>',
      includes_header: '<ADD STRING VALUE>',
      data: '<ADD STRING VALUE>'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"column_separator\":\"<ADD STRING VALUE>\",\"includes_header\":\"<ADD STRING VALUE>\",\"data\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/schema_discovery", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/schema_discovery   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"column_separator":"<ADD STRING VALUE>","includes_header":"<ADD STRING VALUE>","data":"<ADD STRING VALUE>"}'

Response

Result of running schema discovery.

Status Code

  • Suggested table schema

  • Error payload

No Sample Response

This method does not specify any sample responses.

Enable Db2 audit or configure object storage for Db2 audit feature

This API can enable Db2 audit feature for the first time, or modify the object storage alias which used by Db2 audit feature.

PUT /db2audit/credentials

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/db2audit/credentials"
    
    	payload := strings.NewReader("{\"migration\":false,\"alias_name\":\"bucket_name\"}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"migration\":false,\"alias_name\":\"bucket_name\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/db2audit/credentials")
      .put(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/db2audit/credentials",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({migration: false, alias_name: 'bucket_name'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"migration\":false,\"alias_name\":\"bucket_name\"}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/db2audit/credentials", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/db2audit/credentials   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"migration":false,"alias_name":"bucket_name"}'

Response

Status Code

  • Successful API call

  • Bad request

  • Unauthorized

  • Forbidden, user has no permission for this API.

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Get the object storage alias used by Db2 audit feature

This API gets the object storage alias which is used by Db2 audit feature if it has been enabled.

GET /db2audit/data_path

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/db2audit/data_path"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/db2audit/data_path")
      .get()
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/db2audit/data_path",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/db2audit/data_path", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/db2audit/data_path   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Successful API call

  • Bad request

  • Unauthorized

  • Forbidden, user has no permission for this API.

  • Internal Server Error

No Sample Response

This method does not specify any sample responses.

Get the list of all the registered external metastores

Get the list of all the registered external metastores

GET /admin/external_metastores

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/external_metastores"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/external_metastores")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/external_metastores",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/external_metastores", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/external_metastores   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of External Metastores

Status Code

  • The list of the registered external metastores

  • Error payload

No Sample Response

This method does not specify any sample responses.

Register an external metastore

Register an external metastore

POST /admin/external_metastores

Request

Examples:
{
  "external_metastore_name": "myExteralMetastore",
  "type": "wastonx-data",
  "uri": "thrift://myfooserver.ibm.com:9083"
}
  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/external_metastores"
    
    	payload := strings.NewReader("{\"external_metastore_name\":\"myExteralMetastore\",\"type\":\"watsonx-data\",\"catalog_impl\":\"org.apache.iceberg.hive.HiveCatalog\",\"auth.mode\":\"PLAIN\",\"auth.plain.credentials\":\"alice:password\",\"clients\":\"20\",\"ssl.cert\":\"<ADD STRING VALUE>\",\"uri\":\"thrift://my.metastore.com:9083\",\"use.SSL\":\"true\",\"warehouse\":\"<ADD STRING VALUE>\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"external_metastore_name\":\"myExteralMetastore\",\"type\":\"watsonx-data\",\"catalog_impl\":\"org.apache.iceberg.hive.HiveCatalog\",\"auth.mode\":\"PLAIN\",\"auth.plain.credentials\":\"alice:password\",\"clients\":\"20\",\"ssl.cert\":\"<ADD STRING VALUE>\",\"uri\":\"thrift://my.metastore.com:9083\",\"use.SSL\":\"true\",\"warehouse\":\"<ADD STRING VALUE>\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/external_metastores")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/external_metastores",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      external_metastore_name: 'myExteralMetastore',
      type: 'watsonx-data',
      catalog_impl: 'org.apache.iceberg.hive.HiveCatalog',
      'auth.mode': 'PLAIN',
      'auth.plain.credentials': 'alice:password',
      clients: '20',
      'ssl.cert': '<ADD STRING VALUE>',
      uri: 'thrift://my.metastore.com:9083',
      'use.SSL': 'true',
      warehouse: '<ADD STRING VALUE>'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"external_metastore_name\":\"myExteralMetastore\",\"type\":\"watsonx-data\",\"catalog_impl\":\"org.apache.iceberg.hive.HiveCatalog\",\"auth.mode\":\"PLAIN\",\"auth.plain.credentials\":\"alice:password\",\"clients\":\"20\",\"ssl.cert\":\"<ADD STRING VALUE>\",\"uri\":\"thrift://my.metastore.com:9083\",\"use.SSL\":\"true\",\"warehouse\":\"<ADD STRING VALUE>\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/admin/external_metastores", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/admin/external_metastores   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"external_metastore_name":"myExteralMetastore","type":"watsonx-data","catalog_impl":"org.apache.iceberg.hive.HiveCatalog","auth.mode":"PLAIN","auth.plain.credentials":"alice:password","clients":"20","ssl.cert":"<ADD STRING VALUE>","uri":"thrift://my.metastore.com:9083","use.SSL":"true","warehouse":"<ADD STRING VALUE>"}'

Response

the response of the output data

Status Code

  • Successfully register an exeternal metestore.

  • Invalid parameters.

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get the specific registered external metastore

Get the specific registered external metastore

GET /admin/external_metastores/{external_metastore_name}

Request

Path Parameters

  • the name of external metastore

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/external_metastores/{external_metastore_name}"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/external_metastores/{external_metastore_name}")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/external_metastores/{external_metastore_name}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/admin/external_metastores/{external_metastore_name}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/admin/external_metastores/{external_metastore_name}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The external metastore

  • Error payload

No Sample Response

This method does not specify any sample responses.

Unregister the exeternal metasore

Unregister the exeternal metasore

DELETE /admin/external_metastores/{external_metastore_name}

Request

Path Parameters

  • the name of external metastore

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/external_metastores/myExtMtSt"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/external_metastores/myExtMtSt")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/external_metastores/myExtMtSt",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/admin/external_metastores/myExtMtSt", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/admin/external_metastores/myExtMtSt   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

the response of the output data

Status Code

  • Successfully unregister the exeternal metasore

  • The exeternal metasore not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Set the particular property of the exeternal metasore

Set / Update / Delete an additional property for an already registered exeternal metasore

PATCH /admin/external_metastores/{external_metastore_name}

Request

Path Parameters

  • the name of external metastore

The key and value of the property of the exeternal metastore

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/admin/external_metastores/myExtMtSt"
    
    	payload := strings.NewReader("{\"property_key\":\"clients\",\"property_value\":\"20\"}")
    
    	req, _ := http.NewRequest("PATCH", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"property_key\":\"clients\",\"property_value\":\"20\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/admin/external_metastores/myExtMtSt")
      .patch(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PATCH",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/admin/external_metastores/myExtMtSt",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({property_key: 'clients', property_value: '20'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"property_key\":\"clients\",\"property_value\":\"20\"}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PATCH", "/dbapi/v5/admin/external_metastores/myExtMtSt", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PATCH   https://{HOSTNAME}/dbapi/v5/admin/external_metastores/myExtMtSt   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"property_key":"clients","property_value":"20"}'

Response

the response of the output data

Status Code

  • Successfully set the property

  • The exeternal metasore not found

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get a list of backups

Get a list of backups from current instance.

GET /manage/backups

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/backups"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/backups")
      .get()
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/backups",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/manage/backups", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/manage/backups   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • The list of backups

  • Bad request

  • Unauthorized

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Restore

Restore to a particular backup

POST /manage/backups/restore

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/backups/restore"
    
    	payload := strings.NewReader("{\"backup_id\":\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"backup_id\":\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/backups/restore")
      .post(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/backups/restore",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      backup_id: 'crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712'
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"backup_id\":\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\"}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/manage/backups/restore", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/manage/backups/restore   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"backup_id":"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712"}'

Response

Status Code

  • Task detail of the restore job

  • Bad request

  • Unauthorized

  • Unauthorized

No Sample Response

This method does not specify any sample responses.

Create a backup

Create a backup

POST /manage/backups/backup

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/backups/backup"
    
    	req, _ := http.NewRequest("POST", url, nil)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/backups/backup")
      .post(null)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/backups/backup",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/manage/backups/backup", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/manage/backups/backup   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Bad request

  • Unauthorized

  • Unexpected error

No Sample Response

This method does not specify any sample responses.

Get backup setting

Get backup setting

GET /manage/backups/setting

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/backups/setting"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/backups/setting")
      .get()
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/backups/setting",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/manage/backups/setting", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/manage/backups/setting   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • OK

  • Unexpected error

No Sample Response

This method does not specify any sample responses.

Update backup setting

update backup setting for scheduled backup time

POST /manage/backups/setting

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/backups/setting"
    
    	payload := strings.NewReader("{\"backup_time\":\"08:05\",\"retention\":14}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"backup_time\":\"08:05\",\"retention\":14}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/backups/setting")
      .post(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/backups/setting",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({backup_time: '08:05', retention: 14}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"backup_time\":\"08:05\",\"retention\":14}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/manage/backups/setting", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/manage/backups/setting   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"backup_time":"08:05","retention":14}'

Response

Status Code

  • OK

  • Bad request

  • Unauthorized

  • Unexpected error

No Sample Response

This method does not specify any sample responses.

Checks for any available database update

GET /manage/db_update

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/db_update"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/db_update")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/db_update",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/manage/db_update", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/manage/db_update   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Returns the available Db2 database update.

  • Bad request

  • Error

No Sample Response

This method does not specify any sample responses.

Trigger database update

POST /manage/db_update

Request

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/db_update"
    
    	payload := strings.NewReader("{\"scheduled_timestamp\":\"<ADD STRING VALUE>\",\"target_version\":\"1.9.1\"}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"scheduled_timestamp\":\"<ADD STRING VALUE>\",\"target_version\":\"1.9.1\"}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/db_update")
      .post(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/db_update",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({scheduled_timestamp: '<ADD STRING VALUE>', target_version: '1.9.1'}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"scheduled_timestamp\":\"<ADD STRING VALUE>\",\"target_version\":\"1.9.1\"}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/manage/db_update", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/manage/db_update   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"scheduled_timestamp":"<ADD STRING VALUE>","target_version":"1.9.1"}'

Response

Status Code

  • Db2 database update was triggered successfully.

  • Bad request

  • Error

No Sample Response

This method does not specify any sample responses.

Create a scaling request

Scale the amount of storage and cpu cores for your instance.

PUT /manage/scaling/add

Request

The number of cores and the amount of storage to scale.

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/scaling/add"
    
    	payload := strings.NewReader("{\"total_cores\":4,\"total_storage\":20480}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"total_cores\":4,\"total_storage\":20480}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/scaling/add")
      .put(body)
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/scaling/add",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({total_cores: 4, total_storage: 20480}));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"total_cores\":4,\"total_storage\":20480}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/manage/scaling/add", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/manage/scaling/add   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"total_cores":4,"total_storage":20480}'

Response

Status Code

  • The scaling request was successful. Returns the task ID used to scale the deployment.

  • Bad request

  • Unauthorized

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get supported scaling ranges and current allocated resources

View the allocated storage and cpu size at the time of the request. This request will also return the supported scaling ranges

GET /manage/scaling/resources

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/scaling/resources"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/scaling/resources")
      .get()
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/scaling/resources",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/manage/scaling/resources", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/manage/scaling/resources   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • Details for supported scaling ranges and current allocated resources.

  • Bad request

  • Unauthorized

  • Unexpected error

No Sample Response

This method does not specify any sample responses.

View scaling history

View scaling historical data.

GET /manage/scaling/history

Request

Query Parameters

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/manage/scaling/history?start=SOME_INTEGER_VALUE&end=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sort_column=SOME_STRING_VALUE&sort_order=SOME_STRING_VALUE&activity_type=SOME_STRING_VALUE"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/manage/scaling/history?start=SOME_INTEGER_VALUE&end=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sort_column=SOME_STRING_VALUE&sort_order=SOME_STRING_VALUE&activity_type=SOME_STRING_VALUE")
      .get()
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/manage/scaling/history?start=SOME_INTEGER_VALUE&end=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sort_column=SOME_STRING_VALUE&sort_order=SOME_STRING_VALUE&activity_type=SOME_STRING_VALUE",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/manage/scaling/history?start=SOME_INTEGER_VALUE&end=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sort_column=SOME_STRING_VALUE&sort_order=SOME_STRING_VALUE&activity_type=SOME_STRING_VALUE", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/manage/scaling/history?start=SOME_INTEGER_VALUE&end=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sort_column=SOME_STRING_VALUE&sort_order=SOME_STRING_VALUE&activity_type=SOME_STRING_VALUE'   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • View scaling history

  • Bad request

  • Unauthorized

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get tasks status

GET /tasks/status

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/tasks/status"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("accept", "application/json")
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/tasks/status")
      .get()
      .addHeader("accept", "application/json")
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/tasks/status",
      "headers": {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/tasks/status", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/tasks/status   -H 'accept: application/json'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • contain tasks status for scaling ,restore etc.

  • Bad request

  • Unauthorized

  • Error

No Sample Response

This method does not specify any sample responses.

Returns the list of users

Administrators can retrieve the list of all users in the system. Regular users will receive a list containing only their own user profile.

GET /users

Request

No Request Parameters

This method does not accept any request parameters.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/users"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/users")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/users",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/users", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/users   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Collection of users

Status Code

  • List of users

  • Error payload

No Sample Response

This method does not specify any sample responses.

Creates a new user. **PLATFORM ADMIN ONLY**

Creates a new user.

This operation is only available to platform administrators.The token used in authentication has to be IAM token.

POST /users

Request

User information

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/users"
    
    	payload := strings.NewReader("{\"id\":\"test_user\",\"iam\":false,\"ibmid\":\"<ADD STRING VALUE>\",\"name\":\"test_user\",\"password\":\"dEkMc43@gfAPl!867^dSbu\",\"role\":\"bluuser\",\"email\":\"test_user@mycompany.com\",\"locked\":\"no\",\"authentication\":{\"method\":\"internal\",\"policy_id\":\"Default\"}}")
    
    	req, _ := http.NewRequest("POST", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"id\":\"test_user\",\"iam\":false,\"ibmid\":\"<ADD STRING VALUE>\",\"name\":\"test_user\",\"password\":\"dEkMc43@gfAPl!867^dSbu\",\"role\":\"bluuser\",\"email\":\"test_user@mycompany.com\",\"locked\":\"no\",\"authentication\":{\"method\":\"internal\",\"policy_id\":\"Default\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/users")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/users",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      id: 'test_user',
      iam: false,
      ibmid: '<ADD STRING VALUE>',
      name: 'test_user',
      password: 'dEkMc43@gfAPl!867^dSbu',
      role: 'bluuser',
      email: 'test_user@mycompany.com',
      locked: 'no',
      authentication: {method: 'internal', policy_id: 'Default'}
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"id\":\"test_user\",\"iam\":false,\"ibmid\":\"<ADD STRING VALUE>\",\"name\":\"test_user\",\"password\":\"dEkMc43@gfAPl!867^dSbu\",\"role\":\"bluuser\",\"email\":\"test_user@mycompany.com\",\"locked\":\"no\",\"authentication\":{\"method\":\"internal\",\"policy_id\":\"Default\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("POST", "/dbapi/v5/users", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X POST   https://{HOSTNAME}/dbapi/v5/users   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"id":"test_user","iam":false,"ibmid":"<ADD STRING VALUE>","name":"test_user","password":"dEkMc43@gfAPl!867^dSbu","role":"bluuser","email":"test_user@mycompany.com","locked":"no","authentication":{"method":"internal","policy_id":"Default"}}'

Response

Status Code

  • User response

  • The creating user task has not been finished

  • Invalid parameters or user already exists

  • Operation is only available to administrators

  • Error payload

No Sample Response

This method does not specify any sample responses.

Get a specific user by ID

Get a specific user by ID. Platform administrators may retrieve user information for any user.The token for platform administrator used in authentication has to be IAM token. Regular users may only retrieve themselves.

GET /users/{id}

Request

Path Parameters

  • ID of the user to be fetched

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/users/bluadmin"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/users/bluadmin")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/users/bluadmin",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/users/bluadmin", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   https://{HOSTNAME}/dbapi/v5/users/bluadmin   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • User response

  • Access to this user is not allowed

  • The user does not exist

  • Error payload

No Sample Response

This method does not specify any sample responses.

Updates an existing user **PLATFORM ADMIN ONLY**

Updates an existing user. Attribute 'iam' can not be updated. That means no conversion between IBMid users and normal users.

Platform administrators may update user information for any user.The token for platform administrator used in authentication has to be IAM token.

PUT /users/{id}

Request

Path Parameters

  • ID of the user to be updated

User information

  • package main
    
    import (
    	"fmt"
    	"strings"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/users/{id}"
    
    	payload := strings.NewReader("{\"id\":\"<ADD STRING VALUE>\",\"ibmid\":\"<ADD STRING VALUE>\",\"name\":\"<ADD STRING VALUE>\",\"old_password\":\"<ADD STRING VALUE>\",\"new_password\":\"<ADD STRING VALUE>\",\"role\":\"bluadmin\",\"email\":\"<ADD STRING VALUE>\",\"locked\":\"yes\",\"authentication\":{\"method\":\"internal\",\"policy_id\":\"Default\"}}")
    
    	req, _ := http.NewRequest("PUT", url, payload)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"id\":\"<ADD STRING VALUE>\",\"ibmid\":\"<ADD STRING VALUE>\",\"name\":\"<ADD STRING VALUE>\",\"old_password\":\"<ADD STRING VALUE>\",\"new_password\":\"<ADD STRING VALUE>\",\"role\":\"bluadmin\",\"email\":\"<ADD STRING VALUE>\",\"locked\":\"yes\",\"authentication\":{\"method\":\"internal\",\"policy_id\":\"Default\"}}");
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/users/{id}")
      .put(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/users/{id}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      id: '<ADD STRING VALUE>',
      ibmid: '<ADD STRING VALUE>',
      name: '<ADD STRING VALUE>',
      old_password: '<ADD STRING VALUE>',
      new_password: '<ADD STRING VALUE>',
      role: 'bluadmin',
      email: '<ADD STRING VALUE>',
      locked: 'yes',
      authentication: {method: 'internal', policy_id: 'Default'}
    }));
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    payload = "{\"id\":\"<ADD STRING VALUE>\",\"ibmid\":\"<ADD STRING VALUE>\",\"name\":\"<ADD STRING VALUE>\",\"old_password\":\"<ADD STRING VALUE>\",\"new_password\":\"<ADD STRING VALUE>\",\"role\":\"bluadmin\",\"email\":\"<ADD STRING VALUE>\",\"locked\":\"yes\",\"authentication\":{\"method\":\"internal\",\"policy_id\":\"Default\"}}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/users/{id}", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/users/{id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'   -d '{"id":"<ADD STRING VALUE>","ibmid":"<ADD STRING VALUE>","name":"<ADD STRING VALUE>","old_password":"<ADD STRING VALUE>","new_password":"<ADD STRING VALUE>","role":"bluadmin","email":"<ADD STRING VALUE>","locked":"yes","authentication":{"method":"internal","policy_id":"Default"}}'

Response

Status Code

  • User response

  • The updating user task has not been finished

  • Access to this user is not allowed

  • The user does not exist

  • Error payload

No Sample Response

This method does not specify any sample responses.

Deletes an existing user **PLATFORM ADMIN ONLY**

Deletes an existing user.

Only administratos can delete users.The token for platform administrator used in authentication has to be IAM token.

DELETE /users/{id}

Request

Path Parameters

  • ID of the user to be deleted.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/users/{id}"
    
    	req, _ := http.NewRequest("DELETE", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/users/{id}")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "DELETE",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/users/{id}",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("DELETE", "/dbapi/v5/users/{id}", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X DELETE   https://{HOSTNAME}/dbapi/v5/users/{id}   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • User deleted

  • The deleting user task has not been finished

  • Removal of this user is not allowed

  • The user does not exist

  • Error payload

No Sample Response

This method does not specify any sample responses.

Locks a user account indefinitely. **PLATFORM ADMIN ONLY**

Platform admin users can unlock users' accounts which have been locked out following repeated failed authentication attempts.The token for platform administrator used in authentication has to be IAM token.

PUT /users/{id}/lock

Request

Path Parameters

  • ID of the user who will be locked

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/users/{id}/lock"
    
    	req, _ := http.NewRequest("PUT", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/users/{id}/lock")
      .put(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/users/{id}/lock",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/users/{id}/lock", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/users/{id}/lock   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • User response

  • The locking user task has not been finished

  • Cannot edit this user

  • The user does not exist

  • Error payload

No Sample Response

This method does not specify any sample responses.

Unlocks a user account **PLATFORM ADMIN ONLY**

Platform admin users can unlock users' accounts which have been locked out following repeated failed authentication attempts.The token for platform administrator used in authentication has to be IAM token.

PUT /users/{id}/unlock

Request

Path Parameters

  • ID of the user who will be unlocked

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/users/{id}/unlock"
    
    	req, _ := http.NewRequest("PUT", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/users/{id}/unlock")
      .put(null)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "PUT",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/users/{id}/unlock",
      "headers": {
        "content-type": "application/json",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("PUT", "/dbapi/v5/users/{id}/unlock", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X PUT   https://{HOSTNAME}/dbapi/v5/users/{id}/unlock   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

Status Code

  • User response

  • The unlocking user task has not been finished

  • Cannot edit this user

  • The user does not exist

  • Error payload

No Sample Response

This method does not specify any sample responses.

Return the histogram of response time for a specified time frame. **DB ADMIN ONLY**

Return the histogram of response time for a specified time frame.

GET /metrics/response_time_histograms

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/response_time_histograms?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/response_time_histograms?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/response_time_histograms?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/response_time_histograms?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/response_time_histograms?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of histogram data.

Status Code

  • Return the histogram of response time for a specified time frame

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

Return the list of average response time for a specified time frame. **DB ADMIN ONLY**

Return the list of average response time for a specified time frame.

GET /metrics/response_time

Request

Custom Headers

  • Database profile name.

Query Parameters

  • Start timestamp.

  • End timestamp.

  • package main
    
    import (
    	"fmt"
    	"net/http"
    	"io/ioutil"
    )
    
    func main() {
    
    	url := "https://{HOSTNAME}/dbapi/v5/metrics/response_time?start=1546272000000&end=1546272300000"
    
    	req, _ := http.NewRequest("GET", url, nil)
    
    	req.Header.Add("content-type", "application/json")
    	req.Header.Add("x-db-profile", "SOME_STRING_VALUE")
    	req.Header.Add("authorization", "Bearer {AUTH_TOKEN}")
    	req.Header.Add("x-deployment-id", "{DEPLOYMENT_ID}")
    
    	res, _ := http.DefaultClient.Do(req)
    
    	defer res.Body.Close()
    	body, _ := ioutil.ReadAll(res.Body)
    
    	fmt.Println(res)
    	fmt.Println(string(body))
    
    }
  • OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://{HOSTNAME}/dbapi/v5/metrics/response_time?start=1546272000000&end=1546272300000")
      .get()
      .addHeader("content-type", "application/json")
      .addHeader("x-db-profile", "SOME_STRING_VALUE")
      .addHeader("authorization", "Bearer {AUTH_TOKEN}")
      .addHeader("x-deployment-id", "{DEPLOYMENT_ID}")
      .build();
    
    Response response = client.newCall(request).execute();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "{HOSTNAME}",
      "port": null,
      "path": "/dbapi/v5/metrics/response_time?start=1546272000000&end=1546272300000",
      "headers": {
        "content-type": "application/json",
        "x-db-profile": "SOME_STRING_VALUE",
        "authorization": "Bearer {AUTH_TOKEN}",
        "x-deployment-id": "{DEPLOYMENT_ID}"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
  • import http.client
    
    conn = http.client.HTTPSConnection("{HOSTNAME}")
    
    headers = {
        'content-type': "application/json",
        'x-db-profile': "SOME_STRING_VALUE",
        'authorization': "Bearer {AUTH_TOKEN}",
        'x-deployment-id': "{DEPLOYMENT_ID}"
        }
    
    conn.request("GET", "/dbapi/v5/metrics/response_time?start=1546272000000&end=1546272300000", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
  • curl -X GET   'https://{HOSTNAME}/dbapi/v5/metrics/response_time?start=1546272000000&end=1546272300000'   -H 'authorization: Bearer {AUTH_TOKEN}'   -H 'content-type: application/json'   -H 'x-db-profile: SOME_STRING_VALUE'   -H 'x-deployment-id: {DEPLOYMENT_ID}'

Response

A list of AverageResponseTime.

Status Code

  • Return the list of average response time for a specified time frame.

  • Database profile not found.

  • Error payload.

No Sample Response

This method does not specify any sample responses.

id=curlclassName=tab-item-selected