# Error in creating kibana index pattern through script

**URL:** <https://discuss.elastic.co/t/error-in-creating-kibana-index-pattern-through-script/147141>\
**Category:** Elasticsearch\
**Created:** [September 4, 2018, 5:40am UTC](https://discuss.elastic.co/t/error-in-creating-kibana-index-pattern-through-script/147141 "2018-09-04T05:40:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamleshjoshi](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@kamleshjoshi](https://discuss.elastic.co/u/kamleshjoshi)\
**Post date:** [September 4, 2018, 5:40am UTC](https://discuss.elastic.co/t/error-in-creating-kibana-index-pattern-through-script/147141/1 "2018-09-04T05:40:55Z")

</div>

Hi,  
I am trying to create Kibana index pattern through python script. I am getting following error:

{u'status': 400, u'error': {u'root\_cause': [{u'reason': u'mapping set to strict, dynamic introduction of [title] within [doc] is not allowed', u'type': u'strict\_dynamic\_mapping\_exception'}], u'type': u'strict\_dynamic\_mapping\_exception', u'reason': u'mapping set to strict, dynamic introduction of [title] within [doc] is not allowed'}}

url to create index is : [http://localhost:9200/.kibana/doc/index-pattern:cloudtrail-logs](http://localhost:9200/.kibana/doc/index-pattern:cloudtrail-logs)

elasticsearch mapping json is:

{  
"cloudtrail-logs":{  
"mappings": {  
"cloudtrail-logs": {  
"dynamic" : true,  
"properties": {  
"eventVersion": {  
"type": "keyword"  
},  
"userIdentity": {  
"dynamic":true,  
"properties": {  
"type": {  
"type": "keyword"  
},  
"principalId": {  
"type": "keyword"  
},  
"arn": {  
"type": "keyword",  
"index": true  
},  
"accountId": {  
"type": "keyword"  
},  
"accessKeyId": {  
"type": "keyword"  
},  
"sessionContext": {  
"dynamic":true,  
"properties": {  
"attributes": {  
"dynamic":true,  
"properties": {  
"mfaAuthenticated": {  
"type": "keyword"  
},  
"creationDate": {  
"type": "date"  
}  
}  
}  
}  
},  
"sessionIssuer": {  
"dynamic":true,  
"properties": {  
"type": {  
"type": "keyword"  
},  
"principalId": {  
"type": "keyword"  
},  
"arn": {  
"type": "keyword",  
"index": true  
},  
"accountId": {  
"type": "keyword"  
},  
"username": {  
"type": "keyword",  
"index": true  
}  
}  
}  
}  
},  
"eventTime": {  
"type": "keyword"  
},  
"eventSource": {  
"type": "keyword"  
},  
"eventName": {  
"type": "keyword"  
},  
"awsRegion": {  
"type": "keyword",  
"index": true  
},  
"sourceIPAddress": {  
"type": "keyword"  
},  
"userAgent": {  
"type": "keyword",  
"index": true  
},  
"requestParameters":{  
"dynamic":true,  
"properties": {  
"serviceId":{  
"type": "keyword"  
}  
}  
},  
"eventType": {  
"type": "keyword"  
},  
"recipientAccountId": {  
"type": "keyword"  
}  
}  
}  
}  
}  
}

Please help me in resolving this issue.

Regards,  
Kamlesh

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [September 4, 2018, 7:34am UTC](https://discuss.elastic.co/t/error-in-creating-kibana-index-pattern-through-script/147141/2 "2018-09-04T07:34:32Z")

</div>

in es 6 type is not allow as i know.

---

<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:** [October 2, 2018, 7:34am UTC](https://discuss.elastic.co/t/error-in-creating-kibana-index-pattern-through-script/147141/3 "2018-10-02T07:34:36Z")

</div>

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