# Spaces API not working

**URL:** <https://discuss.elastic.co/t/spaces-api-not-working/177930>\
**Category:** Kibana\
**Created:** [April 23, 2019, 3:50am UTC](https://discuss.elastic.co/t/spaces-api-not-working/177930 "2019-04-23T03:50:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Ensslen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steven_ensslen/32/26984_2.png) [@Steven\_Ensslen](https://discuss.elastic.co/u/Steven_Ensslen)\
**Post date:** [April 23, 2019, 3:50am UTC](https://discuss.elastic.co/t/spaces-api-not-working/177930/1 "2019-04-23T03:50:44Z")

</div>

I've just upgraded to Kibana 6.7.1 on Elastic Cloud in order to use spaces. I'm following [https://www.elastic.co/guide/en/kibana/6.7/spaces-api-post.html](https://www.elastic.co/guide/en/kibana/6.7/spaces-api-post.html)

So I run the following command:

```
POST api/spaces/space
{
  "id": "se",
  "name": "se"
} 

```

Which returns 200 and

```
{
  "_index" : "api",
  "_type" : "spaces",
  "_id" : "space",
  "_version" : 25,
  "result" : "updated",
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  },
  "_seq_no" : 24,
  "_primary_term" : 1
}

```

Which has not created a space. There's no space in `management -> Kibana -> spaces` and `GET api/spaces/space/se` returns

```
{
  "error": "no handler found for uri [/api/spaces/space/se?pretty] and method [GET]"
}

```

However a careful read of the response lead me to believe that an index named "API" had been created. Which I confirmed by running `GET /api/_search`

```
{
  "took" : 1,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : 1,
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "api",
        "_type" : "spaces",
        "_id" : "space",
        "_score" : 1.0,
        "_source" : {
          "id" : "se",
          "name" : "se"
        }
      }
    ]
  }
}

```

I've tried this with and without the leading `/` which makes no difference.

So how to I create a space?

Steven

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [April 23, 2019, 4:07am UTC](https://discuss.elastic.co/t/spaces-api-not-working/177930/2 "2019-04-23T04:07:22Z")

</div>

> [@Steven\_Ensslen](#):
>
> GET /api/\_search

@Larry_Gregory

---

<div class="post-metadata">

**Author:** ![Steven\_Ensslen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steven_ensslen/32/26984_2.png) [@Steven\_Ensslen](https://discuss.elastic.co/u/Steven_Ensslen)\
**Post date:** [April 23, 2019, 5:04am UTC](https://discuss.elastic.co/t/spaces-api-not-working/177930/3 "2019-04-23T05:04:39Z")

</div>

Right, so the problem is that I was connecting to the elasticsearch cluster at its hostname and port. This command needs be be sent to the _Kibana_ cluster. That really needs to be said in **BIG BOLD LETTERS** on every one of the [Kibana REST API pages](https://www.elastic.co/guide/en/kibana/current/api.html) given that all of the other documentation with HTTP verbs refers to Elasticsearch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 21, 2019, 5:04am UTC](https://discuss.elastic.co/t/spaces-api-not-working/177930/4 "2019-05-21T05:04:45Z")

</div>

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