Kibana spaces not able to create using api

Hello,

I am new to Kibana, I want to create spaces from web application.

I am able to get all spaces define in Kibana. But once I try to post it’s give me error.

Remote server not found 400 bad request. I am using the same web request to get it working fine. Once try to post it give me exception.

I am using proper username and password as define in Kibana.yml file.

Can anyone help me where I am doing mistake.

@Masood_Azam, what does your API call look like, the one giving you the 400?

Hello Mike,
Thanks for reply, I am create a web application using mvc .net.

I am using http web request to call the kibana rest api.

As i mention, once i called using http web request with method GET i get all the spaces define in Kibana.
GET /api/spaces/space/marketing

but once in try to POST i get exception!
POST /api/spaces/space

@Masood_Azam It's more helpful to post actual code vs a photo of code.

It's still not clear what you are trying to post (adding a user to space?), but the Kibana Spaces APi docs walk through all your options.

If you are trying to create a space, you must pass an id and name like:

curl -X POST "localhost:5601/api/spaces/space"
{
  "id": "awesome-space",
  "name": "Awesome Space"
}

If you're trying to setup permissions for spaces, you want the Kibana role management API

Hello Mike,

I want to create new space in Kibana.

Looks reasonable: if you write out the value of PostJson does it look like:

{
  "id": "TestSpace",
  "name": "TestSpace",
  "description": "TestSpace"
}

without any other values? ...not sure what OrganizationRootObject would output

Hello Mike,
I also try to make Post Json like this "{"id": "TestSpace"}"; or "{id:TestSpace}"; it still give me same result :frowning:

Hello Mike,

Its ok, working now there is issue in disabledFeature :frowning:

As before, you need to share the specific calls you're making to the API. Can you share the request body containing the disabledFeatures array? Are you sure the IDs are valid, having come from the features API?

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