Current APIs
For a complete list of the currently supported Publisher APIs, go to https://docs.wso2.com/display/AM210/apidocs/publisher.
...
Description | Add a new API. | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
URI | http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag | ||||||||||||||||||||||||||||||||||||||||||
URI Parameters | Given below are the parameters that you can pass with an Add-API call. Mandatory ones are marked with a *.
| ||||||||||||||||||||||||||||||||||||||||||
HTTP Methods | POST | ||||||||||||||||||||||||||||||||||||||||||
Example | curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=addAPI&name=PhoneVerification&context=/phoneverify&version=1.0.0&visibility=public&thumbUrl=&description=Verify a phone number&tags=phone,mobile,multimedia&endpointType=nonsecured&tiersCollection=Gold,Bronze&http_checked=http&https_checked=https&resourceCount=0&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*&default_version_checked=default_version&bizOwner=xx&bizOwnerMail=xx@ee.com&techOwner=xx&techOwnerMail=ggg@ww.com" -d'endpoint_config={"production_endpoints":{"url":"http://ws.cdyne.com/phoneverify/phoneverify.asmx","config":null},"endpoint_type":"http"}'; |
...
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=PhoneVerification&version=1.0.0&provider=admin&status=PUBLISHED&publishToGateway=true&requireResubscription=true' |
...
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 -X POST -b cookies http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag -d "action=removeDocumentation&provider=admin&apiName=PizzaShackAPI&version=1.0.0&docName=Sample&docType=HowTo" |
...
Description | Get the list of all the API creators. |
---|---|
URI | |
Request Headers | "Content-Type" -> "application/x-www-form-urlencoded" |
HTTP Methods | POST |
Payload | action=getAPIUsageByUser¤tLocation=/publisher/site/pages/all-statistics.jag&fromDate=2014-05-10 00:00:00&toDate=2016-12-16 13:41:13&apiFilter=allAPIs |
Example | curl -v -b cookies -XPOST -H "Content-type: application/x-www-form-urlencoded" -d 'action=getAPIUsageByUser¤tLocation=/publisher/site/pages/all-statistics.jag&fromDate=2014-05-10 00:00:00&toDate=2016-12-16 13:41:13&apiFilter=allAPIs' 'httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/api-usage-user/ajax/stats.jag' |
Sample Response | < HTTP/1.1 200 OK |
...
Description | Get the number of subscribers. |
---|---|
URI | |
Request Headers | "Content-Type" -> "application/x-www-form-urlencoded" |
HTTP Methods | POST |
Payload | action:getSubscriberCountByAPIs |
Example | curl -v -b cookies -XPOST -H "Content-type: application/x-www-form-urlencoded" -d 'action=getSubscriberCountByAPIs¤tLocation=/publishe/site/pages/all-statistics.jag&apiFilter=allAPIs' 'httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/api-subscriptions/ajax/stats.jag' |
Sample Response | < HTTP/1.1 200 OK |
...
Description | Get the API usage based on the resource path. |
---|---|
URI | |
Request Headers | "Content-Type" -> "application/x-www-form-urlencoded" |
HTTP Methods | POST |
Payload | action:getAPIUsageByResourcePath |
Example | curl -v -b cookies -XPOST -H "Content-type: application/x-www-form-urlencoded" -d 'action=getAPIUsageByResourcePath¤tLocation=%2Fpublisher%2Fsite%2Fpages%2Fall-statistics.jag&fromDate=2014-05-10+00%3A00%3A00&toDate=2016-12-16+14%3A34%3A33&apiFilter=allAPIs' 'httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/api-usage-resource-path/ajax/stats.jag' |
Sample Response | < HTTP/1.1 200 OK |
...
Description | Get the API usage based on the destination |
---|---|
URI | |
Request Headers | "Content-Type" -> "application/x-www-form-urlencoded" |
HTTP Methods | POST |
Payload | action:getAPIUsageByDestination |
Example | curl -v -b cookies -XPOST -H "Content-type: application/x-www-form-urlencoded" -d 'action=getAPIUsageByDestination¤tLocation=%2Fpublisher%2Fsite%2Fpages%2Fall-statistics.jag&fromDate=2014-05-10+00%3A00%3A00&toDate=2016-12-16+14%3A34%3A33&apiFilter=allAPIs' 'httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/api-usage-destination/ajax/stats.jag' |
Sample Response | < HTTP/1.1 200 OK |
...
Description | Get API Usage by Provider. |
---|---|
URI | httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/api-usage/ajax/stats.jag |
Request Headers | "Content-Type" -> "application/x-www-form-urlencoded" |
HTTP Methods | POST |
Payload | action:getProviderAPIUsage |
Example | curl -v -b cookies -XPOST -H "Content-type: application/x-www-form-urlencoded" -d 'ac |
Sample Response | < HTTP/1.1 200 OK |
...
Description | Get the throttling related data related to the APIs and applications. |
---|---|
URI | httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/api-throttledcounts/ajax/stats.jag |
Request Headers | "Content-Type" -> "application/x-www-form-urlencoded" |
HTTP Methods | POST |
Payload | action:getThrottleDataOfAPIAndApplication |
Example | curl -v -b cookies -XPOST -H "Content-type: application/x-www-form-urlencoded" -d 'action=getThrottleDataOfAPIAndApplication¤tLocation=%2Fpublisher%2Fsite%2Fpages%2Fall-statistics.jag&apiName=Cedum&appName=&fromDate=2014-05-10+00%3A00%3A00&toDate=2016-12-16+15%3A07%3A00&apiFilter=allAPIs' 'httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/api-throttledcounts/ajax/stats.jag' |
Sample Response | < HTTP/1.1 200 OK |
...
Description | Get the response fault count of APIs. |
---|---|
URI | httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/faulty-invocations/ajax/stats.jag |
Request Headers | "Content-Type" -> "application/x-www-form-urlencoded" |
HTTP Methods | POST |
Payload | action:getThrottleDataOfAPIAndApplication |
Example | curl -v -b cookies -XPOST -H "Content-type: application/x-www-form-urlencoded" -d 'action=getAPIResponseFaultCount¤tLocation=%2Fpublisher%2Fsite%2Fpages%2Fall-statistics.jag&fromDate=2014-05-10+00%3A00%3A00&toDate=2016-12-16+15%3A07%3A00&apiFilter=allAPIs' 'httpshttp://api.cloud.wso2.comlocalhost:9763/publisher/site/blocks/stats/faulty-invocations/ajax/stats.jag ' |
Sample Response | < HTTP/1.1 200 OK |