Also I have another query. `{` `"query": "{ p...
# help
f
Also I have another query.
{
"query": "{ products(filter: {vendorName: \"aws\", service: \"AmazonEC2\", region: \"us-west-1\", attributeFilters: [{key: \"instanceType\", value: \"t3.medium\"}, {key: \"operatingSystem\", value: \"Windows\"}, {key: \"tenancy\", value: \"Shared\"}, {key: \"capacitystatus\", value: \"Used\"}, {key: \"preInstalledSw\", value: \"NA\"}]}) { prices(filter: {purchaseOption: \"on_demand\"}) { USD } } } "
}
For the above request body, I'm getting the following response.
Copy code
{
  "data": {
    "products": [
      {
        "prices": [
          {
            "USD": "0.0496000000"
          }
        ]
      },
      {
        "prices": [
          {
            "USD": "0.0680000000"
          }
        ]
      }
    ]
  }
}
Can you please explain why I get two objects in my response? On what basis is the price calculated in both the cases? I'm not able to find any clear documentation about the response structure.
l
@fancy-application-28950 you could try requesting all the product attributes and seeing what is different between the two products returned. This will help work out if there’s another filter you should pass in. So something like this should get them:
Copy code
{
  "query": "{ products(filter: {vendorName: \"aws\", service: \"AmazonEC2\", region: \"us-west-1\", attributeFilters: [{key: \"instanceType\", value: \"t3.medium\"}, {key: \"operatingSystem\", value: \"Windows\"}, {key: \"tenancy\", value: \"Shared\"}, {key: \"capacitystatus\", value: \"Used\"}, {key: \"preInstalledSw\", value: \"NA\"}]}) { attributes { key, value }, prices(filter: {purchaseOption: \"on_demand\"}) { USD } } } "
}