Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Descriptor

Value

HTTP Method

POST

Description

Gives the group permissions in the provided role for the specified team and all of its applications.

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

To obtain the groupId value in the endpoint, run the Get Groups - API call first. The group's id value in the response is the groupId value that you use in this endpoint.

To obtain the roleId value in the endpoint, run the Get Roles - API call first. The role's id value in the response is the roleId value that you use in this endpoint.

Required Permission

Manage Groups

Version Introduced

2.5.1.12

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

teamId

Integer

Yes

The ID of the team to assign permissions for.

roleId

Integer

Yes

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

Sample Call:

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

Sample Output:


Code Block
{
  "message": "",
  "success": true,
  "responseCode": -1,
  "object": {
    "id": 3,
    "group": {
      "id": 1,
      "name": "Staff",
      "type": "LDAP"
    },
    "organization": {
      "id": 1,
      "name": "Example Team"
    },
    "role": {
      "id": 3,
      "displayName": "Developer Role"
    },
    "accessControlApplicationMaps": null,
    "allApps": true
  }
}


Page Tree
rootUsers, Roles, and Groups API