Tenants

List Tenants

List all tenants with cursor-based pagination.

Requirements: This endpoint requires Redis with RediSearch module (e.g., redis/redis-stack-server). If RediSearch is not available, this endpoint returns 501 Not Implemented.

The response includes lightweight tenant objects without computed fields like destinations_count and topics. Use GET /tenants/{tenant_id} to retrieve full tenant details including these fields.

get/tenants

Query parameters

limitinteger

Number of tenants to return per page (1-100, default 20).

order_by'created_at'

Field to sort by.

dir'asc' | 'desc'

Sort direction.

created_at[gte]string date-time

Filter tenants created at or after this time (RFC3339 or YYYY-MM-DD format).

created_at[lte]string date-time

Filter tenants created at or before this time (RFC3339 or YYYY-MM-DD format).

nextstring

Cursor for the next page of results. Mutually exclusive with prev.

prevstring

Cursor for the previous page of results. Mutually exclusive with next.

Response

List of tenants.

countinteger

Total count of all tenants.

Example response

{
  "models": [
    {
      "id": "123",
      "destinations_count": 5,
      "topics": [
        "user.created",
        "user.deleted"
      ],
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "order_by": "created_at",
    "dir": "desc",
    "limit": 100,
    "next": "MTcwNDA2NzIwMA=="
  },
  "count": 42
}

Changes