Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Version published after converting to the new editor

/rest/{version}/groups/{groupId}/role/app


Descriptor

Value

HTTP Method

POST

Description

Gives the group permissions in the provided role for the specified application.

These permissions will add onto any other permissions the group's users have from their global role, attached groups, and other team/app permissions.

Required Permission

Manage Groups

Version Introduced2.5.1.12
Changes in 2.7.5Added "testEnvironment", "releaseFrequency", "isInternal", and "policyStatuses" to the REST call response.


Request Header Parameters

Parameter

Value

Required

Description

Accept

String

Yes

A value of ‘application/json’ must be provided.


Request POST Data Parameters

Parameter

Value

Required

Description

appId

Integer

Yes

The ID of the application to assign permissions for.

roleId

Integer

Yes

The ID of the role to give the group for that application.


Sample Call:

Code Block
themeEclipse
curl -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" --data "appId=1&roleId=3" https://localhost:8443/threadfix/rest/latest/groups/1/role/app 

Sample Output:


Code Block
themeEclipse
{
  "message": "",
  "success": true,
  "responseCode": -1,
  "object": {
    "id": 1,
    "group": {
      "id": 1,
      "name": "Staff",
      "type": "LOCAL"
    },
    "organization": {
      "id": 1,
      "name": "Example Team"
    },
    "role": null,
    "accessControlApplicationMaps": [
      {
        "id": 1,
        "application": {
          "id": 1,
          "name": "Example App",
          "url": null,
          "applicationCriticality": {
            "id": 2,
            "name": "Medium"
          }
        },
		"policyStatuses": [],
        "description": null,
        "releaseFrequency": "UNKNOWN",
        "testEnvironment": null,
        "isInternal": false
        "role": {
          "id": 3,
          "displayName": "Developer Role"
        }
      }
    ],
    "allApps": false
  }
}


Page Tree
rootUsers, Roles, and Groups API