# Curl argument list too long

**URL:** <https://discuss.elastic.co/t/curl-argument-list-too-long/259407>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [December 22, 2020, 4:13pm UTC](https://discuss.elastic.co/t/curl-argument-list-too-long/259407 "2020-12-22T16:13:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pankaj\_Jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_jadhav/32/65896_2.png) [@Pankaj\_Jadhav](https://discuss.elastic.co/u/Pankaj_Jadhav)\
**Post date:** [December 22, 2020, 4:13pm UTC](https://discuss.elastic.co/t/curl-argument-list-too-long/259407/1 "2020-12-22T16:13:43Z")

</div>

mapping=(\</index\_automation/{product}/mapping/Mapping/"$tempmappingfile")

settings=(\</index\_automation/{product}/mapping/Mapping/"$tempsettingsfile")

dataraw="{{mapping},{settings}}"

creds=$(\</index\_automation/obj/creds.txt)

reindexfile="/index\_automation/${product}/mapping/Mapping/reindex.txt"

IFS=", " read -r -a credArr \<\<\< "$creds"

result=(curl --silent -u {credArr[0]}:{credArr[1]} -X PUT "{credArr[2]}/${indexname}/"   
--header "Content-Type: application/json"   
--data-raw "$dataraw")

In above codebase am reading mapping and settings for new index creation. for --data-raw "$dataraw") am getting curl argument list too long error. can anyone help me.

---

<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 19, 2021, 4:13pm UTC](https://discuss.elastic.co/t/curl-argument-list-too-long/259407/2 "2021-01-19T16:13:59Z")

</div>

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