Store APIs provide the following REST resources.
Table of Contents | ||
---|---|---|
|
Note |
---|
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. The responses is a JSON message. |
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=admin&password=admin' |
Logout
Description | Log out from API Store. |
URI | http://localhost:9763/store/site/blocks/user/login/ajax/login.jag?action=logout |
URI Parameters | ?action=logout |
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/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=user1&password=test123&allFieldsValues=firstname|lastname|email' |
Search APIs
Description | Search for APIs using a given query. |
URI | http://localhost:9763/store/site/blocks/search/api-search/ajax/search.jag |
URI Parameters | action=searchAPIs&query=<query>&start=<number>&end=<number> The |
HTTP Methods | POST |
Example | curl -X POST -b cookies "http://localhost:9763/store/site/blocks/search/api-search/ajax/search.jag" -d "action=searchAPIs&query=test&start=0&end=3" |
Get all Paginated Published APIs
Description | Get a list of all published APIs in paginated form so that browsing is easier. |
URI | http://localhost:9763/store/site/blocks/api/listing/ajax/list.jag |
URI Parameters | action=getAllPaginatedPublishedAPIs, tenant, start, end, returnAPITags (optional) The The |
HTTP Methods | GET |
Example | To get the first 100 APIs in the API Store: curl -b cookies "http://localhost:9763/store/site/blocks/api/listing/ajax/list.jag?action=getAllPaginatedPublishedAPIs&tenant=carbon.super&start=1&end=100" |
Note |
---|
Please note that the |
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=DefaultApplication' |
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& |
applicationName=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& |
applicationName=NewApp1&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=NewApp1&applicationNew=NewApp2&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 |
Get an Application by Name
Description | Get details of a single application by name. |
URI | http://localhost:9763/store/site/blocks/application/application-list/ajax/application-list.jag |
URI Parameters | ?action=getApplicationByName&applicationName=$APP_NAME |
HTTP Methods | GET |
Example | curl -b cookies 'http://localhost:9763/store/site/blocks/application/application-list/ajax/application-list.jag?action=getApplicationByName&applicationName=$APP_NAME' |
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=NewApp2" |
Generate an Application Key
Description | Generate 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
| |
HTTP Methods | POST |
Examples |
|
|
|
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 |
|
HTTP Methods | POST |
Example |
|
List Subscriptions
Description | List all applications with active subscriptions, along with the access key information of each application. |
URI | http://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 s |
HTTP Methods | GET |
Examples |
|
List Subscriptions by Application
Description | List all API subscriptions of a given application. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag |
URI Parameters | action=getSubscriptionByApplication&app=<application_name> |
HTTP Methods | GET |
Example | curl -b cookies 'http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag?action=getSubscriptionByApplication&app=DefaultApplication' |
List Subscriptions by API
Description | List all subscriptions of a given API. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-list/ajax/subscription-list.jag |
URI Parameters | action=getSubscriptionByAPI&apiName=xxx&apiVersion=xxx&provider=xxx |
HTTP Methods | GET |
Example |
Remove a Subscription
Description | Remove an API subscription. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-remove/ajax/subscription-remove.jag |
URI Parameters |
|
HTTP Methods | POST |
Example |
|
Delete an OAuth Application
Description | Deletes 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 Manager side will be deleted. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag |
URI Parameters | action=deleteAuthApplication&consumerKey=<application_key> |
HTTP Methods | POST |
Example | curl -k -X POST -b cookies http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=deleteAuthApplication&consumerKey=4lHddsxCtpFa2zJE1EbBpJy_NIQa' |
Provision an Out-of-Band OAuth Client
Description | Provisions an OAuth client that was created out-of-band. |
URI | http://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 Methods | POST |
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
Description | Cleans any partially created keys from the API Manager database, before adding a new subscription. Partially created keys can remain in the API Manager 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 Manager side. |
URI | http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag |
URI Parameters | action=cleanUpApplicationRegistration&applicationName=xxx&keyType=PRODUCTION/SANDBOX' |
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag -d 'action=cleanUpApplicationRegistration&applicationName=DefaultApplication&keyType=PRODUCTION' |
Get all Documentation
Description | Get all documents create for a given API |
URI | http://localhost:9763/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 Methods | GET |
Example | curl -b cookies "http://localhost:9763/store/site/blocks/api/listing/ajax/list.jag?action=getAllDocumentationOfApi&name=PhoneVerification&version=1.0.0&provider=admin" |
Swagger Documentation
Description | Swagger documentation for a given API |
URI | http://localhost:9763/store/site/blocks/api/listing/ajax/list.jag |
HTTP Methods | POST |
Example | curl -k https://localhost:9443/store/api-docs/<provider_name>/<api_name>/<version> |
Get the Contents of a File Document
Description | Get the contents of a file that is attached to API documentation of type 'File' |
URI | http://localhost:9763/store/site/blocks/api/documentation/view/ajax/file-docs.jag |
URI Parameters | action=getFileDocumentByFilePath&filePath=<Get the file path using getAllDocumentationOfApi> |
HTTP Methods | GET |
Example | curl -b cookies "http://localhost:9763/store/site/blocks/api/documentation/view/ajax/file-docs.jag?action=getFileDocumentByFilePath&filePath=/registry/resource/_system/governance/apimgt/applicationdata/provider/admin/host/1.0.0/documentation/files/test.txt'' |
Add an API Comment
Description | Add a comment to 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=WeatherAPI&version=1.0.0&provider=admin&comment=test comment' |
Get all Endpoint URLs
Description | Get all the endpoint URLs of the API Gateway environments configured for an API. |
URI | http://localhost:9763/store/site/blocks/api/api-info/ajax/api-info.jag |
URI Parameters | action=getAPIEndpointURLs&name=xxx&version=x.x.x&provider=xxx |
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/store/site/blocks/api/api-info/ajax/api-info.jag -d 'action=getAPIEndpointURLs&name=WeatherAPI&version=1.0.0&provider=admin' |