# Elastic search api call issue

**URL:** <https://discuss.elastic.co/t/elastic-search-api-call-issue/33876>\
**Category:** Elasticsearch\
**Created:** [November 5, 2015, 2:26pm UTC](https://discuss.elastic.co/t/elastic-search-api-call-issue/33876 "2015-11-05T14:26:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [November 5, 2015, 2:26pm UTC](https://discuss.elastic.co/t/elastic-search-api-call-issue/33876/1 "2015-11-05T14:26:21Z")

</div>

Authentication exception while posting json file in elastic search server. Our database is 12c and we are using utl\_http utility to post json from oracle database. The error message is as below,

{"error":"AuthenticationException[unable to authenticate user [http] for REST request [//ogrds\_chr/chr1/\_bulk]]","status":401}.

Elastic search server is authorized with usename and password and the same has been provided in the utl\_http request.

It was working fine in 11g but after 12c migration the same is not working.

sample code used for elastic search call:-  
utl\_http.begin\_request('[http://username:password@url](http://username:password@url):port/es\_chr/chr1/12450'  
,'POST'  
, 'HTTP/1.1');

Let me know any suggestions.

---

<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:** [July 5, 2017, 11:40pm UTC](https://discuss.elastic.co/t/elastic-search-api-call-issue/33876/2 "2017-07-05T23:40:19Z")

</div>


