$.ajax({
url:hostUrl + "data-" + mapWorkspace + "/rest/data/datasources/name/"+ editDataSource + "/datasets/name/"+ mapName + "_region/fields.rjson",
type:"post",
async:false,
data : {
"isZeroLengthAllowed": "false",
"maxLength": "255",
"isRequired": "false",
"name": "DEVICEID",
"caption": "DEVICEID",
"type": "text",
"defaultValue": "null",
"isSystemField": "false"
},
dataType:"json",
success:function(data){
console.log(data);
/*{
"newResourceID": "value",
"newResourceLocation": "http://supermapiserver:8090/iserver/services/data-world/rest/data/datasources/name/World/datasets/name/RestCreate/fields/value.rjson",
"succeed": true
}*/
}
});