---
title: View secret usage
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Secrets Store](https://developers.cloudflare.com/api/go/resources/secrets_store)

[Quota](https://developers.cloudflare.com/api/go/resources/secrets_store/subresources/quota)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# View secret usage

client.SecretsStore.Quota.Get(ctx, query) (\*[QuotaGetResponse](<https://developers.cloudflare.com/api/go/resources/secrets_store#(resource)%20secrets_store.quota%20%3E%20(model)%20QuotaGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/secrets\_store/quota

Lists the number of secrets used in the account.

##### Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`Secrets Store Write``Secrets Store Read`

##### ParametersExpand Collapse

<details>

<summary>

query QuotaGetParams

</summary>

AccountID param.Field\[string]

Account identifier.

maxLength32

<a href="#(resource)%20secrets_store.quota%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20secrets_store.quota%20%3E%20(method)%20get%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type QuotaGetResponse struct{…}

</summary>

<details>

<summary>

Secrets QuotaGetResponseSecrets

</summary>

Quota float64

The number of secrets the account is entitled to use.

<a href="#(resource)%20secrets_store.quota%20%3E%20(model)%20QuotaGetResponse%20%3E%20(schema)%20%3E%20(property)%20secrets%20%3E%20(property)%20quota">Link to this property</a>

Usage float64

The number of secrets the account is currently using.

<a href="#(resource)%20secrets_store.quota%20%3E%20(model)%20QuotaGetResponse%20%3E%20(schema)%20%3E%20(property)%20secrets%20%3E%20(property)%20usage">Link to this property</a>

</details>

<a href="#(resource)%20secrets_store.quota%20%3E%20(model)%20QuotaGetResponse%20%3E%20(schema)%20%3E%20(property)%20secrets">Link to this property</a>

</details>

[Link to this property](<#(resource)%20secrets_store.quota%20%3E%20(model)%20QuotaGetResponse%20%3E%20(schema)>)

### View secret usage

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/secrets_store"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  quota, err := client.SecretsStore.Quota.Get(context.TODO(), secrets_store.QuotaGetParams{
    AccountID: cloudflare.F("985e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", quota.Secrets)
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "secrets": {
      "quota": 10,
      "usage": 10
    }
  },
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "secrets": {
      "quota": 10,
      "usage": 10
    }
  },
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
```