...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Warning |
---|
The following Publisher APIs are deprecated and will be unsupported in a future release. They are provided below for reference by existing users. For a complete list of the currently supported Publisher APIs, go to https://docs.wso2.com/display/AM210/apidocs/publisher/. |
...
Deprecated APIs
The following Publisher APIs are deprecated and will be unsupported in a future release. They are provided below for reference by existing users. For the currently supported APIs, see the link above.
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Note |
---|
Note: When you access any API other than the login and logout APIs |
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 response is a JSON message. |
...
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 "}'; |
Add API with Path Parameter
Description | Add a new API with path parameter |
---|---|
URI | http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag |
URI Parameters | action=addAPI&name=xxx&context=/xxx&version=1.0.0&visibility=xxx&thumbUrl=&description=xxx&tags=xxx&endpointType=xxx&tiersCollection=xxx&http_checked=http&https_checked=https" -d 'swagger=xxx |
HTTP Methods | POST |
Example | curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=addAPI&name=SampleApi&context=/sample&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" -d 'swagger={"paths" : {"/estimate/" : {"get" : {"x-auth-type" : "Application%20%26%20Application%20User", "x-throttling-tier" : "Unlimited", "responses" : {"200" : {}}, "parameters" : [{"name" : "id", "paramType" : "path", "required" : false, "type" : "string", "description" : "Phone Number", "in" : "path"}]}}}, "swagger" : "2.0", "x-wso2-security" : {"apim" : {"x-wso2-scopes" : [{"description" : "", "name" : "read_number", "roles" : "admin", "key" : "read_number"}]}}, "info" : {"title" : "SampleApi", "version" : "1.0.0"}}' -d 'endpoint_config={"production_endpoints":{"url":"http://ws.cdyne.com/phoneverify/phoneverify.asmx","config":null},"endpoint_type":"http"}' |
Update API
Description | Update an existing API |
---|---|
URI | http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag |
URI Parameters | Parameters are same as in Add API except that action = updateAPI and you can only update the following parameters: visibility, t humbUrl, description, tags, endpointType, endpoint_config (can change the endpoint URL etc,) http_checked, https_checked, tiersCollection, swagger and can also add new resources. See example below. |
HTTP Methods | POST |
Example | Update API : curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=updateAPI&name=PhoneVerification&provider=admin&version=1.0.0&visibility=public&description=Youtube Live Feeds&endpointType=nonsecured&http_checked=http&https_checked=https&tags=youtube,gdata,multimedia&tier=Silver&thumbUrl=http://www.10bigideas.com.au/www/573/files/pf-thumbnail-youtube_logo.jpg&context=/youtube&tiersCollection=Gold,silverSilver&resourceCount=0&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*" -d 'endpoint_config={"production_endpoints":{"url":"http://gdata.youtube.com/feeds/api/standardfeeds","config":null},"endpoint_type":"http"}'; |
Publishing an API to external Store
Description | Publish an API to external store | ||
---|---|---|---|
URI | http://localhost:9763/publisher/site/blocks/item-external/ajax/external.jag | ||
URI Parameters | action=updateExternal&name=xxx&version=xxx&provider=xxx&externalAPIStores=<external-store-1>::<external-store-2>::<external-store-3>
| ||
HTTP Methods | POST | ||
Example | updateExternal : curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-external/ajax/external.jag -d "action=updateExternal&name=PhoneVerification&version=1.0.0&provider=admin&externalAPIStores=exstore2::exstore3
|
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 |
...
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 | http://localhost:9763/publisher/site/blocks/stats/api-usage-user/ajax/stats.jag |
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' ' http://localhost:9763/publisher/site/blocks/stats/api-usage-user/ajax/stats.jag ' |
Sample Response | < HTTP/1.1 200 OK |
...