Release Automation

Expand all | Collapse all

PATCH /api/{versionId}/users-groups/permissions only returns result:false

  • 1.  PATCH /api/{versionId}/users-groups/permissions only returns result:false

    Posted 07-23-2019 05:08 AM
    I'm trying to bulk update permissions in RA After adding 7 new environments to every application.

    I send this data:

    {
    "applicationPermissions": [
    {
    "canApproveReleasesInAllEnvironments": false,
    "canExecuteProcessesInAllEnvironments": false,
    "canExecuteReleasesInAllEnvironments": false,
    "canView": true,
    "canViewExecutionComponents": true,
    "deploymentPlanDesigner": true,
    "description": "Updated with RA Permissions Utility",
    "designViewer": true,
    "designer": true,
    "environmentPermissions": [
    {
    "admin": false,
    "canApproveAllReleases": true,
    "canExecuteAllProcesses": true,
    "canExecuteAllReleases": true,
    "description": "Updated with RA Permissions Utility",
    "id": 7071,
    "name": "EARTH",
    "processesCanExecute": [
    {
    }
    ],
    "releaseDesigner": true,
    "templateCategoriesCanDeploy": [
    ]
    }
    ],
    "id": 1008,
    "name": "TestApplication1",
    "owner": false,
    "publisher": false,
    "releasesTemplateDesigner": true
    }
    ],
    "groupIds": [
    24
    ]
    }

    and the reply i get it:

    {
    "result": false,
    "description": ""
    }

    which suggests to me that everything i am sending is right, but RA still doesnt make any changes. The user i am using is a superuser in RA so i can't see how that could be any issue.

    We are currently running Version 6.5.0.10153


  • 2.  RE: PATCH /api/{versionId}/users-groups/permissions only returns result:false

    Posted 07-23-2019 07:59 AM
    Hi Jacob,
     I try validating in the lab instance running version 6.5.0.1000 and I am able to see the permissions are getting correctly setup. The request body I used is below.
    {
    "applicationPermissions": [
    {
    "canApproveReleasesInAllEnvironments": true,
    "canExecuteProcessesInAllEnvironments": true,
    "canExecuteReleasesInAllEnvironments": true,
    "canView": true,
    "canViewExecutionComponents": true,
    "deploymentPlanDesigner": true,
    "description": "string",
    "designViewer": true,
    "designer": true,
    "environmentPermissions": [
    {
    "admin": false,
    "canApproveAllReleases": true,
    "canExecuteAllProcesses": true,
    "canExecuteAllReleases": true,
    "description": "Updated via Rest",
    "id": 3,
    "name": "ENV2",
    "processesCanExecute": [
    ],
    "releaseDesigner": true,
    "templateCategoriesCanDeploy": [
    ]
    }
    ],
    "id": 3,
    "name": "TEST",
    "owner": false,
    "publisher": false,
    "releasesTemplateDesigner": true
    }
    ],
    "groupIds": [
    1
    ]
    }

    Can you please confirm on some information below
    1: What is the HTTP METHOD you are using? (The HTTP method is PATCH for this API)
    2: What type of client you are using?
    3: I noticed that the request take some long time by any chance is there any timeout occurring.
    4: If possible can you please share with us the request headers of your request?
    5: What is the REST URL you  used? In lab instance it is like http://NAC-IP:PORT/datamanagement/a/api/v4/users-groups/permissions

    Regards,
    Saurabh


    ------------------------------
    Regards,
    Saurabh
    ------------------------------



  • 3.  RE: PATCH /api/{versionId}/users-groups/permissions only returns result:false

    Posted 07-23-2019 08:18 AM
    Edited by Jacob Holding 07-23-2019 08:20 AM
    Hi Saurabh,

    1. Definitely using PATCH
    2. I have tried in C# code, Postman and in the Swagger interface
    3. as above i have tried through a few different methods so i suspect not
    4. Request Headers are just authentication which is just the basic base 64 encoded username:password pair
    5.REST URL is : /a/api/v4/users-groups/{group}/permissions where group is the group id i a trying to set (in this case 24)

    hope this helps, its strange as we do get a response from the api its just the result is false and nothing changes