# JSON in API to Change Platform Endpoint

**URL:** https://discuss.elastic.co/t/json-in-api-to-change-platform-endpoint/215326
**Category:** Elastic Cloud Enterprise (ECE)
**Created:** [January 16, 2020, 2:15pm UTC](https://discuss.elastic.co/t/json-in-api-to-change-platform-endpoint/215326 "2020-01-16T14:15:32Z")
**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: [January 16, 2020, 2:15pm UTC](https://discuss.elastic.co/t/json-in-api-to-change-platform-endpoint/215326/1 "2020-01-16T14:15:32Z")

</div>

I'm using the configuration store API to change the platform endpoint and having trouble getting the JSON formatting right. This is the JSON example from the docs.  
{  
"value" : "string"  
}

When I use the API to list the config store it looks like this.  
{  
"values": [{  
"changed": false,  
"name": "https\_port",  
"value": "9243"  
}, {  
"changed": true,  
"name": "cname",  
"value": "prod2"  
}]  
}

I've tried a combination of values[1].value with no success.

---

<div class="post-metadata">

### Author: ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)
#### Post date: [January 16, 2020, 2:42pm UTC](https://discuss.elastic.co/t/json-in-api-to-change-platform-endpoint/215326/2 "2020-01-16T14:42:29Z")

</div>

Assuming you're trying to change the parameter `cname`, does the following work?

`curl -XPOST -k -u admin:PASS 'https://HOST:12443/api/v1/platform/configuration/store/cname' -d '{ "value": "NEW_VAL" }'`

([docs](https://www.elastic.co/guide/en/cloud-enterprise/current/Platform_-_configuration_-_Store.html))

If not how does it fail?

---

<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: [January 16, 2020, 5:36pm UTC](https://discuss.elastic.co/t/json-in-api-to-change-platform-endpoint/215326/3 "2020-01-16T17:36:45Z")

</div>

Yeah I wanted to change cname. After messing with it a bit more I got it to work. 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 30, 2020, 5:36pm UTC](https://discuss.elastic.co/t/json-in-api-to-change-platform-endpoint/215326/4 "2020-01-30T17:36:50Z")

</div>

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