I have a class called Project for which I create a Parse.Role for read/write permissions.
Here's how I create my Role:
var roleName = "hasSound_" + ident;
var projectRole = new Parse.Role(roleName, new Parse.ACL());
projectRole.getUsers().add(creator);
return projectRole.save().then(function(role) {
var acl = new Parse.ACL();
acl.setReadAccess(role, true); //give read access to Role
acl.setWriteAccess(role, true); //give write access to Role
project.setACL(acl);
project.save();
});
And here's the bad request I'm getting when trying to create the Parse.Role:
Mar 04 14:39:32 ancient-lake-41070 heroku/router: at=info method=POST path="/parse/classes/_Role" host=ancient-lake-41070.herokuapp.com request_id=82af3849-842a-406f-8a4b-5f573e08a1e1 fwd="54.145.36.110" dyno=web.1 connect=0ms service=6ms status=400 bytes=578