In short, our company has a product called the Airsafe Datastream - All Suppliers. It has a few query parameters which limit what is returned to the client when calling this API. In this case, the query parameter for the product is icao_address. You give it strings separated by a comma to filter the results. Example:
curl --max-time 30.0 -H ‘Authorization: token’ https://api.airsafe.spire.com/stream?icao_address=8880F7,A1314E,780B7F,A96B80,71BC19,7816BE,4BA94C 78115C
What I’m trying to implement is a product that runs on the same API proxy as the /stream endpoint but from the initial start at runtime, it already has a defined query parameter of strings
. (in the example above, during the API call I gave it the query strings as a filter and for this product it will be the default string from the getgo) So in our case, the customer only gets the records from the API call that we have already pre-determined and won’t need to add any additional query filter. So on Apigee UI, I made the following product with the following attributes in the field records:
- API Proxies → Airsafe-API
- Product name → Airsafe Datastream - Tail
- Path → /stream
- Custom Attributes: icao_address → 8880F7,A1314E,780B7F,A96B80,71BC19,7816BE,4BA94C 78115C
I then went and added this new product to an existing developer: 1. Went to a developer account and added the product: Airsafe Datastream - Tail Issue: When I call the product Airsafe Datastream - Tail, I still get all the records as if calling the Airsafe Datastream - All Suppliers. That is, without any filtering by icao_address. It also isn’t implementing my custom attribute filter of icao_address; which would mean it only returns the records with icao_address: 8880F7,A1314E,780B7F,A96B80,71BC19,7816BE,4BA94C 78115C as specified in the custom attribute section when I made the new product.
For example, what I expect calling this product: If you look at the key ‘icao_address’ in the image below, it is equal to a value specified in the custom attribute of the product Airsafe Datastream - Tail Only that I created. Again, this is NOT what’s actually happening.
{“target”:{“icao_address”:“8880F7”,“timestamp”:“2020-05-20T04:01:58Z”,“latitude”:55.047913,“longitude”:27.402891,“altitude_baro”:39975,“heading”:250.0,“ground_speed”:460.0,“vertical_rate”:-60,“squawk_code”:“5125”,“on_ground”:false,“callsign”:“HVN6513”,“tail_number”:“VN-A867”,“collection_type”:“terrestrial”,“icao_actype”:“B789”,“flight_number”:“VN6513”,“origin_airport_icao”:“VVNB”,“destination_airport_icao”:“EDDF”,“scheduled_departure_time_utc”:“2020-05-19T19:00:00Z”,“scheduled_departure_time_local”:“2020-05-20T02:00:00”,“scheduled_arrival_time_utc”:“2020-05-20T06:00:00Z”,“scheduled_arrival_time_local”:“2020-05-20T08:00:00”}}
{“target”:{“icao_address”:“780B7F”,“timestamp”:“2020-05-20T04:02:00Z”,“latitude”:55.04723,“longitude”:27.397405,“altitude_baro”:40000,“heading”:250.0,“ground_speed”:460.0,“vertical_rate”:-60,“squawk_code”:“5125”,“on_ground”:false,“callsign”:“HVN6513”,“tail_number”:“VN-A867”,“collection_type”:“terrestrial”,“icao_actype”:“B789”,“flight_number”:“VN6513”,“origin_airport_icao”:“VVNB”,“destination_airport_icao”:“EDDF”,“scheduled_departure_time_utc”:“2020-05-19T19:00:00Z”,“scheduled_departure_time_local”:“2020-05-20T02:00:00”,“scheduled_arrival_time_utc”:“2020-05-20T06:00:00Z”,“scheduled_arrival_time_local”:“2020-05-20T08:00:00”}}