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.

Create Group - API

/rest/{version}/groups/new

Descriptor

Value

Descriptor

Value

HTTP Method

POST

Description

Adds group to system.

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.

Required Permission

Manage Groups

Version Introduced

2.6.2


Request Header Parameters

Parameter

Value

Required

Description

Parameter

Value

Required

Description

Accept

String

Yes

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

Request POST Data Parameters

Parameter

Value

Required

Description

Parameter

Value

Required

Description

name

String

Yes

Adds name of the group. Maximum 255 characters.

activeDirectoryId

String

Possibly

Required when adding an LDAP group.

globalRoleId

String

No

Adds group's global role. Possible values are 0 for Read Access, -1 for No Global Access, Role ids. Assigns role to group upon creation. By default assigns Role configured in System settings.

Sample Call:

curl -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" -X POST --data 'name=accounting&activeDirectoryId=2&global RoleId=1' http://localhost:8080/threadfix/rest/latest/groups/new

Sample Output:

{ "message": "", "success": true, "responseCode": -1, "object": { "id": 88, "globalRole": { "id": 1, "displayName": "Administrator" }, "hasGlobalAccess": true, "ldapGroup": true, "name": "accounting", "activeDirectory": { "id": 2, "name": "Spencer Davis Group" }, "displayName": "accounting (LDAP - Spencer Davis Group)" } }

 

www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.

This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.