Try "thumbnailUri" instead as mentioned in docs[1]. [1] https://docs.wso2.com/display/AM200/apidocs/publisher/#!/operations#APICollection#apisPost
Thanks, Bhathiya On Thu, Dec 29, 2016 at 9:40 PM, Prakhash Sivakumar <[email protected]> wrote: > Hi all, > > I'm trying to invoke the APIM *Create API* as below with the payload I > have added below. > > curl -H "Authorization: Bearer 717e570e-5ccc-3c4a-9906-6bd81e94a7db" -H > "Content-Type:application/json" -X POST -d @data.json > http://127.0.0.1:9763/api/am/publisher/v0.10/apis > > I'm getting the response as below when doing this > > {"code":400,"message":"Bad Request","description":"Unrecognized property > 'thumbnailUrl'","moreInfo":"","error":[]} > > But when I remove the *thumbnailUrl* from the payload this works > perfectly. > > What might be the reason for the bad request response when I'm sending the > request with the thumbnailUrl? > > I'm following the example from the Lab kit in [1] and using the AM 2.0. > > > *Payload* > ======== > { > "sequences":[ > > ], > "tiers":[ > "Bronze", > "Gold" > ], > "thumbnailUrl":null, > "visibility":"PUBLIC", > "visibleRoles":[ > > ], > "visibleTenants":[ > > ], > "cacheTimeout":300, > "endpointConfig":"{\"production_endpoints\":{\"url\":\" > http://maps.google.com/maps/api/directions/\",\"config\":null},\"endpoint_type\":\"http > \"}", > "subscriptionAvailability":null, > "subscriptionAvailableTenants":[ > > ], > "destinationStatsEnabled":"Disabled", > "apiDefinition":"{\"paths\":{\"\/*\":{\"get\":{\"x-auth- > type\":\"Application\",\"x-throttling-tier\":\"Unlimited\ > ",\"responses\":{\"200\":{\"description\":\"OK\"}}}}},\"x- > wso2-security\":{\"apim\":{\"x-wso2-scopes\":[]}},\" > swagger\":\"2.0\",\"info\":{\"title\":\"GoogleDirectionsAPI\",\"description\":\"Calculates > directions between locations\",\"contact\":{\"email\":\"ApiPublisher@ > pizzashack.com\",\"name\":\"ApiPublisher\"},\"version\":\"Beta\"}}", > "responseCaching":"Disabled", > "isDefaultVersion":true, > "gatewayEnvironments":"Production and Sandbox", > "businessInformation":{ > "technicalOwner":"ApiCreator", > "technicalOwnerEmail":"[email protected]", > "businessOwner":"ApiPublisher", > "businessOwnerEmail":"[email protected]" > }, > "transport":[ > "http", > "https" > ], > "tags":[ > "phone", > "multimedia", > "mobile" > ], > "provider":"admin", > "version":"Beta", > "description":"Calculates directions between locations", > "name":"GoogleDirectionsAPI", > "context":"/googledirections" > } > > > [1] http://wso2.com/training/api-manager-developer- > fundamentals#request_training_enroll > -- > Prakhash Sivakumar > Software Engineer | WSO2 Inc > Platform Security Team > Mobile : +94771510080 <077%20151%200080> > Blog : https://medium.com/@PrakhashS > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Bhathiya Jayasekara* *Senior Software Engineer,* *WSO2 inc., http://wso2.com <http://wso2.com>* *Phone: +94715478185* *LinkedIn: http://www.linkedin.com/in/bhathiyaj <http://www.linkedin.com/in/bhathiyaj>* *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* *Blog: http://movingaheadblog.blogspot.com <http://movingaheadblog.blogspot.com/>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
