# `client.list_configs`

List

Returns every configuration stored against a key, oldest first.

## Endpoint

`GET /keys/{key}/configs`

See the [API reference](/docs/api/list-configs.md) for this endpoint.

This operation needs a Management Key. Pass it as `management_key:` to `AddressZen::Client.new`, which sends it in the `Authorization` header. See [setup](/docs/sdks/ruby/setup.md).

## Signature

```ruby
def list_configs(key)
```

## Arguments

| Name  | Type     | Required | Description |
| ----- | -------- | -------- | ----------- |
| `key` | `String` | yes      | API Key     |

## Query Parameters

*None.*

## Response

`AddressZen::Responses::ConfigsResponse`. Read fields with readers named as the API names them, such as `response.result`, or with `response["result"]`. `to_h` returns the decoded body.

## Errors

An HTTP error raises `AddressZen::ApiError` with the HTTP `status`, the API error `code` and the decoded `body`. A transport failure raises `AddressZen::TransportError`. See [error handling](/docs/sdks/ruby/errors.md).

## Example

list-configs.rbruby

```ruby
require "addresszen"

client = AddressZen::Client.new(api_key: "ak_test", management_key: "uk_test")

response = client.list_configs("ak_test")

response.result.configs.each do |config|
  puts "#{config.name} updated #{config.updated_at}"
end
```
