Following method works properly to create list view but I am not able to(don't know) add/select columns in that view, in the same REST API call.
Please Help.
$.ajax
({url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('List Name')/views",
type: "POST",
data: "{'__metadata':{'type': 'SP.View'},'ViewType': 'HTML','Title':'view name','PersonalView':false}",
headers:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function (data, status, xhr) {
console.log("Success");
},
error: function (xhr, status, error) {
console.log("Failed");
}
});