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

# apiKeys

> Lists the current tenant's API keys, filtered by `where.keyType` and `where.status`; pass an empty `where` for all. The secrets aren't included.



**query** `apiKeys(after: String, before: String, first: Int, last: Int, where: ApiKeysFilterInput!): ApiKeysConnection`

## Arguments

**`after`**: `String`

Returns the elements in the list that come after the specified cursor.

---

**`before`**: `String`

Returns the elements in the list that come before the specified cursor.

---

**`first`**: `Int`

Returns the first _n_ elements from the list.

---

**`last`**: `Int`

Returns the last _n_ elements from the list.

---

**`where`**: `ApiKeysFilterInput!` (required)

## Returns

`ApiKeysConnection`

**`edges`**: `[ApiKeysEdge!]`

A list of edges.

---

**`nodes`**: `[ApiKey!]`

A flattened list of the nodes.

---

**`pageInfo`**: `PageInfo!`

Information to aid in pagination.

---

**`totalCount`**: `Int!`

Identifies the total count of items in the connection.

## Examples

```graphql Query
query ApiKeys($where: ApiKeysFilterInput!) {
  apiKeys(where: $where) {
    edges {
      cursor
      node {
        apiIds
        createdBy
        createdOn
        id
        keyPrefix
        keySuffix
      }
    }
    nodes {
      apiIds
      createdBy
      createdOn
      id
      keyPrefix
      keySuffix
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
    totalCount
  }
}
```

```json Variables
{
  "where": {}
}
```

```json Response
{
  "data": {
    "apiKeys": {
      "edges": [
        {
          "cursor": "string",
          "node": {
            "apiIds": [
              "string"
            ],
            "createdBy": "string",
            "createdOn": "string",
            "id": "id",
            "keyPrefix": "string",
            "keySuffix": "string"
          }
        }
      ],
      "nodes": [
        {
          "apiIds": [
            "string"
          ],
          "createdBy": "string",
          "createdOn": "string",
          "id": "id",
          "keyPrefix": "string",
          "keySuffix": "string"
        }
      ],
      "pageInfo": {
        "endCursor": "string",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "string"
      },
      "totalCount": 1
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.