javascriptnode.jspermissionsrallywsapi

rally wsapi workspacepermission 500 error


My unit tests that were passing a couple weeks ago are now failing. The unit tests are now failing when they try to create a workspacepermission. I am using the same api-key, which has subscription-level access, so authorization is not a problem. Here is what WSAPI is returning when i try to create the workspacepermission:enter image description here Also, I am using rally-node v0.2.0, and here is my code that is failing:

rally_util.setWorkspacePermission = function(personRef, permission){
    var deferred = Q.defer();
    restApi.create({
        type: 'workspacepermission',
        limit: Infinity,
        data: { Workspace: workspaceRef, User:personRef, Role:permission },
        scope: { workspace: workspaceRef },
    }, function(error, result) {
        if(error) deferred.reject(error);
        else deferred.resolve();
    });
    return deferred.promise;    
};

Again, i think the permissions model in Rally changed recently or something because my tests haven't changed.


Solution

  • I tested in a browser rest client with the same result. This endpoint:

    /slm/webservice/v2.0/workspacepermission/create
    

    with a payload:

    {"WorkspacePermission":{
    "Workspace":"/workspace/1234",
    "Role":"User",
    "User":"/user/777"
    }}
    

    returns error 500. I submitted a defect.