List MySQL databases belonging to a Project
GET/projects/ {projectId}/ mysql-databases/
v2
GET
database-list-mysql-databases
Request
- projectIdstring (uuid)required
ID of the Project to list MySQLDatabases for.
Responses
application/json
OK
- Schema documentation
- Example
- JSON Schema
- Array[
- *object
- characterSettingsobjectrequired
- characterSetstringrequired
A valid MySQL character set
- collationstringrequired
A valid MySQL collation
- createdAtstring (date-time)required
- descriptionstringrequired
- externalHostnamestringrequired
- finalizersarray of string (≥ 1 characters)
- Array[
- *string (≥ 1 characters)
]
- hostnamestringrequired
- idstring (uuid)required
- isReadybooleanrequired
- isSharedbooleanrequired
- mainUserobject
- accessIpMaskstring
- accessLevelstring (one of: full, readonly)required
- createdAtstring (date-time)required
- databaseIdstring (uuid)required
- descriptionstring
- disabledbooleanrequired
- externalAccessbooleanrequired
- idstring (uuid)required
- mainUserbooleanrequired
- namestringrequired
- passwordUpdatedAtstring (date-time)required
- statusstring (one of: pending, ready, error, terminating, disabled)required
- statusSetAtstring (date-time)required
- updatedAtstring (date-time)required
- namestringrequired
- projectIdstring (uuid)required
- statusstring (one of: pending, ready, migrating, importing, error)required
- statusSetAtstring (date-time)required
- storageUsageInBytesinteger (int64)required
- storageUsageInBytesSetAtstring (date-time)required
- updatedAtstring (date-time)required
- versionstringrequired
]
Content-Type: application/json
[
{
"characterSettings": {
"characterSet": "utf8mb4",
"collation": "utf8mb4_general_ci"
},
"createdAt": "2025-08-29T18:08:47.946Z",
"description": "string",
"externalHostname": "string",
"finalizers": [
"string"
],
"hostname": "string",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"isReady": true,
"isShared": true,
"mainUser": {
"accessIpMask": "string",
"accessLevel": "full",
"createdAt": "2025-08-29T18:08:47.946Z",
"databaseId": "f0f86186-0a5a-45b2-aa33-502777496347",
"description": "string",
"disabled": true,
"externalAccess": true,
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"mainUser": true,
"name": "string",
"passwordUpdatedAt": "2025-08-29T18:08:47.946Z",
"status": "pending",
"statusSetAt": "2025-08-29T18:08:47.946Z",
"updatedAt": "2025-08-29T18:08:47.946Z"
},
"name": "string",
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"status": "pending",
"statusSetAt": "2025-08-29T18:08:47.946Z",
"storageUsageInBytes": 123,
"storageUsageInBytesSetAt": "2025-08-29T18:08:47.946Z",
"updatedAt": "2025-08-29T18:08:47.946Z",
"version": "string"
}
]
{
"items": {
"properties": {
"characterSettings": {
"properties": {
"characterSet": {
"type": "string",
"description": "A valid MySQL character set",
"example": "utf8mb4"
},
"collation": {
"type": "string",
"description": "A valid MySQL collation",
"example": "utf8mb4_general_ci"
}
},
"required": [
"characterSet",
"collation"
],
"type": "object"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"description": {
"type": "string"
},
"externalHostname": {
"type": "string"
},
"finalizers": {
"items": {
"minLength": 1,
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"hostname": {
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"isReady": {
"type": "boolean"
},
"isShared": {
"type": "boolean"
},
"mainUser": {
"properties": {
"accessIpMask": {
"type": "string"
},
"accessLevel": {
"enum": [
"full",
"readonly"
],
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"databaseId": {
"format": "uuid",
"type": "string"
},
"description": {
"type": "string"
},
"disabled": {
"type": "boolean"
},
"externalAccess": {
"type": "boolean"
},
"id": {
"format": "uuid",
"type": "string"
},
"mainUser": {
"type": "boolean"
},
"name": {
"type": "string"
},
"passwordUpdatedAt": {
"format": "date-time",
"type": "string"
},
"status": {
"enum": [
"pending",
"ready",
"error",
"terminating",
"disabled"
],
"type": "string"
},
"statusSetAt": {
"format": "date-time",
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"createdAt",
"updatedAt",
"databaseId",
"name",
"passwordUpdatedAt",
"mainUser",
"disabled",
"accessLevel",
"externalAccess",
"status",
"statusSetAt"
],
"type": "object"
},
"name": {
"type": "string"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"status": {
"enum": [
"pending",
"ready",
"migrating",
"importing",
"error"
],
"type": "string"
},
"statusSetAt": {
"format": "date-time",
"type": "string"
},
"storageUsageInBytes": {
"format": "int64",
"type": "integer"
},
"storageUsageInBytesSetAt": {
"format": "date-time",
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"id",
"createdAt",
"updatedAt",
"projectId",
"name",
"description",
"version",
"characterSettings",
"hostname",
"isShared",
"isReady",
"storageUsageInBytes",
"storageUsageInBytesSetAt",
"status",
"statusSetAt",
"externalHostname"
],
"type": "object"
},
"type": "array"
}
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/f0f86186-0a5a-45b2-aa33-502777496347/mysql-databases
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.database.listMysqlDatabases({
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Database\ListMysqlDatabases\ListMysqlDatabasesRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new ListMysqlDatabasesRequest(
projectId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->database()->listMysqlDatabases($request);
var_dump($response->getBody();