Skip to main content

List Redis databases belonging to a Project

GET/v2/projects/{projectId}/redis-databases
API version
v2
Request method
GET
Operation ID
database-list-redis-databases

Request​

  • projectIdstringrequired

    ID of the Project to list RedisDatabases for.

Responses​

Format
application/json
Description

OK

  • Array[
    • *object
      • configurationobject

        The configuration for a RedisDatabase.

        • additionalFlagsarray of string (≥ 1 characters)

          Additional flags passed to the database.

          • Array[
            • *string (≥ 1 characters)
            ]
        • maxMemorystring

          The database's maximum memory. This may be a number, optionally suffixed by one of the IEC binary suffixes Ki, Mi or Gi.

        • maxMemoryPolicystring

          The database's key eviction policy. See the Redis documentation on key evictions‍ for more information.

        • persistentboolean

          Persistent status of the database.

      • createdAtstring (date-time)required
      • descriptionstringrequired
      • finalizersarray of string (≥ 1 characters)
        • Array[
          • *string (≥ 1 characters)
          ]
      • hostnamestringrequired
      • idstring (uuid)required
      • namestringrequired
      • portintegerrequired
      • projectIdstring (uuid)required
      • statusstring (one of: pending, ready, migrating, importing, error, terminating)required
      • statusSetAtstring (date-time)required
      • storageUsageInBytesinteger (int64)required
      • storageUsageInBytesSetAtstring (date-time)required
      • updatedAtstring (date-time)required
      • versionstringrequired
    ]
Content-Type: application/json

[
{
"configuration": {
"additionalFlags": [
"--tcp-keepalive",
"300"
],
"maxMemory": "16Mi",
"maxMemoryPolicy": "allkeys-lru",
"persistent": true
},
"createdAt": "2023-03-28T13:15:00.000Z",
"description": "My first RedisDatabase!",
"finalizers": [
"app:appinstallation:28471edf-d266-4d79-8ca8-169e330746db"
],
"hostname": "redis-xxxxxx.pg-example.db.example.com",
"id": "fcfe9aea-84d5-46eb-ac6f-a0ccffa908b1",
"name": "redis_xxxxxx",
"port": 6379,
"projectId": "9f2bddf1-dea6-4441-b4fe-a22ff39caff8",
"status": "error",
"statusSetAt": "2024-03-05T09:26:32.000Z",
"storageUsageInBytes": 10485760,
"storageUsageInBytesSetAt": "2024-03-05T09:26:32.000Z",
"updatedAt": "2023-03-29T15:50:10.000Z",
"version": "7.0"
}
]
{
"items": {
"example": {
"configuration": {
"additionalFlags": [
"--tcp-keepalive",
"300"
],
"maxMemory": "16Mi",
"maxMemoryPolicy": "allkeys-lru",
"persistent": true
},
"createdAt": "2023-03-28T13:15:00.000Z",
"description": "My first RedisDatabase!",
"finalizers": [
"app:appinstallation:28471edf-d266-4d79-8ca8-169e330746db"
],
"hostname": "redis-xxxxxx.pg-example.db.example.com",
"id": "fcfe9aea-84d5-46eb-ac6f-a0ccffa908b1",
"name": "redis_xxxxxx",
"port": 6379,
"projectId": "9f2bddf1-dea6-4441-b4fe-a22ff39caff8",
"status": "error",
"statusSetAt": "2024-03-05T09:26:32.000Z",
"storageUsageInBytes": 10485760,
"storageUsageInBytesSetAt": "2024-03-05T09:26:32.000Z",
"updatedAt": "2023-03-29T15:50:10.000Z",
"version": "7.0"
},
"properties": {
"configuration": {
"description": "The configuration for a RedisDatabase.",
"properties": {
"additionalFlags": {
"description": "Additional flags passed to the database.",
"items": {
"minLength": 1,
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"maxMemory": {
"description": "The database's maximum memory. This may be a number, optionally suffixed by one of the IEC binary suffixes `Ki`, `Mi` or `Gi`.",
"example": "64Mi",
"type": "string"
},
"maxMemoryPolicy": {
"description": "The database's key eviction policy. See the [Redis documentation on key evictions](https://redis.io/docs/reference/eviction/) for more information.",
"example": "allkeys-lru",
"type": "string"
},
"persistent": {
"description": "Persistent status of the database.",
"type": "boolean"
}
},
"type": "object"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"description": {
"type": "string"
},
"finalizers": {
"items": {
"minLength": 1,
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"hostname": {
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"name": {
"type": "string"
},
"port": {
"type": "integer"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"status": {
"enum": [
"pending",
"ready",
"migrating",
"importing",
"error",
"terminating"
],
"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",
"projectId",
"version",
"hostname",
"port",
"description",
"createdAt",
"updatedAt",
"name",
"storageUsageInBytes",
"storageUsageInBytesSetAt",
"status",
"statusSetAt"
],
"type": "object"
},
"type": "array"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/string/redis-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.listRedisDatabases({
"projectId": "string"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Database\ListRedisDatabases\ListRedisDatabasesRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new ListRedisDatabasesRequest(
projectId: "string"
));
$response = $client->database()->listRedisDatabases($request);

var_dump($response->getBody();

On this page