Store APIs provide the following REST resources.
Note: When you access any API other than the login and logout APIs through an external REST client such as cURL, 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 we use in the next API invocations.
Alternatively, if you access these APIs from the API Store application itself, you do not have to invoke the login API first.
Login
Description | Log in to API Store. |
URI | http://localhost:9763/store/site/blocks/user/login/ajax/login.jag |
---|---|
URI Parameters | action=login&username=xxx&password=xxx |
HTTP Methods | POST |
Example | curl -X POST -c cookies http://localhost:9763/store/site/blocks/user/login/ajax/login.jag -d 'action=login&username=user1&password=xxx' |
Logout
Description | Log out from API Store. |
URI | http://localhost:9763/store/site/blocks/user/login/ajax/login.jag |
---|---|
URI Parameters | ?action=logout |
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag?action=logout |
User Signup
Description | Add a new API Consumer. |
URI | http://localhost:9763/store/site/blocks/user/sign-up/ajax/user-add.jag |
URI Parameters | action=addUser&username=xxx&password=xxx&allFieldsValues=firstname|lastname|email |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/user/sign-up/ajax/user-add.jag -d “action=addUser&username=user2&password=xxx&allFieldsValues=firstname|lastname|email” |
Get all Published APIs
Description | Get a list of all published APIs. |
URI | http://localhost:9763/store/site/blocks/api/listing/ajax/list.jag |
URI Parameters | ?action=getAllPublishedAPIs |
---|---|
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/site/blocks/api/listing/ajax/list.jag?action=getAllPublishedAPIs |
Get Published APIs by Application
Description | Get a list of published APIs filtered by the subscribed Application. Login API needs be called prior to calling this API. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag |
URI Parameters | action=getSubscriptionByApplication&app=App1 |
---|---|
HTTP Methods | GET |
Example | curl -b cookies 'http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getSubscriptionByApplication&app=App1' |
Add an Application
Description | Add a new application. |
URI | http://localhost:9763/store/site/blocks/application/application-add/ajax/application-add.jag |
URI Parameters | action=addApplication&application=xxx&tier=xxx&description=xxx&callbackUrl |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/application/application-add/ajax/application-add.jag -d 'action=addApplication&application=app1&tier=unlimited&description=&callbackUrl=' |
Update an Application
Description | Update an existing application. |
URI | http://localhost:9763/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 Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/application/application-update/ajax/application-update.jag -d 'action=updateApplication&applicationOld=app1&applicationNew=app2&tier=unlimited&descriptionNew=&callbackUrlNew' |
Get Applications
Description | Get list of applications. |
URI | http://localhost:9763/store/site/blocks/application/application-list/ajax/application-list.jag |
URI Parameters | ?action=getApplications |
---|---|
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/site/blocks/application/application-list/ajax/application-list.jag?action=getApplications |
Remove an Application
Description | Remove an existing application. |
URI | http://localhost:9763/store/site/blocks/application/application-remove/ajax/application-remove.jag |
URI Parameters | action=removeApplication&application=xxx |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/application/application-remove/ajax/application-remove.jag -d "action=removeApplication&application=app2" |
Add a Subscription
Description | Add a new API subscription. |
URI | http://localhost:9763/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 Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/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
Description | List all API subscriptions. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag |
URI Parameters | action=getAllSubscriptions |
---|---|
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getAllSubscriptions |
Remove a Subscription
Description | Remove an API subscription. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-remove/ajax/subscription-remove.jag |
URI Parameters | action=removeSubscription&name=xxx&version=xxx&provider=xxx&applicationId=xxx |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/subscription/subscription-remove/ajax/subscription-remove.jag -d 'action=removeSubscription&name=API1&version=1.0.0&provider=user1&applicationId=1' |
Add an API Comment
Description | Add a comment for an API. |
URI | http://localhost:9763/store/site/blocks/comment/comment-add/ajax/comment-add.jag |
URI Parameters | action=addComment&name=xxx&version=xxx&provider=xxx&comment=xxx |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/comment/comment-add/ajax/comment-add.jag -d 'action=addComment&name=API1&version=1.0.0&provider=user1&comment=Hello' |