Making api call for listing watcher with callWithInternalUser

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', {
    id: request.params.id,
  }).then((hit) => {
    console.log('trying to get data as internal user');
    console.log(hit);
  });

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