Making api call for listing watcher with callWithInternalUser

(Pradeep) #1

How to make an api call to list watcher detail using callWithInternalUser as the logged in user
manage_watcher will be disabled.

I have tried the below logic but getting invalid api error.
i also tried calling watcher.get request even its invalid api.
Any inputs on this ?

const { callWithInternalUser } = server.plugins.elasticsearch.getCluster('admin');

  callWithInternalUser('/api/watcher/watch', {
  }).then((hit) => {
    console.log('trying to get data as internal user');

(system) closed #2

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