• Register

ApplicationPackageKeys

Resource URI

/applications/{applicationId}/packageKeys

Items in curly braces represent variables.

Description

A Package Key is given to a developer to access a set of services, endpoints, and methods as defined in the respective Package Plan. The Mashery v3 API supports fetching, creating, updating and deleting Package Keys.

Helpful Hint: If you need to switch a given Package Key to a different API Package, you will need to delete the original Package Key and re-create that key value as a Package Key in the desired API Package.

Resource Schema

PropertyCharacteristics
id Type string
Sub-type
Create Rule Ignored
Update Rule Required (if not in context)
Fetch Rule Implicit
Description Object identifier (Key UUID).
apikey Type string
Sub-type
Create Rule Optional
Update Rule Ignored
Fetch Rule Implicit
Description Application name.
secret Type string
Sub-type
Create Rule Required
Update Rule Optional
Fetch Rule Implicit
Description Application name.
created Type string
Sub-type datetime
Create Rule Ignored
Update Rule Ignored
Fetch Rule Implicit
Description Date/time the object was created.
updated Type string
Sub-type datetime
Create Rule Ignored
Update Rule Ignored
Fetch Rule Implicit
Description Date/time the object was last updated.
rateLimitCeiling Type integer
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Maximum number of API calls that can be made against the method for a given developer key in a specified period up to the maximum number set overall for the Plan.
rateLimitExempt Type boolean
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Set to true results in unlimited number of API calls that can be made against the method for a given developer key in a specified period up to the maximum number set overall for the Plan.
qpsLimitCeiling Type integer
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Maximum number of calls handled per second (QPS) per developer key for the Method.
qpsLimitExempt Type boolean
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Set to true results in unlimited number of API calls that can be made against the method for a given developer key in a specified period up to the maximum number set overall for the Plan.
status Type string
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Application name.
limits Type array
Sub-type Limit
Create Rule Ignore
Update Rule Ignore
Fetch Rule Explicit
Description Limit details associated with key
package Type object
Sub-type Package
Create Rule Required
Update Rule Ignored
Fetch Rule Implicit
Description Contains OAuth 2.0 settings for the API
plan Type object
Sub-type Plan
Create Rule Required
Update Rule Optional
Fetch Rule Implicit
Description Contains OAuth 2.0 settings for the API

fetch all [GET]

Retrieves collection of Package Keys belonging to the given Application.

Parameters

ParameterRequiredTypeDescription
applicationId true string Application identifier.
fields false string Comma-separated list of property paths to include in response. Each property path is a dot-separated list of object property names. fields=<property\[.property...\]>\[,...\]\[&fields=...\]
filter false string Colon-separated name/value pair specifying the name of property whose value must match the exact given value. Results may also be filtered by nested collections' properties by specifying a dot-separated property path. filter=<property\[.property...\]>:<value>\[&filter=...\]
sort false string Comma-separated list of properties to sort by. Only root-level properties are supported. Each property name may be optionally followed by :asc or :desc to specify sort direction (defaults to asc). sort=<property\[:(asc\|desc)\]>\[,...\]\[&sort=...\]
limit false int Number of objects to return in the result. Defaults to 100.
offset false int 0-based index of first object in the list to return. Defaults to 0.
search false string

Colon-separated name/value pair specifying the name of property whose value must contain the given value (as a substring). This parameter uses a partial match search. The valid field names are name, username, description, type, usageModel, tags, preferredProtocol, preferredOutput, uri, isPackaged.

Example: search=name%3Acar

Example: search=name%3Acar%2Cusername%3Acar%2Cdescription%3Acar%2Ctype%3Acar%2CusageModel%3Acar%2Ctags%3Acar%2CpreferredProtocol%3Acar%2CpreferredOutput%3Acar%2Curi%3Acar%2CisPackaged%3Acar

Returns

Success

Array of Applications for the Area If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/applications/{applicationId}/packageKeys' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "apikey": "est et tempus",
        "created": "2015-05-13T23:08:29.000+0000",
        "id": "4a501af4-d889-414a-9d1f-315f6d2e8952",
        "qpsLimitCeiling": 79,
        "qpsLimitExempt": true,
        "rateLimitCeiling": 31,
        "rateLimitExempt": true,
        "secret": "lorem ipsum dolor",
        "status": "pulvinar nulla pede",
        "updated": "2015-07-21T02:28:46.000+0000"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/applications/{applicationId}/packageKeys' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "apikey": "mauris ullamcorper purus sit",
        "created": "2015-10-07T19:43:04.000+0000",
        "id": "b9653b7a-71a4-4452-a9f5-a11fa03e1fd6",
        "qpsLimitCeiling": 50,
        "qpsLimitExempt": false,
        "rateLimitCeiling": 49,
        "rateLimitExempt": false,
        "secret": "orci mauris",
        "status": "arcu libero",
        "updated": "2015-04-05T05:37:46.000+0000"
    }
]

update [PUT]

Retrieves the identified Package Key.

Parameters

ParameterRequiredTypeDescription
applicationId true string Application identifier.
packageKeyId true string Key identifier.
packageKey true object PackageKey object

Returns

Success

ServiceDefinition as persisted If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/applications/{applicationId}/packageKeys/{packageKeyId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request PUT --data '{"apikey":"quisque arcu libero","created":"2015-05-22T17:14:34.000+0000","id":"519d1e6a-1e02-47e8-93af-fac8ff17ec58","qpsLimitCeiling":66,"qpsLimitExempt":true,"rateLimitCeiling":60,"rateLimitExempt":true,"secret":"nullam","status":"quam pede lobortis","updated":"2015-06-08T01:25:41.000+0000"}

Response

[
    {
        "apikey": "penatibus et magnis dis",
        "created": "2015-04-04T16:39:20.000+0000",
        "id": "b2700023-05a4-4f28-a8dc-285466f639b1",
        "qpsLimitCeiling": 92,
        "qpsLimitExempt": false,
        "rateLimitCeiling": 55,
        "rateLimitExempt": true,
        "secret": "purus aliquet",
        "status": "fusce lacus purus aliquet",
        "updated": "2015-01-23T15:20:05.000+0000"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/applications/{applicationId}/packageKeys/{packageKeyId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request PUT --data '{"apikey":"quis","created":"2015-03-25T08:42:58.000+0000","id":"209b37d5-942d-43c8-a0ed-4e3e079a72bd","qpsLimitCeiling":48,"qpsLimitExempt":true,"rateLimitCeiling":75,"rateLimitExempt":false,"secret":"suscipit a feugiat","status":"non velit nec","updated":"2015-03-28T16:56:00.000+0000"}

Response

[
    {
        "apikey": "semper sapien",
        "created": "2015-06-04T13:01:48.000+0000",
        "id": "f385456f-84bc-4397-883f-dd0c3b6431a3",
        "qpsLimitCeiling": 61,
        "qpsLimitExempt": false,
        "rateLimitCeiling": 92,
        "rateLimitExempt": true,
        "secret": "lorem vitae",
        "status": "erat",
        "updated": "2015-03-26T10:55:22.000+0000"
    }
]

delete [DELETE]

Deletes the identified Package Key.

Parameters

ParameterRequiredTypeDescription
applicationId true string Application identifier.
packageKeyId true string Key identifier.

Returns

Success

ServiceDefinition as created If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/applications/{applicationId}/packageKeys/{packageKeyId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request DELETE

Response

[
    ""
]

Request

curl -k 'https://api.mashery.com/v3/rest/applications/{applicationId}/packageKeys/{packageKeyId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request DELETE

Response

[
    ""
] 

Docs Navigation