As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

/rest/{version}/users/{userId}/role/team


Descriptor

Value

HTTP Method

POST

Description

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

These permissions will add onto any other permissions the user has from their global role, attached groups, and other team/app permissions.

Required Permission

Manage Users

Version Introduced2.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 user for that team.



Sample Call:

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

Sample Output:


{
  "message": "",
  "success": true,
  "responseCode": -1,
  "object": {
    "id": 1,
    "user": {
      "id": 2,
      "name": "mfreeman",
      "displayName": "Morgan",
      "type": "LOCAL"
    },
    "organization": {
      "id": 1,
      "name": "Example Team"
    },
    "role": {
      "id": 3,
      "displayName": "Developer Role"
    },
    "accessControlApplicationMaps": null,
    "allApps": true
  }
}

  • No labels