How to update Kibana Advance Settings via API request

I am trying to update the advance settings of a specific space via an API request. I am attempting to change the "metaFields" setting to include the "_size" field and would like to send the command via an API without having to open up Advance Settings. I have trying the following and it does not seem to update the setting:
"
POST kbn:/s/kibanatraining/api/kibana/settings
{
"changes": {
"metaFields": [
"_source",
"_id",
"_index",
"_score",
"_size"
]
}
}
"
Any help on what I'm doing wrong?

From where did you get this endpoint? I don't think this endpoint exists.

All the API endpoints are listed here in the documentation, I didn't find anything related to the settings.

If you haven't seen the command, that may explain why I can't get it to work.

Are there no curl commands that can change a Space's advance settings? I've locked my user's spaces down and was looking for a backend way to update this setting. I was hoping to not have to exposing all the options to my users of a Space.

Scratch that. I did some further testing and verified that the API I came up with does in fact work. I just had to run it from a Space with Admin privileges. Thanks for all your help.

Here is a GET request to verify the settings were applied successfully.
"
GET kbn:/s/spacename/api/kibana/settings
"

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