Maintenance attributes
field | type | description |
---|---|---|
id | string | unique ID |
database_id | string | database identifier |
type | string | type of the maintenance |
status | string | status of the maintenance |
started_at | date | when the maintenance started |
ended_at | date | when the maintenance ended |
Example object:
{
"maintenance": {
"id": "my-maintenance-123",
"database_id": "my-db-123",
"type": "no-op",
"status": "done",
"started_at": "2023-07-04T15:59:50.407Z",
"ended_at": "2023-07-04T15:59:50.408Z"
}
}
GET https://$DB_API_URL/api/databases/[:db_id]/maintenance
List maintenance of a specific database. This endpoint supports pagination.
Example request
curl -H "Accept: application/json" -H "Content-Type: application/json" \
-H "Authorization: Bearer $DB_BEARER_TOKEN" \
-X GET https://$DB_API_URL/api/databases/my-db-123/maintenance
Returns 200 OK
{
"maintenance": [
{
"id": "my-maintenance-1",
"database_id": "my-db-123",
"type": "no-op",
"status": "scheduled",
"started_at": null,
"ended_at": null
},
{
"id": "my-maintenance-2",
"database_id": "my-db-123",
"type": "no-op",
"status": "done",
"started_at": "2023-07-04T15:59:50.407Z",
"ended_at": "2023-07-04T15:59:50.408Z"
}
],
"meta": {
"pagination": {
"current_page": 1,
"prev_page":null,
"next_page":null,
"total_pages":1,
"total_count":2
}
}
}
GET https://$DB_API_URL/api/databases/[:db_id]/maintenance/[:maintenance_id]
Retrieve information of a specific maintenance.
Example request
curl -H "Accept: application/json" -H "Content-Type: application/json" \
-H "Authorization: Bearer $DB_BEARER_TOKEN" \
-X GET https://$DB_API_URL/api/databases/my-db-123/maintenance/my-maintenance-123
Returns 200 OK
{
"maintenance": {
"id": "my-maintenance-123",
"database_id": "my-db-123",
"type": "no-op",
"status": "done",
"started_at": "2023-07-04T15:59:50.407Z",
"ended_at": "2023-07-04T15:59:50.408Z"
}
}