client.key_details
Details
Returns private data on a key: remaining lookups, licensed datasets, usage limits, notification settings and the search contexts the key can serve.
Endpoint
GET /keys/{key}/details
See the API reference 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.
Signature
def key_details(key)
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
key | String | yes | API Key |
Query Parameters
None.
Response
AddressZen::Responses::ApiKeyDetailsResponse. 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.
Example
key-details.rbruby
require "addresszen"
client = AddressZen::Client.new(api_key: "ak_test", management_key: "uk_test")
response = client.key_details("ak_test")
puts "#{response.result.name}: #{response.result.lookups_remaining} lookups remaining"