curl -H "Content-Type: application/json" -XPOST 'https://mydomain/' -d @cps_index.json
Contents in ths JSON file
{
"settings": {
"mappings": {
"_source": {
"enabled": false
},
"cps": {
"properties": {
"firstName": {
"type": "text"
},
"lastname": {
"type": "text"
},
"email": {
"type": "text"
},
"mobileNumber": {
"type": "keyword"
},
"employeeId": {
"type": "keyword"
}
}
}
}
}
}
Failed with the Response Message {"error":"Incorrect HTTP method for uri [/] and method [POST], allowed: [GET, HEAD, DELETE]","status":405}