{
    "openapi": "3.1.0",
    "info": {
        "title": "Allegro Platform API",
        "version": "1.0",
        "description": "Endpoints for platform operators. These routes are served only from the platform host and require a platform-owned API key \u2014 organization API keys cannot access them."
    },
    "servers": [
        {
            "url": "https://allegrocdp.com/api/v1"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "/landlord/health": {
            "get": {
                "operationId": "platformHealth.show",
                "description": "Report the pending job count for each configured queue, plus the failed\njob count, for consumption by an external monitor. Returns a 503 when the\nqueue backend cannot be reached so naive HTTP checks trip on a degraded\nstate.",
                "summary": "Platform Health Summary",
                "tags": [
                    "PlatformHealth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/landlord/tenants": {
            "get": {
                "operationId": "tenant.index",
                "description": "Return every tenant on the platform. Restricted to super admins and only\navailable in the landlord context.",
                "summary": "List Tenants",
                "tags": [
                    "Tenant"
                ],
                "parameters": [
                    {
                        "name": "fields[tenants]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "domain",
                                    "created_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `TenantResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TenantResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "PlatformHealthResource": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string"
                    },
                    "queue": {
                        "type": "object",
                        "properties": {
                            "reachable": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "reachable"
                        ]
                    },
                    "queues": {
                        "type": "string"
                    },
                    "failed_jobs": {
                        "type": "string"
                    }
                },
                "required": [
                    "status",
                    "queue",
                    "queues",
                    "failed_jobs"
                ],
                "title": "PlatformHealthResource"
            },
            "TenantResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "tenants"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "domain": {
                                "type": "string"
                            },
                            "created_at": {
                                "type": "string"
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "TenantResource"
            }
        },
        "responses": {
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}