Indexes API allows you to retrieve indexes, memory, and dictionaries across your Indexima cluster.

Retrieve all indexes

Retrieve all indexes in your Indexima cluster.

GET /api/get/indexes
JS

JSON Format

Index has the following JSON format:

NameTypeDescription
schemas.schemaStringThe name of the schema for the indexes below it
tables.nameStringThe name of the table for the indexes below it
dicoIntegerThe memory size, in bytes, of the dictionaries 
indexes.nameString The name of the index
indexes.countInteger The number of lines of this index
indexes.sizeIntegerThe memory size, in bytes, of this index
indexes.mainBoolean If this index contains all the columns of his table 

Example response

{
  "schemas": [
    {
      "schema": "default",
      "tables": [
        {
          "name": "nyc_yellow",
          "dico": 812454,
          "indexes": [
            {
              "name": "nyc_yellow0",
              "count": 10000,
              "size": 15000,
              "main": true
            }
          ]
        }
      ]
    }
  ]
}
XML

Get the memory used for each index

Retrieve the memory used for all tables on each node of your cluster. This request is equivalent to execute a SHOW MEMORY ALL SQL command.

GET /api/get/memory
CODE

JSON Format

Memory is represented by a tree structure with the following path :

Name of the node -> Schema -> Table -> Index

NameTypeDescription
loadedBooleantrue if the current index is loaded in memory.
dictionaryIntegerThe memory size, in bytes, of the dictionaries
sizeIntegerThe memory size, in bytes, of the dictionaries 
countIntegerThe number of lines of this index
bucketsizeIntegerThe disk size of the bucket 
isOnErrorBooleantrue if this index is on error and can't be used
isDimensionBooleantrue if the parent table is a dimension table
isExternalBooleantrue if the parent table is an external table
isTemporaryBooleantrue if the parent table is a temporary table 

Example response

{
 "Node 0": {
   "etalon": {
     "nyc_cab_dim_dest": {
       "nyc_cab_dim_dest0": {
         "loaded": true,
         "dictionary": 8729279,
         "size": 2716092,
         "isOnError": false,
         "isDimension": true,
         "isExternal": false,
         "count": 81276,
         "isTemporary": false,
         "bucketsize": 0
      }
    }
  }
}  
JS

Get the dictionaries details

Retrieve the dictionary details used for all tables on each node of your cluster. This request is equivalent to execute a SHOW DICTIONARIES ALL SQL command.

GET /api/get/dictionaries
CODE

JSON Format

Dictionary is represented by a tree structure with the following path :

Name of the node -> Schema -> Table -> Dictionary field or expression

Two structures are sent : 

  • Total memory and lines count, by node
  • Details for each table on each node
NameTypeDescription
sizeIntegerThe memory size, in bytes, of the dictionaries 
countIntegerThe number of lines of this index

Example response

{
  "totals": {
    "bynodes": {
      "Node 0": {
        "count": 5440,
        "size": 26907305
      }
    }
  },
  "details": {
    "Node 0": {
      "etalon": {
        "nyc_yellow_full": {
          "(Floor(If((1=0),NULL,(`etalon`.`nyc_yellow_full`.`trip_distance`/1)))<60)": {
            "count": 1,
            "size": 1048998
          },
          "passenger_count": {
            "count": 8,
            "size": 1049854
          }
        }
      }
    }
  }
}
JS