Download OpenAPI specification:
This is the internal REST API spec. Most endpoints here will require JWT authentication, in contrast with public API where it will be API key based.
Create a new JWT token (access/refresh) for a user.
The token that is returned then should be used in the Authorization
header (HTTP_AUTHORIZATION
) for all subsequent requests.
string | |
password | string |
{- "email": "user@company.com",
- "password": "YourPassword"
}
{- "access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
- "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
More info can be found here.
refresh | string |
{- "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...."
}
{- "access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
This is really useful when you want to invalidate a specific token or avoid misuse of a token. More info can be found here.
refresh | string |
{- "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...."
}
Get user details.
The user model might change over time, so it is recommended to always check the backend model/serializer.
{- "email": "user@company.com",
- "first_name": "John",
- "company_name": "DBtune",
- "metadata": {
- "hasAnsweredQuestionnaire": true
}, - "is_verified": true
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
agent_start_time | number Agent start time (unix timestamp UTC) |
agent_version | string |
{- "agent_start_time": 1719243555,
- "agent_version": "1.0.0"
}
[- {
- "uuid": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "name": "Example Database Instance",
- "hosting": "on_prem",
- "db_engine": "postgresql",
- "tuning_target": "transactions_per_second",
- "cloud_provider": "AWS",
- "agent_last_update": null,
- "agent_start_time": null,
- "agent_version": null,
- "restart_policy": false,
- "parameter_space": null,
- "optimiser_config": null,
- "iteration_duration": 5,
- "number_of_iterations": 32,
- "max_query_runtime_multiplier": 2,
- "is_deleted": false,
- "is_agent_alive": true,
- "created_at": "2024-06-28T11:19:55.802847Z",
- "updated_at": "2024-06-28T11:19:55.802847Z"
}
]
name | string The name of the database instance. |
restart_policy | boolean Defines whether the instance should have an automatic restart policy. |
db_engine | string Enum: "postgresql" "aurora_postgresql" "aurora_mysql" "mysql" "oracle" "sap_hana" "rds_postgresql" The database engine to be used. |
cloud_provider | string Enum: "AWS" "Google" "Azure" "Aiven" The cloud provider where the instance is hosted. |
hosting | string Enum: "managed" "on_prem" The hosting environment for the instance. |
db_flavour | string Value: "epas" Specifies the specific 'flavour' of the db_engine. |
{- "name": "Example Database Instance",
- "restart_policy": false,
- "db_engine": "postgresql",
- "cloud_provider": "AWS",
- "hosting": "on_prem",
- "db_flavour": "epas"
}
{- "uuid": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "name": "Example Database Instance",
- "hosting": "on_prem",
- "db_engine": "postgresql",
- "tuning_target": "transactions_per_second",
- "cloud_provider": "AWS",
- "agent_last_update": null,
- "agent_start_time": null,
- "agent_version": null,
- "restart_policy": false,
- "parameter_space": null,
- "optimiser_config": null,
- "iteration_duration": 5,
- "number_of_iterations": 32,
- "max_query_runtime_multiplier": 2,
- "is_deleted": false,
- "is_agent_alive": true,
- "created_at": "2024-06-28T11:19:55.802847Z",
- "updated_at": "2024-06-28T11:19:55.802847Z"
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
{- "uuid": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "name": "Example Database Instance",
- "hosting": "on_prem",
- "db_engine": "postgresql",
- "tuning_target": "transactions_per_second",
- "cloud_provider": "AWS",
- "agent_last_update": null,
- "agent_start_time": null,
- "agent_version": null,
- "restart_policy": false,
- "parameter_space": null,
- "optimiser_config": null,
- "iteration_duration": 5,
- "number_of_iterations": 32,
- "max_query_runtime_multiplier": 2,
- "is_deleted": false,
- "is_agent_alive": true,
- "created_at": "2024-06-28T11:19:55.802847Z",
- "updated_at": "2024-06-28T11:19:55.802847Z"
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
name | string The name of the database instance. |
restart_policy | boolean Defines whether the instance should have an automatic restart policy. |
parameter_space | object Parameter space to override the default parameter space. |
optimiser_config | object Defines whether the instance should have an automatic restart policy. |
tuning_target | string Enum: "average_query_runtime" "transactions_per_second" The tuning target for the instance. |
{- "name": "Example Database Instance",
- "restart_policy": true,
- "parameter_space": { },
- "optimiser_config": { },
- "tuning_target": "average_query_runtime"
}
{- "uuid": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "name": "Example Database Instance",
- "hosting": "on_prem",
- "db_engine": "postgresql",
- "tuning_target": "transactions_per_second",
- "cloud_provider": "AWS",
- "agent_last_update": null,
- "agent_start_time": null,
- "agent_version": null,
- "restart_policy": false,
- "parameter_space": null,
- "optimiser_config": null,
- "iteration_duration": 5,
- "number_of_iterations": 32,
- "max_query_runtime_multiplier": 2,
- "is_deleted": false,
- "is_agent_alive": true,
- "created_at": "2024-06-28T11:19:55.802847Z",
- "updated_at": "2024-06-28T11:19:55.802847Z"
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
object |
{- "system_info": {
- "node_cpu_count": {
- "type": "int",
- "value": 0
}, - "node_memory_total": {
- "type": "bytes",
- "value": 0
}, - "pg_version": {
- "type": "string",
- "value": "string"
}, - "pg_max_connections": {
- "type": "int",
- "value": 0
}
}
}
{- "message": "System info is changed"
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
timestamp_from required | string |
timestamp_to | string |
{- "timestamp_from": "2023-06-26 17:02:51.302514+00",
- "timestamp_to": "2100-06-26 17:02:51.302514+00"
}
[- {
- "metrics": {
- "node_cpu_count": {
- "type": "float",
- "value": 4
}, - "node_memory_total": {
- "type": "bytes",
- "value": 17179869184
}, - "pg_version": {
- "type": "string",
- "value": "15.0"
}, - "pg_max_connections": {
- "type": "int",
- "value": 100
}, - "node_cpu_usage": {
- "type": "percentage",
- "value": 75.5
}, - "node_memory_used": {
- "type": "bytes",
- "value": 8589934592
}, - "perf_transactions_per_second": {
- "type": "float",
- "value": 150
}, - "perf_average_query_runtime": {
- "type": "float",
- "value": 0.5
}
}, - "created_at": "2023-06-26 17:02:51.302514+00"
}
]
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
metric required | string The specific metric to retrieve (e.g. node_cpu_usage, perf_transactions_per_second) |
timestamp_from | string |
timestamp_to | string |
{- "timestamp_from": "2023-06-26 17:02:51.302514+00",
- "timestamp_to": "2100-06-26 17:02:51.302514+00"
}
{- "type": "int",
- "values": [
- 75.5,
- 80.2
], - "timestamps": [
- "2024-06-28T11:19:55.802847Z",
- "2024-06-28T11:20:55.802847Z"
]
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
required | object (NormalisedMetricsObject) |
timestamp required | string <date-time> When the metrics were collected |
{- "metrics": {
- "node_cpu_count": {
- "type": "float",
- "value": 4
}, - "node_memory_total": {
- "type": "bytes",
- "value": 17179869184
}, - "pg_version": {
- "type": "string",
- "value": "15.0"
}, - "pg_max_connections": {
- "type": "int",
- "value": 100
}, - "node_cpu_usage": {
- "type": "percentage",
- "value": 75.5
}, - "node_memory_used": {
- "type": "bytes",
- "value": 8589934592
}, - "perf_transactions_per_second": {
- "type": "float",
- "value": 150
}, - "perf_average_query_runtime": {
- "type": "float",
- "value": 0.5
}
}, - "timestamp": "2019-08-24T14:15:22Z"
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
status | string Enum: "active" "inactive" "recommended" "failed" "rejected" Example: status=active Filter configurations by status. Use 'recommended' to get only recommended configurations. |
[- {
- "config": [
- {
- "name": "array_nulls",
- "unit": null,
- "context": "user",
- "setting": "on",
- "vartype": "bool"
}, - {
- "name": "autovacuum",
- "unit": null,
- "context": "sighup",
- "setting": "on",
- "vartype": "bool"
}
], - "id": 1,
- "status": "active",
- "changed_at": "2024-06-28T11:19:55.802847Z",
- "created_at": "2024-06-28T11:19:55.802847Z",
- "knob_application": "reload",
- "knobs_overrides": [
- "shared_buffers",
- "work_mem"
], - "performance": {
- "transactions_per_second": 0,
- "average_query_runtime": 0
}, - "config_validity": "valid"
}
]
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
name | string |
unit | string or null |
context | string |
setting | string |
vartype | string |
[- {
- "name": "array_nulls",
- "unit": null,
- "context": "user",
- "setting": "on",
- "vartype": "bool"
}, - {
- "name": "autovacuum",
- "unit": null,
- "context": "sighup",
- "setting": "on",
- "vartype": "bool"
}
]
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
config_id required | integer Example: 1 The ID of the specific configuration to retrieve |
{- "config": [
- {
- "name": "array_nulls",
- "unit": null,
- "context": "user",
- "setting": "on",
- "vartype": "bool"
}, - {
- "name": "autovacuum",
- "unit": null,
- "context": "sighup",
- "setting": "on",
- "vartype": "bool"
}
], - "id": 1,
- "status": "active",
- "changed_at": "2024-06-28T11:19:55.802847Z",
- "created_at": "2024-06-28T11:19:55.802847Z",
- "applied_at": "2024-06-28T11:19:55.802847Z",
- "knob_application": "reload",
- "knobs_overrides": [
- "shared_buffers",
- "work_mem"
], - "performance": {
- "transactions_per_second": 150,
- "average_query_runtime": 0.5
}, - "config_validity": "valid"
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
tuning_session_id required | string The ID of the specific tuning session to retrieve |
status | string Enum: "active" "inactive" "recommended" "failed" "rejected" Example: status=active Filter configurations by status. Use 'recommended' to get only recommended configurations. |
[- {
- "id": 1,
- "status": "active",
- "changed_at": "2024-06-28T11:19:55.802847Z",
- "created_at": "2024-06-28T11:19:55.802847Z",
- "knob_application": "reload",
- "knobs_overrides": [
- "shared_buffers",
- "work_mem"
]
}
]
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
[- {
- "id": 1,
- "status": "active",
- "changed_at": "2024-06-28T11:19:55.802847Z",
- "created_at": "2024-06-28T11:19:55.802847Z",
- "config_validity": "valid"
}
]
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
[- {
- "id": 1,
- "log_message": "An event has occurred",
- "log_code": "T001",
- "log_level": "info",
- "created_at": "2024-06-28T11:19:55.802847Z"
}
]
Create a new recommended configuration based on a specific configuration. This will only work if there is no active tuning session for the database.
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
config_id required | integer Example: 1 The ID of the configuration to apply |
{- "message": "Recommended configuration created successfully. 123"
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
operation | string Enum: "start" "stop" The operation to perform on the tuning session. |
{- "operation": "start"
}
{- "message": "Tuning session started."
}
uuid required | string <uuid> Example: 3071dd11-91e6-4351-b445-81a6f121d6ee The UUID of the database instance |
status | string Enum: "active" "finished" "failed" "cancelled" Example: status=active Filter tuning sessions by status. Use 'active' to get only active tuning sessions. |
[- {
- "uuid": "42a5efb2-1cb2-4a5f-a2f4-ea82ea8faf25",
- "name": "string",
- "status": "active",
- "configurations": [
- "1"
], - "performance_metrics": null,
- "tuning_settings": {
- "objective": "transactions_per_second",
- "restart_policy": false
}, - "created_at": "2024-09-05T08:27:20.571742Z",
- "ended_at": null,
- "db_instance": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "system_info": 1
}
]
Handles a guardrail request from the agent. The agent can request either a critical action (revert to baseline) or a non-critical action (recommend new configuration) based on the system's performance.
uuid required | string The UUID of the database instance |
level required | string Enum: "critical" "non-critical" The severity level of the guardrail request |
{- "level": "critical"
}
read_status | string Enum: "read" "unread" Filter notifications by read status |
[- {
- "id": 1,
- "message": "New configuration available",
- "type": "warning",
- "notification_targets": [
- "email",
- "alert"
], - "count": 1,
- "context": {
- "config_id": "123"
}, - "log_code": "T001",
- "db_instance": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "user_id": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "read_at": "2024-06-28T11:19:55.802847Z",
- "created_at": "2024-06-28T11:19:55.802847Z",
- "updated_at": "2024-06-28T11:19:55.802847Z"
}
]
pk required | integer Example: 1 The ID of the notification to update |
read_at | string <date-time> |
{- "read_at": "2024-06-28T11:19:55.802847Z"
}
{- "id": 1,
- "message": "New configuration available",
- "type": "warning",
- "notification_targets": [
- "email",
- "alert"
], - "count": 1,
- "context": {
- "config_id": "123"
}, - "log_code": "T001",
- "db_instance": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "user_id": "3071dd11-91e6-4351-b445-81a6f121d6ee",
- "read_at": "2024-06-28T11:19:55.802847Z",
- "created_at": "2024-06-28T11:19:55.802847Z",
- "updated_at": "2024-06-28T11:19:55.802847Z"
}