Application Keys


Get key details of a given type

GET https://apis.wso2.com/api/am/store/v0.13/applications/{applicationId}/keys/{keyType}

This operation can be used to retrieve key details of an individual application specifying the key type in the URI.

OAuth 2.0 Scope

apim:subscribei

Request

GET https://localhost:9443/api/am/store/v0.13/applications/896658a0-b4ee-4535-bbfa-806c894a4015/keys/PRODUCTION Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8

Response

HTTP/1.1 200 OK Content-Type: application/json { "consumerKey": "QwEtRHd4NJkcFuRUfAT5af8XEEoa", "consumerSecret": "7Fairfeu321ENjOR9w2xgJl3i70a", "supportedGrantTypes": [ "refresh_token", "urn:ietf:params:oauth:grant-type:saml2-bearer", "password", "client_credentials", "iwa:ntlm" ], "callbackUrl": "http://sample/com/callback", "keyState": "COMPLETED", "keyType": "PRODUCTION"}

Sample CURL

curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" "https://localhost:9443/api/am/store/v0.13/applications/896658a0-b4ee-4535-bbfa-806c894a4015/keys/PRODUCTION"

Parameters

Type Name Description Schema Default
Path

applicationId

required

Application Identifier consisting of the UUID of the Application.

String

Path

keyType

required

**Application Key Type** standing for the type of the keys (i.e. Production or Sandbox).

Accepted values:

PRODUCTION SANDBOX
String

Query

groupId

optional

Application Group Id

String

Header

Accept

optional

Media types acceptable for the response. Default is application/json.

String

application/json

Responses

HTTP Code Description Schema

200

OK. Application key details returned.

ApplicationKey

404

Not Found. Requested application does not exist.

Error

406

Not Acceptable. The requested media type is not supported

Error

Update grant types and callback url of an application

PUT https://apis.wso2.com/api/am/store/v0.13/applications/{applicationId}/keys/{keyType}

This operation can be used to update grant types and callback url of an application. (Consumer Key and Consumer Secret are ignored) Upon succesfull you will retrieve the updated key details as the response.

OAuth 2.0 Scope

apim:subscribei

Request

PUT https://localhost:9443/api/am/store/v0.13/applications/896658a0-b4ee-4535-bbfa-806c894a4015/keys/SANDBOX Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 { "supportedGrantTypes": [ "refresh_token", "urn:ietf:params:oauth:grant-type:saml2-bearer", "password", "client_credentials", "iwa:ntlm" ], "callbackUrl": "http://sample/com/callback" }

Response

HTTP/1.1 200 OK Content-Type: application/json { "consumerKey": "QwEtRHd4NJkcFuRUfAT5af8XEEoa", "consumerSecret": "7Fairfeu321ENjOR9w2xgJl3i70a", "supportedGrantTypes": [ "refresh_token", "urn:ietf:params:oauth:grant-type:saml2-bearer", "password", "client_credentials", "iwa:ntlm" ], "callbackUrl": "http://sample/com/callback", "keyState": "COMPLETED", "keyType": "PRODUCTION"}

Sample CURL

curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -H "Content-Type: application/json" -X PUT -d @data.json "https://localhost:9443/api/am/store/v0.13/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524/keys/SANDBOX"

Parameters

Type Name Description Schema Default
Path

applicationId

required

Application Identifier consisting of the UUID of the Application.

String

Path

keyType

required

**Application Key Type** standing for the type of the keys (i.e. Production or Sandbox).

Accepted values:

PRODUCTION SANDBOX
String

Body

body

required

Grant types/Callback URL update request object

ApplicationKey (ApplicationKey)

Responses

HTTP Code Description Schema

200

Ok. Grant types or/and callback url is/are updated.

ApplicationKey

400

Bad Request. Invalid request or validation error

Error

404

Not Found. The resource to be updated does not exist.

Error

412

Precondition Failed. The request has not been performed because one of the preconditions is not met.

Error