## List

`client.Admin.APIKeys.List(ctx, query) (*CursorPage[AdminAPIKeyListResponse], error)`

**get** `/compute/v1/admin/api-keys`

List API keys

### Parameters

- `query AdminAPIKeyListParams`

  - `AfterID param.Field[string]`

    Return results after this ID

  - `BeforeID param.Field[string]`

    Return results before this ID

  - `Limit param.Field[int64]`

    Max items to return

  - `WorkspaceID param.Field[string]`

    Filter by workspace ID. If not provided, returns keys across all workspaces.

### Returns

- `type AdminAPIKeyListResponse struct{…}`

  - `ID string`

    API key ID

  - `AllowedIPs []string`

    IP addresses allowed to use this key. An empty array means all IPs are allowed.

  - `CreatedAt Time`

  - `ExpiresAt Time`

    When the key expires. Null if the key does not expire.

  - `IsActive bool`

  - `KeyPrefix string`

    First 12 characters of the key

  - `KeyType AdminAPIKeyListResponseKeyType`

    - `const AdminAPIKeyListResponseKeyTypeAdmin AdminAPIKeyListResponseKeyType = "admin"`

    - `const AdminAPIKeyListResponseKeyTypeWorkspace AdminAPIKeyListResponseKeyType = "workspace"`

  - `LastUsedAt Time`

  - `Livemode bool`

    Whether this is a live API key (false for test keys).

  - `Name string`

    API key name

  - `WorkspaceID string`

    Workspace ID if workspace-scoped

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/boltz-bio/boltz-api-go"
  "github.com/boltz-bio/boltz-api-go/option"
)

func main() {
  client := boltzapi.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Admin.APIKeys.List(context.TODO(), boltzapi.AdminAPIKeyListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```
