Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed the cURL for "Remove an application" applicationName to application

Store APIs provide the following REST resources.

Table of Contents
typeflat

...

...

DescriptionAdd a new application.
URIhttp://localhost:9763/store/site/blocks/application/application-add/ajax/application-add.jag
URI Parametersaction=addApplication&applicationName=xxx&tier=xxx&description=xxx&callbackUrl
HTTP MethodsPOST
Example

curl -X POST -b cookies http://localhost:9763/store/site/blocks/application/application-add/ajax/application-add.jag -d 'action=addApplication&applicationName=NewApp1&tier=Unlimited&description=&callbackUrl='

...

DescriptionRemove an existing application.
URIhttp://localhost:9763/store/site/blocks/application/application-remove/ajax/application-remove.jag
URI Parameters

action=removeApplication&applicationNameapplication=xxx

HTTP MethodsPOST
Example

curl -X POST -b cookies http://localhost:9763/store/site/blocks/application/application-remove/ajax/application-remove.jag -d "action=removeApplication&applicationNameapplication=NewApp2"

Generate an Application Key

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

http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag

URI Parameters

action=generateApplicationKey&applicationName=<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 http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=generateApplicationKey&applicationName=NewApp1&keytype=PRODUCTION&callbackUrl=&authorizedDomains=ALL&validityTime=360000'
  2. curl -X POST -b cookies http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=generateApplicationKey&applicationName=NewApp1&keytype=SANDBOX&callbackUrl=&authorizedDomains=ALL&validityTime=360000&tokenScope=scope1'

Add a Subscription

DescriptionAdd a new API subscription.
URI http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag
URI Parameters
  • By application name: action=addAPISubscription&name=xxx&version=xxx&provider=xxx&tier=xxx&applicationName=xxx
  • By application ID: action=addSubscription&name=xxx&version=xxx&provider=xxx&tier=xxx&applicationId=xxx
HTTP MethodsPOST
Example

...

DescriptionList all applications with active subscriptions, along with the access key information of each application.
URIhttp://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag
URI Parameters

action=getAllSubscriptions, selectedApp (optional)

You can give an application's name in the selectedApp parameter. The API then returns the given application's subscribed APIs and access key information. If you do not specify this parameter, only the first application in the retrieved application list will contain subscribed API details, in addition to the access key information.

HTTP MethodsGET
Examples
  1. curl -b cookies http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getAllSubscriptions
  2. curl -b cookies 'http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getAllSubscriptions&selectedApp=NewApp1'

...

DescriptionProvisions an OAuth client that was created out-of-band.
URIhttp://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag
URI Parameters

action=mapExistingOauthClient&applicationName=<APPLICATION_NAME>&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 http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=mapExistingOauthClient&applicationName=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

...