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\":\"
[email protected]
\",\"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
Blog : https://medium.com/@PrakhashS
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to