Show Data Action

Request

GET /api/show_data

Description

Used to get the total data volume of the cluster or the data volume of the specified database. Unit byte.

Path parameters

None

Query parameters

  • db

    Optional. If specified, get the data volume of the specified database.

Request body

None

Response

  1. Specify the amount of data in the database.

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": {
    5. "default_cluster:db1": 381
    6. },
    7. "count": 0
    8. }
  2. Total data

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": {
    5. "__total_size": 381
    6. },
    7. "count": 0
    8. }

Examples

  1. Get the data volume of the specified database

    1. GET /api/show_data?db=db1
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "default_cluster:db1": 381
    8. },
    9. "count": 0
    10. }
  2. Get the total data volume of the cluster

    1. GET /api/show_data
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "__total_size": 381
    8. },
    9. "count": 0
    10. }