Hi, Currently I'm writing test cases for API Manager: API Visibility (search behaviour). I'm referring following documentation [1]. I tried the "Get an API" section [1] curl command and it was successful.
Suhans-MacBook-Pro:integration suhanr$ *curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag <http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag> -d "action=getAPI&name=APILifeCycleTestAPI&version=1.0.0&provider=admin"* {"error" : false, "api" : {"name" : "APILifeCycleTestAPI", "version" : "1.0.0", "description" : "This is test API create by API manager integration test", "endpoint" : "", "wsdl" : "/registry/resource/_system/governance/apimgt/applicationdata/wsdls/admin--APILifeCycleTestAPI1.0.0.wsdl", "tags" : "updated", "availableTiers" : "Gold", "status" : "PUBLISHED", "thumb" : null, "context" : "/testAPI", "lastUpdated" : "1422445208156", "subs" : 1, "templates" : [["/*", "GET", "Application", "Unlimited"]], "sandbox" : "", "tierDescs" : "Allows 20 request(s) per minute.", "bizOwner" : "", "bizOwnerMail" : "", "techOwner" : "", "techOwnerMail" : "", "wadl" : "", "visibility" : "restricted", "roles" : "admin", "tenants" : "", "epUsername" : "", "epPassword" : "", "endpointTypeSecured" : "false", "provider" : "admin", "transport_http" : "checked", "transport_https" : "checked", "apiStores" : null, "inSequence" : "", "outSequence" : "", "subscriptionAvailability" : "", "subscriptionTenants" : "", "endpointConfig" : "{\"production_endpoints\":{\"config\":null,\"url\":\" http://gdata.youtube.com/feeds/api/standardfeeds\"},\"endpoint_type\":\"http\"}", "responseCache" : "Disabled", "cacheTimeout" : "300", "availableTiersDisplayNames" : "Gold", "faultSequence" : "", "destinationStats" : "Disabled", "resources" : "[{\"http_verbs\":{\"GET\":{\"auth_type\":\"Application \",\"throttling_tier\":\"Unlimited\"}},\"url_pattern\":\"\\/*\"}]", "scopes" : "[]", "isDefaultVersion" : "false", "implementation" : "ENDPOINT", "hasDefaultVersion" : false, "currentDefaultVersion" : null}}Suhans-MacBook-Pro:integration suhanr$ Publisher front end API search behaviour is as follows. *sample url: https://10.100.5.175:9443/publisher/site/pages/index.jag <https://10.100.5.175:9443/publisher/site/pages/index.jag>* Search Options By API Name [Default] or By API Provider [Syntax - provider:xxxx ] or By API Version [Syntax - version:xxxx ] or By Context [Syntax - context:xxxx ] or By Status [Syntax - status:xxxx ] or By Description [Syntax - description:xxxx ] or By Subcontext [Syntax - subcontext:xxxx ] or By Documentation Content [Syntax - doc:xxxx ] To simulate above search options, I tried the following and it failed. Suhans-MacBook-Pro:integration suhanr$ curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag -d "action=getAPI&*name=APILifeCycleTestAPI&provider=admin"* {"error" : true, "message" : " Invalid number of parameters or their types."}Suhans-MacBook-Pro:integration suhanr$ Suhans-MacBook-Pro:integration suhanr$ curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag -d "action=getAPI&*version=1.0.0&provider=admin"* {"error" : true, "message" : " Invalid number of parameters or their types."}Suhans-MacBook-Pro:integration suhanr$ - How can I modify the curl command to search APIs by other means (search by: provider/description/context/documentation content) ? - To automate above search behaviour, do I have to modify (e.g.: overload getApi method) the wso2am-1.9.0/1.9.0/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/utils/publisher/utils/ *APIPublisherRestClient*.java? - If so how can I find the search behaviour/number of parameters implemented in service? [1] https://docs.wso2.com/display/AM180/Publisher+APIs Thanks, Suhan -- Suhan Dharmasuriya Software Engineer - Test Automation *WSO2, Inc. * lean . enterprise . middleware Tel: +94 112 145345 Mob: +94 779 869138 Blog: http://suhan-opensource.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
