# API Search for Assets

**URL:** <https://discuss.rapid7.com/t/api-search-for-assets/6064>\
**Category:** API\
**Created:** [July 27, 2021, 4:47pm UTC](https://discuss.rapid7.com/t/api-search-for-assets/6064 "2021-07-27T16:47:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nate.whistler\_nate.whistler](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nate.whistler\_nate.whistler](https://discuss.rapid7.com/u/nate.whistler_nate.whistler)\
**Post date:** [July 27, 2021, 4:47pm UTC](https://discuss.rapid7.com/t/api-search-for-assets/6064/1 "2021-07-27T16:47:03Z")

</div>

I am trying to do a basic search for assets with the API using postman and keep getting error 406. I know I am missing something in the headers but not sure what. Can anyone help?

![Screen_Shot_2021-07-27_at_9_39_11_AM](https://forum-uploads-hub-prod-1-us-east-1-rapid7-com.s3.dualstack.us-east-1.amazonaws.com/original/1X/906a91dfa32ccd2d49eb98b83960d5c113cd5aff.png)

---

<div class="post-metadata">

**Author:** ![nate.whistler\_nate.whistler](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nate.whistler\_nate.whistler](https://discuss.rapid7.com/u/nate.whistler_nate.whistler)\
**Post date:** [July 27, 2021, 4:48pm UTC](https://discuss.rapid7.com/t/api-search-for-assets/6064/2 "2021-07-27T16:48:13Z")

</div>

I’ve tried with `Accept: Application/JSON` as well and doesn’t work.

---

<div class="post-metadata">

**Author:** ![brandon\_mcclure](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/brandon_mcclure/32/182_2.png) [@brandon\_mcclure](https://discuss.rapid7.com/u/brandon_mcclure)\
**Post date:** [July 27, 2021, 4:54pm UTC](https://discuss.rapid7.com/t/api-search-for-assets/6064/3 "2021-07-27T16:54:41Z")

</div>

what does the body of your POST look like?  
Here is an example

```auto
{
    "match": "all",
    "filters": [
                    {
                        "field": "operating-system",
                        "operator": "contains",
                        "value": "windows"
                    },
                    {
                        "field": "service-name",
                        "operator": "contains",
                        "value": "httpd"
                    }
                ]
}

```

---

<div class="post-metadata">

**Author:** ![nate.whistler\_nate.whistler](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nate.whistler\_nate.whistler](https://discuss.rapid7.com/u/nate.whistler_nate.whistler)\
**Post date:** [July 27, 2021, 5:01pm UTC](https://discuss.rapid7.com/t/api-search-for-assets/6064/4 "2021-07-27T17:01:03Z")

</div>

I was just using the example to start:

```auto
{
  "match": "all",
  "filters": [
     { "field": "operating-system", "operator": "contains", "value": "Microsoft Windows 10" }
  ]
}

```

I tried yours above and still get the 406 error.

---

<div class="post-metadata">

**Author:** ![nate.whistler\_nate.whistler](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nate.whistler\_nate.whistler](https://discuss.rapid7.com/u/nate.whistler_nate.whistler)\
**Post date:** [July 27, 2021, 5:24pm UTC](https://discuss.rapid7.com/t/api-search-for-assets/6064/5 "2021-07-27T17:24:03Z")

</div>

Interesting. Turns out I had a pending update for Postman and now I am Version 8.9.1 on Mac and it’s working…
