Publisher 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 Publisher application itself, you do not have to invoke the login API first.
Login
Description | Log in to API Publisher web application. |
URI | http://localhost:9763/publisher/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/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=user1&password=xxx' |
Logout
Description | Log out from API Publisher web application. |
URI | http://localhost:9763/publisher/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 |
Add/Update API
Description | Add a new API or update an existing API. |
URI | http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag |
URI Parameters | Add API : ?action=addAPI&name=xxx&context=/xxx&version=1.0.0&tier=Bronze&tier=Gold&transports=http&http_checked=http&transports=https&https_checked=https&description=xxx&visibility=public API&tags=xxx,xxx&resourceCount=0&resourceMethod-0=GET,PUT,POST,DELETE,OPTIONS&resourceMethodAuthType-0=Application & Application User,Application & Application User,Application & Application User,Application & Application User,None&uriTemplate-0=/*&resourceMethodThrottlingTier-0=Unlimited, Unlimited, Unlimited, Unlimited, Unlimited&tiersCollection=Bronze,Gold,Silver,Unlimited Update API : ?action=updateAPI&name=xxx&provider=apiCreateName&context=/xxx&version=1.0.0&tier=Bronze&tier=Gold&transports=http&http_checked=http&transports=https&https_checked=https&description=xxx&visibility=public API&tags=xxx,xxx&resourceCount=0&resourceMethod-0=GET,PUT,POST,DELETE,OPTIONS&resourceMethodAuthType-0=Application & Application User,Application & Application User,Application & Application User,Application & Application User,None&uriTemplate-0=/*&resourceMethodThrottlingTier-0=Unlimited, Unlimited, Unlimited, Unlimited, Unlimited&tiersCollection=Bronze,Gold,Silver,Unlimited |
---|---|
HTTP Methods | POST |
Example | Add API : Update API : From APIM 1.6.0 this service accepts endpoint configuration data as a JSON value. In endpoint config JSON you have to specify "endpoint_type" and "production_endpoints" and/or "sandbox_endpoints". |
Get All APIs
Description | Lists all the created APIs. |
URI | http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag |
URI Parameters | ?action=getAllAPIs |
---|---|
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag?action=getAllAPIs |
Get an API
Description | Get details of a specific API. |
URI | http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag |
URI Parameters | action=getAPI&name=xxx&version=xxx&provider=xxx |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag -d "action=getAPI&name=API1&version=1.0.0&provider=user1" |
Remove an API
Description | Remove an API. |
URI | http://localhost:9763/publisher/site/blocks/item-add/ajax/remove.jag |
URI Parameters | action=removeAPI&name=xxx&version=xxx&provider=xxx |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/remove.jag -d "action=removeAPI&name=API1&version=1.0.0&provider=user1" |
Copy an API
Description | Copy an API to a newer version. |
URI | http://localhost:9763/publisher/site/blocks/overview/ajax/overview.jag |
URI Parameters | action=createNewAPI&provider=xxx&apiName=xxx&version=xxx&newVersion=xxx |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/overview/ajax/overview.jag -d "action=createNewAPI&provider=user1&apiName=API1&version=1.0.0&newVersion=2.0.0” |
Check Older Version
Description | Does older version of API exist. |
URI | http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag |
URI Parameters | ?action=isAPIOlderVersionExist&provider=xxx&name=xxx&version=xxx |
---|---|
HTTP Methods | GET |
Example | curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag?action=isAPIOlderVersionExist&provider=user1&name=API1&version=1.0.0 |
Change API Status
Description | Change the API's status. |
URI | http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag |
URI Parameters | action=updateStatus&name=xxx&version=1.0.0&provider=apiCreateName&status=PUBLISHED&publishToGateway=true&requireResubscription=true |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies 'http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag' -d 'action=updateStatus&name=TwitterAPI&version=1.0.0&provider=provider&status=PUBLISHED&publishToGateway=true&requireResubscription=true' |
Add/Update an API Document
Description | Add a new API document. |
URI | http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag |
URI Parameters | Add Document: action=addDocumentation&mode=xxx&provider=xxx&apiName=xxx&version=xxx&docName=xxx&docType=xxx&sourceType=xxx&docUrl=xxx&summary=xxx&docLocation=xxx Update Document: action=addDocumentation&mode=xxx&provider=xxx&apiName=xxx&version=xxx&docName=xxx&docType=xxx&sourceType=xxx&docUrl=xxx&summary=xxx&docLocation=xxx |
---|---|
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag -d “action=addDocumentation&mode=’’&provider=user1&apiName=API1&version=1.0.0&docName=doc1&docType=how to&sourceType=inline&docUrl=’’&summary=testing&docLocation=’’ |
Remove an API Document
Description | Remove an API document. |
URI | http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag |
URI Parameters | action=removeDocumentation&provider=xxx&apiName=xxx&version=xxx&docName=xxx&docType=xxx |
---|---|
HTTP Methods | POST |
Example | curl -b cookies http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag?action=removeDocumentation&provider=admin&apiName=API1&version=1.0.0&docName=doc1&docType=How To |