# CredentialStackUsage

Where a credential stack is used, as defaults and by knowledge bases. While any of these use it, it can't be deleted. Runs and automations that name it aren't counted.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `credentialStackId` | `uuid` | The stack's id. |
| `tenantDefault` | `boolean` | It's the tenant's default stack. |
| `namespaces` | [`CredentialStackUser`](https://docs.maitento.com/reference/types/credential-stack-user.md)`[]` | The namespaces whose default it is. |
| `partitions` | [`CredentialStackUser`](https://docs.maitento.com/reference/types/credential-stack-user.md)`[]` | The knowledge bases (partitions) that embed with it, up to 500. |

## Example

```json
{
  "credentialStackId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "tenantDefault": false,
  "namespaces": [
    {
      "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "name": "..."
    }
  ],
  "partitions": [
    {
      "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "name": "..."
    }
  ]
}
```

## Where it's used

- [`credentialStacks.usage`](https://docs.maitento.com/reference/api/credential-stacks.md) (`GET /credential-stacks/by-id/{id}/usage`)
