Application (Individual)


Remove an application
DELETE https://apis.wso2.com/api/am/store/v0.11/applications/{applicationId}

This operation can be used to remove an application specifying its id.

OAuth 2.0 Scope

apim:subscribei

Request

DELETE https://127.0.0.1:9443/api/am/store/v0.11/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8

Response

HTTP/1.1 200 OK

Sample CURL

curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X DELETE "https://127.0.0.1:9443/api/am/store/v0.11/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4"

Parameters

Type Name Description Schema Default
Path

applicationId

required

Application Identifier consisting of the UUID of the Application.

String

Header

If-Match

optional

Validator for conditional requests; based on ETag.

String

Header

If-Unmodified-Since

optional

Validator for conditional requests; based on Last Modified header.

String

Responses

HTTP Code Description Schema

200

OK. Resource successfully deleted.

404

Not Found. Resource to be deleted does not exist.

Error

412

Precondition Failed. The request has not been performed because one of the preconditions is not met (Will be supported in future).

Error

Get details of an application
GET https://apis.wso2.com/api/am/store/v0.11/applications/{applicationId}

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

OAuth 2.0 Scope

apim:subscribei

Request

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

Response

HTTP/1.1 200 OK Content-Type: application/json { "groupId": "", "callbackUrl": null, "subscriber": "admin", "throttlingTier": "Unlimited", "applicationId": "896658a0-b4ee-4535-bbfa-806c894a4015", "description": null, "status": "APPROVED", "name": "DefaultApplication", "keys": [ { "consumerKey": "AVoREWiB16kY_GTIzscl40GYYZQa", "consumerSecret": "KXQxmS8W3xDvvJH4AfR6xrhKIeIa", "keyState": "COMPLETED", "keyType": "PRODUCTION", "supportedGrantTypes": null, "token": { "validityTime": 3600, "accessToken": "3887da6d111f0429c6dff47a46e87209", "tokenScopes": [ "am_application_scope", "default" ] } }] }

Sample CURL

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

Parameters

Type Name Description Schema Default
Path

applicationId

required

Application Identifier consisting of the UUID of the Application.

String

Header

Accept

optional

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

String

application/json

Header

If-None-Match

optional

Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec.

String

Header

If-Modified-Since

optional

Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource.

String

Responses

HTTP Code Description Schema

200

OK. Application returned.

Application

304

Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future).

404

Not Found. Requested application does not exist.

Error

406

Not Acceptable. The requested media type is not supported

Error

Update an application
PUT https://apis.wso2.com/api/am/store/v0.11/applications/{applicationId}

This operation can be used to update an application. Upon succesfull you will retrieve the updated application as the response.

OAuth 2.0 Scope

apim:subscribei

Request

PUT https://127.0.0.1:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 { "callbackUrl": "", "throttlingTier": "Bronze", "description": "sample app description updated", "name": "sampleapp" }

Response

HTTP/1.1 200 OK Content-Type: application/json { "groupId": null, "callbackUrl": "", "subscriber": "admin", "throttlingTier": "Bronze", "applicationId": "c30f3a6e-ffa4-4ae7-afce-224d1f820524", "description": "sample app description updated", "status": "APPROVED", "name": "sampleapp", "keys": [] }

Sample CURL

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

Parameters

Type Name Description Schema Default
Path

applicationId

required

Application Identifier consisting of the UUID of the Application.

String

Body

body

required

Application object that needs to be updated

Application (Application)

Header

Content-Type

required

Media type of the entity in the body. Default is application/json.

String

application/json

Header

If-Match

optional

Validator for conditional requests; based on ETag.

String

Header

If-Unmodified-Since

optional

Validator for conditional requests; based on Last Modified header.

String

Responses

HTTP Code Description Schema

200

OK. Application updated.

Application

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 (Will be supported in future).

Error

Generate keys for application
POST https://apis.wso2.com/api/am/store/v0.11/applications/generate-keys

This operation can be used to generate client Id and client secret for an application

OAuth 2.0 Scope

apim:subscribei

Request

POST https://127.0.0.1:9443/api/am/store/v0.11/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 { "validityTime": "3600", "keyType": "PRODUCTION", "accessAllowDomains": ["ALL" ] }

Response

HTTP/1.1 200 OK Content-Type: application/json { "consumerSecret": "8V7DDKtKGtuG_9GDjaOJ5sijdX0a", "consumerKey": "LOFL8He72MSGVil4SS_bsh9O8MQa", "keyState": "APPROVED", "keyType": "PRODUCTION", "supportedGrantTypes": [ "urn:ietf:params:oauth:grant-type:saml2-bearer", "iwa:ntlm", "refresh_token", "client_credentials", "password" ], "token": { "validityTime": 3600, "accessToken": "fd2cdc4906fbc162e033d57f85a71c21", "tokenScopes": [ "am_application_scope", "default" ] } }

Sample CURL

curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -H "Content-Type: application/json" -X POST -d @data.json "https://127.0.0.1:9443/api/am/store/v0.11/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524"

Parameters

Type Name Description Schema Default
Query

applicationId

required

Application Identifier consisting of the UUID of the Application.

String

Body

body

required

Application object the keys of which are to be generated

ApplicationKeyGenerateRequest (ApplicationKeyGenerateRequest)

Header

Content-Type

required

Media type of the entity in the body. Default is application/json.

String

application/json

Header

If-Match

optional

Validator for conditional requests; based on ETag.

String

Header

If-Unmodified-Since

optional

Validator for conditional requests; based on Last Modified header.

String

Responses

HTTP Code Description Schema

200

OK. Keys are generated.

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 (Will be supported in future).

Error

Create a new application
POST https://apis.wso2.com/api/am/store/v0.11/applications

This operation can be used to create a new application specifying the details of the application in the payload.

OAuth 2.0 Scope

apim:subscribei

Request

POST https://127.0.0.1:9443/api/am/store/v0.11/applications Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 { "throttlingTier": "Unlimited", "description": "sample app description", "name": "sampleapp", "callbackUrl": "http://my.server.com/callback" }

Response

HTTP/1.1 201 Created Location: https://localhost:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524 Content-Type: application/json { "groupId": null, "callbackUrl": "http://my.server.com/callback", "subscriber": "admin", "throttlingTier": "Unlimited", "applicationId": "c30f3a6e-ffa4-4ae7-afce-224d1f820524", "description": "sample app description", "status": "APPROVED", "name": "sampleapp", "keys": [] }

Sample CURL

curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -H "Content-Type: application/json" -X POST -d @data.json "https://127.0.0.1:9443/api/am/store/v0.11/applications"

Parameters

Type Name Description Schema Default
Body

body

required

Application object that is to be created.

Application (Application)

Header

Content-Type

required

Media type of the entity in the body. Default is application/json.

String

application/json

Responses

HTTP Code Description Schema

201

Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity.

Application

400

Bad Request. Invalid request or validation error

Error

409

Conflict. Application already exists.

Error

415

Unsupported media type. The entity of the request was in a not supported format.

Error