Subscription (Multitple)


Add new subscriptions

POST https://apis.wso2.com/api/am/store/v0.13/subscriptions/multiple

This operation can be used to add a new subscriptions providing the ids of the APIs and the applications.

OAuth 2.0 Scope

apim:subscribei

Request

POST https://localhost:9443/api/am/store/v0.13/subscriptions/multiple Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 { "tier": "Gold", "apiIdentifier": "c43a325c-260b-4302-81cb-768eafaa3aed", "applicationId": "c30f3a6e-ffa4-4ae7-afce-224d1f820524" }

Response

HTTP/1.1 201 Created Location: https://localhost:9443/api/am/store/v0.13/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9 Content-Type: application/json { "tier": "Gold", "subscriptionId": "5b65808c-cdf2-43e1-a695-de63e3ad0ae9", "apiIdentifier": "admin-PhoneVerification-2.0.0", "applicationId": "c30f3a6e-ffa4-4ae7-afce-224d1f820524", "status": "UNBLOCKED" }

Sample CURL

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

Parameters

Type Name Description Schema Default
Body

body

required

Subscription objects that should to be added

List (Subscription)

Header

Content-Type

required

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

String

application/json

Responses

HTTP Code Description Schema

200

OK. Successful response with the newly created objects as entity in the body.

Subscription

400

Bad Request. Invalid request or validation error.

Error

415

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