Try WSO2 Cloud for Free
Sign in

All docs This doc
Skip to end of metadata
Go to start of metadata
The following Store APIs are deprecated and will be unsupported in a future release. They are provided below for reference by existing users. For a complete list of the currently supported Store APIs, go to https://docs.wso2.com/display/APICloud/apidocs/store.

The API Store functionality can be programmatically invoked using the following APIs:

Note: When you access any API other than the login and logout, first invoke the login API to ensure that user is authenticated. When the login API is invoked, the system stores the generated session cookie in a file, which is used in the next API invocation/s.

Login

DescriptionLog in to API Store.
URIhttps://api.cloud.wso2.com/store/site/blocks/user/login/ajax/login.jag
URI Parametersaction=login&username=xxx&password=xxx
HTTP MethodsPOST
Example

curl -X POST -c cookies https://api.cloud.wso2.com/store/site/blocks/user/login/ajax/login.jag -d 'action=login&username=user1&password=xxx'

The <user name> should be email@organization_key. For example, if the e-mail is jhon@gmail.com, the <user name> should be jhon@gmail.com@organization_key. You can find the organization_key on the Manage page of the cloud.

Logout

DescriptionLog out from API Store.
URIhttps://api.cloud.wso2.com/store/site/blocks/user/login/ajax/login.jag
URI Parameters?action=logout
HTTP MethodsGET
Examplecurl -b cookies https://api.cloud.wso2.com/store/site/blocks/user/login/ajax/login.jag?action=logout

User Signup

DescriptionAdd a new API Consumer.
URIhttps://api.cloud.wso2.com/store/site/blocks/user/sign-up/ajax/user-add.jag
URI Parametersaction=addUser&username=xxx&password=xxx&allFieldsValues=firstname|lastname|email
HTTP MethodsPOST
Examplecurl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/user/sign-up/ajax/user-add.jag -d 'action=addUser&username=user2&password=xxx&allFieldsValues=firstname|lastname|email'

Search APIs

DescriptionSearch for APIs using a given query.
URI

https://api.cloud.wso2.com/store/site/blocks/search/api-search/ajax/search.jag

URI Parameters

action=searchAPIs&query=<query>&start=<number>&end=<number>

The start and end parameters determine the range of APIs you want to retrieve. For example, if start=1 and end=3, the first 3 APIs that appear in the search results will be returned. Note that both 0 and 1 represent the first API in the search results, so start=0 and start=1 both means the same.

HTTP MethodsPOST
Example

curl -X POST -b cookies "https://api.cloud.wso2.com/store/site/blocks/search/api-search/ajax/search.jag" -d "action=searchAPIs&query=test&start=0&end=3"

Get all Paginated Published APIs

DescriptionGet a list of all published APIs in paginated form so that browsing is easier.
URI https://api.cloud.wso2.com /store/site/blocks/api/listing/ajax/list.jag
URI Parametersaction=getAllPaginatedPublishedAPIs, tenant, start, end
HTTP MethodsGET
Examplecurl -b cookies https://api.cloud.wso2.com/store/site/blocks/api/listing/ajax/list.jag?action=getAllPaginatedPublishedAPIs&tenant=carbon.super&start =0&end=2

Please note that the getAllPublishedAPIs API is deprecated. You can get the same functionality from getAllPaginatedPublishedAPIs.

Get Published APIs by Application

DescriptionGet a list of published APIs filtered by the subscribed Application. Login API needs be called prior to calling this API.
URIhttps://api.cloud.wso2.com/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag
URI Parametersaction=getSubscriptionByApplication&app=App1
HTTP MethodsGET
Examplecurl -b cookies https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getSubscriptionByApplication&app=App1

Add an Application

DescriptionAdd a new application.
URIhttps://api.cloud.wso2.com/store/site/blocks/application/application-add/ajax/application-add.jag
URI Parametersaction=addApplication&application=xxx&tier=xxx&description=xxx&callbackUrl
HTTP MethodsPOST
Examplecurl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/application/application-add/ajax/application-add.jag -d 'action=addApplication&application=app1&tier=Gold&description=&callbackUrl='

Update an Application

DescriptionUpdate an existing application.
URIhttps://api.cloud.wso2.com/store/site/blocks/application/application-update/ajax/application-update.jag
URI Parameters

action=updateApplication&applicationOld=xxx&applicationNew=xxx&callbackUrlNew=xxx&descriptionNew=xxx&tier=xxx

HTTP MethodsPOST
Examplecurl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/application/application-update/ajax/application-update.jag -d 'action=updateApplication&applicationOld=app1&applicationNew=app2&tier=Gold&descriptionNew=&callbackUrlNew'

Get Applications

DescriptionGet list of applications.
URI https://api.cloud.wso2.com/store/site/blocks/application/application-list/ajax/application-list.jag
URI Parameters?action=getApplications
HTTP MethodsGET
Examplecurl -b cookies https://api.cloud.wso2.com/store/site/blocks/application/application-list/ajax/application-list.jag?action=getApplications

Remove an Application

DescriptionRemove an existing application.
URI https://api.cloud.wso2.com/store/site/blocks/application/application-remove/ajax/application-remove.jag
URI Parameters

action=removeApplication&application=xxx

HTTP MethodsPOST
Example curl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/application/application-remove/ajax/application-remove.jag -d 'action=removeApplication&application=app2'

Generate an Application Key

DescriptionGenerate the key and secret values for a new application.
URI

 https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag

URI Parameters

action=generateApplicationKey&application=<app_name>&keytype=<PRODUCTION|SANDBOX>&callbackUrl=<URL>&authorizedDomains=<The domains from which requests are allowed to the APIs>&validityTime=<time duration in seconds>&tokenScope

tokenScope is given in the request when your API has Auth scopes defined. See OAuth scopes.

HTTP MethodsPOST
Examples
  1. curl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=generateApplicationKey&application=NewApp1&keytype=PRODUCTION&callbackUrl=&authorizedDomains=ALL&validityTime=360000'
  2. curl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=generateApplicationKey&application=NewApp1&keytype=SANDBOX&callbackUrl=&authorizedDomains=ALL&validityTime=360000&tokenScope=scope1'

Add a Subscription

DescriptionAdd a new API subscription.
URI https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag
URI Parameters

action=addSubscription&name=xxx&version=xxx&provider=xxx&tier=xxx&applicationId=xxx

HTTP MethodsPOST
Examplecurl -X POST -b cookies  https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=addSubscription&name=API1&version=1.0.0&provider=user1&tier=gold&applicationId=1'

List Subscriptions

DescriptionList all API subscriptions.
URIhttps://api.cloud.wso2.com/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag
URI Parameters

action=getAllSubscriptions

HTTP MethodsGET
Examplecurl -b cookies  https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getAllSubscriptions

List Subscriptions by Application

DescriptionList all API subscriptions of a given application.
URI https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag
URI Parameters

action=getSubscriptionByApplication&app=<application_name>

HTTP MethodsGET
Example

curl -b cookies 'https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getSubscriptionByApplication&app=DefaultApplication'

Remove a Subscription

DescriptionRemove an API subscription
URI https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-remove/ajax/subscription-remove.jag
URI Parameters

action=removeSubscription&name=xxx&version=xxx&provider=xxx&applicationId=xxx

HTTP MethodsPOST
Examplecurl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-remove/ajax/subscription-remove.jag -d 'action=removeSubscription&name=API1&version=1.0.0&provider=user1&applicationId=1'

Delete an OAuth Application

DescriptionDeletes an OAuth application in a third-party Authorization Server. If you delete it through the API Store UI, only the mapping that is maintained in the API Cloud will be deleted.
URIhttps://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag
URI Parameters

action=deleteAuthApplication&consumerKey=<application_key>

HTTP MethodsPOST
Example

curl -k -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=deleteAuthApplication&consumerKey=4lHddsxCtpFa2zJE1EbBpJy_NIQa'

Provision an Out-of-Band OAuth Client 

DescriptionProvisions an OAuth client that was created out-of-band.
URIhttps://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag
URI Parameters

action=mapExistingOauthClient&application=semi&keytype=PRODUCTION/SANDBOX&callbackUrl=<URL>&authorizedDomains=<The domains from which requests are allowed to the APIs>&validityTime=<time duration in seconds>&client_id=<client ID>

HTTP MethodsPOST
Example

curl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=mapExistingOauthClient&application=semi&keytype=PRODUCTION&callbackUrl=google.com&authorizedDomains=ALL&validityTime=3600&client_id=mPbgvinvpEk1QcSrw962TLICriUa&jsonParams={"username":"admin","key_type":"PRODUCTION","client_secret":"ynEI1ugq1_RCTJ9bM8jtD9RCsdoa","validityPeriod":3600,"client_id":"mPbgvinvpEk1QcSrw962TLICriUa"}'

Clean Partially Created Keys

DescriptionCleans any partially created keys from the API Cloud database, before adding a new subscription. Partially created keys can remain in the API Cloud databases when an OAuth application of a third-party authorization server gets deleted using the API Store UI. It only deletes the mapping that is maintained in the API Cloud side.
URIhttps://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag
URI Parameters

action=cleanUpApplicationRegistration&applicationName=xxx&keyType=PRODUCTION/SANDBOX'

HTTP MethodsPOST
Example

curl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=cleanUpApplicationRegistration&applicationName=DefaultApplication&keyType=PRODUCTION'

Get all Documentation

DescriptionGet all documents create for a given API
URIhttps://api.cloud.wso2.com/store/site/blocks/api/listing/ajax/list.jag
URI Parameters

action=getAllDocumentationOfApi&name=<API Name>&version=x.x.x&provider=<Name of the API provider>"

HTTP MethodsGET
Example

curl -b cookies "https://api.cloud.wso2.com/store/site/blocks/api/listing/ajax/list.jag?action=getAllDocumentationOfApi&name=PhoneVerification&version=1.0.0&provider=admin"

Get the Contents of a File Document

Add an API Comment

DescriptionAdd a comment to an API.
URIhttps://api.cloud.wso2.com/store/site/blocks/comment/comment-add/ajax/comment-add.jag
URI Parameters

action=addComment&name=xxx&version=xxx&provider=xxx&comment=xxx

HTTP MethodsPOST
Example

curl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/comment/comment-add/ajax/comment-add.jag -d 'action=addComment&name=CalculatorAPI&version=1.0&provider=admin&comment=test comment'

Get all Endpoint URLs

DescriptionGet all the endpoint URLs of the API Gateway environments configured for an API.
URI

https://api.cloud.wso2.com/store/site/blocks/api/api-info/ajax/api-info.jag

URI Parameters

action=getAPIEndpointURLs&name=xxx&version=x.x.x&provider=xxx

HTTP MethodsPOST
Example

curl -X POST -b cookies https://api.cloud.wso2.com/store/site/blocks/api/api-info/ajax/api-info.jag -d 'action=getAPIEndpointURLs&name=CalculatorAPI&version=1.0&provider=admin'

Get all Available Tiers

DescriptionGet all the tiers available in the deployment.
URI

https://api.cloud.wso2.com/store/site/blocks/item-add/ajax/add.jag

URI Parameters

action=getTiers

HTTP MethodsGET
Example

curl -b cookies https://api.cloud.wso2.com/store/site/blocks/item-add/ajax/add.jag?action=getTiers

  • No labels