Keys

Description

A Key tracks access to your API

Object Fields

id

The id field is the primary identifier for a key object.

type maxLength format default optional readonly createonly queryable sortable
integer       yes yes no yes no

created

The date that this object was created.

type maxLength format default optional readonly createonly queryable sortable
string  20 date-time   yes yes no yes yes

updated

The date this object was last updated.

type maxLength format default optional readonly createonly queryable sortable
string  20 date-time   yes yes no yes no

service_key

This is an indicator of the service that this key belongs to.  Its not directly assignable.

type maxLength format default optional readonly createonly queryable sortable
string 255

yes yes no yes no

apikey

The token that a developer passes weith their api call to identify themselves.

type maxLength format default optional readonly createonly queryable sortable
string 255

no no no yes no

username

This is an indicator of the member that this key belongs to.  It is not directly assignable.

type maxLength format default optional readonly createonly queryable sortable
string 255

yes yes no yes no

status

Status is restricted to a specific set of values. 

waiting Waiting for approval The key is in moderation and cannot be used until approved
active Active The key is active and able to identify api calls
disabled Disabled The key cannot be used

See object.describe for a list of available options.

type maxLength format default optional readonly createonly queryable sortable
string 16
"active"
yes no no yes no

rate_limit_ceiling

API Key specific Rate Limit the Proxy Service will enforce if both Rate Limit Enforcement is enabled and Rate Limit Overrides are allowed in the Dashboard API Settings Tab.

This value takes precidence over the Service Definition Default Rate Limit.

Note: The period ("Minute", "Hour", "Day", "Month") for the rate_limit_ceiling (Custom Rate Limit) is set in the Service Definition's Rate Limit Period configuration item in the Dashboard API Settings Tab.

type maxLength format default optional readonly createonly queryable sortable
integer


yes no no yes no

qps_limit_ceiling

API Key specific QPS Limit the Proxy Service will enforce if both Throttling Limit Enforcement is enabled and Throttling Limit Overrides are allowed in the Dashboard API Settings Tab.

This value takes precedence over the Service Definition Default Rate Limit.

This value is only enforced if the Aggregate QPS has not been reached for the Service Definition.

type maxLength format default optional readonly createonly queryable sortable
integer


yes no no yes no

rate_limit_exempt

Toggle whether this key has an unlimited rate limit.  This setting is only applied by the Proxy Service at runtime if the Rate Limit feature is enabled and the Default Rate Limit Override is allowed.

type maxLength format default optional readonly createonly queryable sortable
boolean


yes no no yes no

qps_limit_exempt

Toggle whether this key allows unlimted qps.  This setting is only applied by the Proxy Service at runtime if the Throttling Limit Enforcement feature is enabled and Throttling Limit Override is allowed.  This setting does not take precidence over any Aggregate QPS setting on the service definition.

type maxLength format default optional readonly createonly queryable sortable
boolean


yes no no yes no

required_referer

When this field is not empty, the proxy will require calls made using this key to have the specfield HTTP referrer.

type maxLength format default optional readonly createonly queryable sortable
string 255

yes no no yes no

secret

This is a shared secret for signing api calls.

type maxLength format default optional readonly createonly queryable sortable
string 255

yes no no yes no

limits

Limits describe how this key may be limited, including information from the service definition.  See below for a more detailed description of the elements of the limits array.

type maxLength format default optional readonly createonly queryable sortable
array
    yes yes no no no

object_type

The type of the object.  This is always "key" for a key.

type maxLength format default optional readonly createonly queryable sortable
string 32    "key" yes yes no no no

Limit Fields

Each limit object describes a particular type of unit.  A limit object has three fields.

period

The time period applicable for the limit.  Possibile values are second, minute, hour, day, month.

type maxLength format default optional readonly createonly queryable sortable
string


yes yes no no no

source

Where the limit is defined in the mashery system.  Possible values are "key" or "service"

type maxLength format default optional readonly createonly queryable sortable
string
    yes yes no no no

ceiling

Maximum number of events that can occur in the specified time period.

type maxLength format default optional readonly createonly queryable sortable
string
   "key" yes yes no no no

Relationships

service

Every key belongs to one specific service.  When this relationship is included with the key, it will contain the service object that owns this key.

member

A key may optionally belong to a specific member.  That allows limit notifications to be sent to the member contact information. When this relationship is included with the key, it will contain the member object that owns this key.

application

A key may optionally belong to a specific application.  When this relationship is included with the key, it will contain the application object that owns the key.

developer_class

A key may optionally belong to a specific developer_class.  When this relationship is included with the key, it will contain the developer_class object that owns the key.

Object Methods

key.fetch
Returns a key object based on a specified id.
key.create
Create a new key object.
key.update
Modifies an existing key object.
key.validate
Validates fields on an key object.
key.delete
Deletes a key object.

Docs Navigation