> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hydradb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Infra Status

> Check whether a tenant's infrastructure is fully provisioned.

## When to use it

* **After tenant creation** – poll until provisioning completes
* **Diagnostics** – confirm the graph and vectorstore are healthy

## Endpoint

* **Auth:** Bearer token
* **Idempotency:** Read-only
* **Async:** No

## Example

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl 'https://api.hydradb.com/tenants/infra/status?tenant_id=my_first_tenant' \
    -H "Authorization: Bearer <your_api_key>"
  ```

  ```typescript TypeScript SDK theme={"dark"}
  const status = await client.tenant.getInfraStatus({
    tenant_id: "my_first_tenant"
  });
  ```

  ```python Python SDK theme={"dark"}
  status = client.tenant.get_infra_status(tenant_id="my_first_tenant")
  ```
</CodeGroup>

## Query parameters

| Name        | Type   | Required | Description            |
| ----------- | ------ | -------- | ---------------------- |
| `tenant_id` | string | Yes      | The tenant to inspect. |

## Response

```json theme={"dark"}
{
  "tenant_id": "my_first_tenant",
  "org_id": "free",
  "infra": {
    "scheduler_status": true,
    "graph_status": true,
    "vectorstore_status": [true, true]   // [0] = Memories, [1] = Knowledge
  },
  "message": "Deployed infrastructure status"
}
```

| Field                      | Description                                                                                                                                                                           |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tenant_id`                | The tenant that was queried.                                                                                                                                                          |
| `org_id`                   | Organization identifier.                                                                                                                                                              |
| `infra.scheduler_status`   | `true` when the ingestion scheduler is ready.                                                                                                                                         |
| `infra.graph_status`       | `true` when the graph database is ready.                                                                                                                                              |
| `infra.vectorstore_status` | Array of two booleans. `vectorstore_status[0]` is the **Memories** vector store; `vectorstore_status[1]` is the **Knowledge** vector store. **Both must be `true`** before ingesting. |

<Info>
  Receiving a `"status": "accepted"` response from `POST /tenants/create` indicates that the creation process has successfully started -- it does **not** mean the tenant is fully provisioned. Poll this endpoint until all readiness flags are `true` before ingesting.
</Info>

<Note>
  **Typical provisioning time depends on plan:** 1–2 minutes for Free and Ship plans, and 4–5 minutes for Enterprise plans (which provision physically-isolated infrastructure). Allow up to \~5 minutes in any polling loop you write.
</Note>

## Polling pattern

After creating a tenant, poll this endpoint every few seconds until all statuses are `true`. Bound the loop at \~5 minutes so it survives Enterprise provisioning without hanging forever:

```python theme={"dark"}
import time

deadline = time.time() + 300  # 5-minute cap
while time.time() < deadline:
    status = client.tenant.get_infra_status(tenant_id="my_first_tenant")
    infra = status.infra
    if (infra.scheduler_status
        and infra.graph_status
        and all(infra.vectorstore_status)):
        break
    time.sleep(5)
else:
    raise TimeoutError("Tenant infra not ready after 5 min")
```

## Related endpoints

* **Before this:** [Create tenant](/api-reference/endpoint/create-tenant) – creation is asynchronous
* **After this:** [Upload knowledge](/api-reference/endpoint/upload-knowledge) · [Add memory](/api-reference/endpoint/add-memory)

## Errors

Common codes: `400 INVALID_PARAMETERS`, `404 TENANT_NOT_FOUND`. See [Error Responses](/api-reference/error-responses) for the full list.


## OpenAPI

````yaml GET /tenants/infra/status
openapi: 3.1.0
info:
  title: HydraDB API
  description: REST APIs for the HydraDB retrieval engine
  version: 0.0.1
servers:
  - url: https://api.hydradb.com
    description: Production
    x-fern-server-name: hydradb-prod
security: []
paths:
  /tenants/infra/status:
    get:
      tags:
        - tenants
        - tenants
        - Monitor & infra status
      summary: Get Infra Status
      operationId: get_infra_status_tenants_infra_status_get
      parameters:
        - name: tenant_id
          in: query
          required: true
          schema:
            type: string
            title: Tenant Id
            description: Unique identifier for the tenant/organization
            example: tenant_1234
          description: Unique identifier for the tenant/organization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfraStatusResponse'
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cortex__models__response__commons__ActualErrorResponse
        '401':
          description: Unauthorized - Authentication required
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cortex__models__response__commons__ActualErrorResponse
        '403':
          description: Forbidden - Access denied
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cortex__models__response__commons__ActualErrorResponse
        '404':
          description: Not Found - Resource does not exist
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cortex__models__response__commons__ActualErrorResponse
        '422':
          description: Unprocessable Entity - Validation failed
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cortex__models__response__commons__ActualErrorResponse
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cortex__models__response__commons__ActualErrorResponse
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cortex__models__response__commons__ActualErrorResponse
      security:
        - HTTPBearer: []
components:
  schemas:
    InfraStatusResponse:
      properties:
        tenant_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tenant Id
          description: Tenant identifier when status is queried for a specific tenant
          example: tenant_1234
        org_id:
          type: string
          title: Org Id
          description: Organization identifier
          example: <org_id>
        infra:
          $ref: '#/components/schemas/Infra'
          description: Deployed infrastructure status
        message:
          type: string
          title: Message
          description: Summary message
          default: Deployed infrastructure status
      type: object
      required:
        - org_id
        - infra
      title: InfraStatusResponse
      description: Response for deployed infrastructure status checks.
    cortex__models__response__commons__ActualErrorResponse:
      properties:
        detail:
          $ref: >-
            #/components/schemas/cortex__models__response__commons__ErrorResponse
      type: object
      required:
        - detail
      title: ActualErrorResponse
    Infra:
      properties:
        scheduler_status:
          type: boolean
          title: Scheduler Status
          example: true
        graph_status:
          type: boolean
          title: Graph Status
          example: true
        vectorstore_status:
          prefixItems:
            - type: boolean
            - type: boolean
          type: array
          maxItems: 2
          minItems: 2
          title: Vectorstore Status
          example: []
      type: object
      required:
        - scheduler_status
        - graph_status
        - vectorstore_status
      title: Infra
    cortex__models__response__commons__ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: false
          example: true
        message:
          type: string
          title: Message
          default: Error occurred
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ErrorResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````