As we reach the end of September 2024, ThreadFix version 3.x on-premises has officially reached its End-of-Life. Therefore, there is no longer support or updates for this version of the product. We have fully transitioned our product and development teams to focus ThreadFix SaaS and migrating all customers over from the on-premises versions. Our Customer Success and Support teams are here to help you in migrating to ThreadFix SaaS and maximizing the value you see from this improved offering from Coalfire. This is the next phase of ThreadFix and our team is looking forward to continuing to support you on this journey.

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

Version 1 Next »

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


Descriptor

Value

HTTP Method

POST

Description

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

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
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 user for that application.



Sample Call:

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

Sample Output:


{
  "message": "",
  "success": true,
  "responseCode": -1,
  "object": {
    "id": 2,
    "user": {
      "id": 2,
      "name": "mfreeman",
      "displayName": "Morgan",
      "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
  }
}

The selected root page could not be found.

  • No labels