# Apply filter from custom plugin onto dashboard is not working in 7.9.3

**URL:** <https://discuss.elastic.co/t/apply-filter-from-custom-plugin-onto-dashboard-is-not-working-in-7-9-3/257979>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [December 8, 2020, 11:26am UTC](https://discuss.elastic.co/t/apply-filter-from-custom-plugin-onto-dashboard-is-not-working-in-7-9-3/257979 "2020-12-08T11:26:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrt.krishna](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@nrt.krishna](https://discuss.elastic.co/u/nrt.krishna)\
**Post date:** [December 8, 2020, 11:26am UTC](https://discuss.elastic.co/t/apply-filter-from-custom-plugin-onto-dashboard-is-not-working-in-7-9-3/257979/1 "2020-12-08T11:26:32Z")

</div>

Hi,

I am trying to apply filter from custom plugin on to dashboard. It used to work with belowcode snippet with old version. Now I am migrating my plugin to 7.9.3. As soon as I apply filter using below code the filter is disabled and it is triggering "\_bulk\_get" api on saved\_objects and it is giving me this error :

```auto
     http://localhost:5601/api/saved_objects/_bulk_get
        error: "Bad Request"
        message: "[request body.0.id]: expected value of type [string] but got [Object]"
        statusCode: 400 

```

I am applying filter using below code:

```auto
    filterManager.addFilters([
          {
            terms: {
              ids: ["ABC", "DEF"],
            },
            meta: {
              index: "my-index-id",
              disabled: false,
              type: 'custom',
              key: 'custom',
              value: ["ABC", "DEF"],
              negate: false,
              alias: "my-custom-label",
            }
          },
        ]);

```

I am wondering if this is the correct way of applying filters. Could somebody help?

Thanks,  
Krishna.

---

<div class="post-metadata">

**Author:** ![afharo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/afharo/32/75202_2.png) [@afharo](https://discuss.elastic.co/u/afharo)\
**Post date:** [December 22, 2020, 3:04pm UTC](https://discuss.elastic.co/t/apply-filter-from-custom-plugin-onto-dashboard-is-not-working-in-7-9-3/257979/2 "2020-12-22T15:04:57Z")

</div>

Hi @nrt.krishna,

Do you mind providing the request's body that is sent to `/api/saved_objects/_bulk_get`?

Thank you!

---

<div class="post-metadata">

**Author:** ![nrt.krishna](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@nrt.krishna](https://discuss.elastic.co/u/nrt.krishna)\
**Post date:** [January 3, 2021, 8:10am UTC](https://discuss.elastic.co/t/apply-filter-from-custom-plugin-onto-dashboard-is-not-working-in-7-9-3/257979/3 "2021-01-03T08:10:27Z")

</div>

@afharo Sorry for the late reply. I actually solved it by removing index from meta

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 31, 2021, 8:11am UTC](https://discuss.elastic.co/t/apply-filter-from-custom-plugin-onto-dashboard-is-not-working-in-7-9-3/257979/4 "2021-01-31T08:11:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
