# Role API Usage ECE 2.4.3

**URL:** <https://discuss.elastic.co/t/role-api-usage-ece-2-4-3/213230>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 27, 2019, 9:08pm UTC](https://discuss.elastic.co/t/role-api-usage-ece-2-4-3/213230 "2019-12-27T21:08:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![balogan](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@balogan](https://discuss.elastic.co/u/balogan)\
**Post date:** [December 27, 2019, 9:08pm UTC](https://discuss.elastic.co/t/role-api-usage-ece-2-4-3/213230/1 "2019-12-27T21:08:37Z")

</div>

I'm having trouble using the API examples for ECE when viewing/creating roles found in this link [https://www.elastic.co/guide/en/elasticsearch/reference/7.5/security-api-get-role.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/security-api-get-role.html)

To display all roles this should be all I need to use according to the last example in the link above, but the error below is all I can get to return.

# curl -X GET "[http://127.0.0.1:9200/\_security/role](http://127.0.0.1:9200/_security/role)"

{"ok":false,"message":"Unknown deployment."}

I've tried experimenting putting the endpoint in the command in different places with no luck.

ECE 2.4.3  
Elasticsearch: 7.5.0

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [December 29, 2019, 11:49pm UTC](https://discuss.elastic.co/t/role-api-usage-ece-2-4-3/213230/2 "2019-12-29T23:49:31Z")

</div>

You need to connect to the ECE managed endpoint for your cluster.

That endpoint will have a UUID deployment ID at the beginning, and whatever custom domain you are using for ECE.

You can get that URL from the ECE console.

Then you want something in the form of:

```auto
curl -X GET -u elastic "https://abc0101a222a11bb0c22200abcabc111.ece.example.com:9200/_security/role"

```

---

<div class="post-metadata">

**Author:** ![balogan](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@balogan](https://discuss.elastic.co/u/balogan)\
**Post date:** [December 30, 2019, 8:22pm UTC](https://discuss.elastic.co/t/role-api-usage-ece-2-4-3/213230/3 "2019-12-30T20:22:51Z")

</div>

That's what I needed thanks.

---

<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:** [January 27, 2020, 8:31pm UTC](https://discuss.elastic.co/t/role-api-usage-ece-2-4-3/213230/4 "2020-01-27T20:31:35Z")

</div>

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