Application (individual)


Update grant types and callback url of an application
PUT https://apis.wso2.com/api/am/store/v0.11/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.11/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.11/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