http://localhost:8081
Uploads a file and saves it to a directory configured on the server
POST /admin/importSQL
Media type: application/octet-stream
Type: any
Saved
URI to the created <<resourcePathName|!singularize>> item
Bad request
Media type: text/plain
Type: any
Example:
"unable to add <<resourcePathName|!singularize>>"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Set logging level for all loggers in the JVM or just for a specific package / class
PUT /admin/loglevel
The log level to set the module's log to
The package / class to set the logging level to, defaults to all packages
Returns packages with log level of the updated packages
Media type: application/json
Type: any
Example:
{"package" : "log level" , "package2" : "log level"}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get the logging level for all loggers in the JVM
GET /admin/loglevel
dumps jstacks every N seconds to a jstack file to find potential bottlenecks. Looking at this | file you can see if there are functions blocking for too long
PUT /admin/jstack
Jstack request successful
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get JVM memory info
GET /admin/memory
Whether to save returned values into a least recently inserted cache. | Every call to the API after calling with history=true will return results from up | to the previous 100 calls to this API
run one of the following maintenance jobs on the Postgres DB. | analyze, vacuum, vacuum analyze, vacuum verbose
POST /admin/postgres_maintenance
Table name to run command on
The command to run
Get active PostgreSQL sessions
GET /admin/postgres_active_sessions
Database name to retrieve info for
Returns active sessions with the following information. | process ID of the currently connected user to the database. | name of the database to which the user is currently connected. | the full text of the SQL query that is being executed by the client. | etc...
Media type: application/json
Type: any
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get load information on PostgreSQL
GET /admin/postgres_load
Database name to retrieve info for
Returns load with the following information. | Number of active connections. | Number of rollbacks and commits issued. | Number of blocks read ( block = an 8kb segment information the file storing the table. ). | Number of buffer hits (cache) | Note that the function calls SELECT pg_stat_reset(); to clear stats, waits 10 seconds, and | then returns with the info collected during those 10 seconds
Media type: application/json
Type: any
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get access stats on the PostgreSQL tables
GET /admin/postgres_table_access_stats
amount of disk usage for a specific database and its associated tables and indexes.
GET /admin/postgres_table_size
Database name to retrieve info for
table index usage rates per table
GET /admin/table_index_usage
Check for currently running queries that have been executing longer than X seconds
GET /admin/slow_queries
time a query should be running for it to be considered slow
Returns the size of the entire database for example, db_size = 711 MB
GET /admin/total_db_size
Database name to retrieve info for
Returns a list of the tables / indexes in the shared_buffers (cache) and their size. This is | an expensive API from a DB resource perspective and should not run frequently (every few hours should suffice)
GET /admin/db_cache_summary
Returns a list of queries in transactions that are blocking other queries. The result includes the blocking query, the query being blocked, and their pids
GET /admin/list_locking_queries
Stops a query from running based on its PID using the pg_terminate_backend command
DELETE /admin/kill_query
PID of a query
Drop indexes, useful before a large batch load, tenantid will be used to select the correct schema to use
PUT /admin/postgres_drop_indexes
Create indexes, useful if prior to a large batch load the indexes were dropped, tenantid will be used to select the correct schema to use
PUT /admin/postgres_create_indexes
Sets the AES secret key that the postgres config file password was encrypted with. The key will only be checked | when the configuration file is read in and the DB connection is created
POST /admin/set_AES_key
Secret key to use to decrypt the password of the postgres-configuration file
Secret key set
The API takes the secret key passed in and the x-okapi-tenant header and returns the DB password generated for | that tenant's schema
POST /admin/get_password
Secret key to use to decrypt the password of the postgres-configuration file
returned password
Media type: text/plain
Type: any
Example:
as35235+df+df/ggr
Bad request
Media type: text/plain
Type: any
Example:
"unable to add <<resourcePathName|!singularize>>"
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
The API returns 200 if service is up and responding. Should be overridden | by individual services that want to actually run some business logic to determine health.
GET /admin/health