How to introduce a new api for kibana plugin?

File name : create_index_pattern_wizards.js
to fetch all the indices

Now, I want to fetch aliases
so i wrote it did not work out
so i am trying to write an api
Code as follows

i wrote create_index_pattern_wizards.js
$http.get('../api/kibana/management/aliases').then((response) => {
this.aliases =;

i have created a file management folder / index.js

export default function (server) {
const call = server.plugins.elasticsearch.getCluster('data').callWithRequest;
path: '/api/kibana/management/aliases/',
method: ['GET'],
handler: (req, reply) => {
return call(req, 'cat.aliases', { format: 'json' })
.then(responseAliases => {
return a.alias;

API is getting called but returning 404

any help please




@mikecote can we please get some help here? Thanks!

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