UpdateGroup

This method can be used for the following functionality: Update an existing group.

Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

Headers

PUT /api/ss/group/:id HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close

Query

id (string)

Id of the group.

Example:

PUT /api/ss/group/5eab99471e18050942c7607a HTTP/1.1

name (string) (optional)

Name of the group.

Example:

{
   "name": "..."
}

group_owner (string) (optional)

Name of the owner for the group.

Example:

{
   "group_owner": "..."
}

primary_contact_name (string) (optional)

Primary contact person name.

Example:

{
   "primary_contact_name": "..."
}

primary_contact_number (string) (optional)

Primary contact person number.

Example:

{
   "primary_contact_number": "..."
}

primary_contact_email (string) (optional)

Primary contact person email.

Example:

{
   "primary_contact_email": "..."
}

is_deleted (boolean) (optional)

Whether group is deleted or not.

Example:

{
   "is_deleted": false
}

custom_fields (array of objects) (optional)

Custom fields. Must include a key and value. Key must be unique and letters, number and underscores only.

For more information visit https://support.attackforge.com/attackforge-enterprise/getting-started/custom-fields-and-forms#using-custom-fields-with-apis

Example:

{   
    "custom_fields": [
        {
            "key": "...",
            "value": "..."
        }
    ]
}

access (object) (optional)

Access details.

  • sso_1.action - must be either upsert or remove

  • sso_1.project_access_level - must be either none, view, upload or edit

  • sso_1.project_request_access_level - must be either none, view, upload or edit

  • member_admins.action - must be either upsert or remove

  • member_admins.user_id - specify either user_id or group_id but not both

  • member_admins.group_id - specify either group_id or user_id but not both

  • member_admins.project_limit - must be either none, view, upload or edit

  • member_admins.project_request_limit - must be either none, view, edit or action

  • member_admins.add_user_method - must be either list or email

Example:

{
    "access": {
        "sso_1": [
            {
                "action": "upsert",
                "group_name": "AD-GROUP-2",
                "project_access_level": "view",
                "project_request_access_level": "edit"
            },
            {
                "action": "remove",
                "group_name": "AD-GROUP-1"
            }
        ],
        "member_admins": [
            {
                "action": "upsert",
                "user_id": "66d2308ba99324532079e111",
                "project_limit": "edit",
                "project_request_limit": "action",
                "add_user_method": "email",
                "allow_user_invite": true
            },
            {
                "action": "remove",
                "user_id": "668ba6b1be6510000f78f79e"
            }
        ]
    }
}

auto_add_project_request (boolean)

Project requests created by group members will be automatically added to the group. Access to the project request can be configured for each group member in the members section.

Example:

{
   "auto_add_project_request": true
}

enable_project_team_notification (boolean)

Group members will receive team notifications configured on a Project.

Example:

{
   "enable_project_team_notification": true
}

Example

The following example is a cURL request to update a group.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.

curl -X PUT 'https://demo.attackforge.com/api/ss/group/5eab99471e18050942c7607a' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "name": "ACME Corp. Technology Team",
  "group_owner": "John Citizen",
  "primary_contact_name": "Paul Citizen",
  "primary_contact_number": "(555)555-5555",
  "primary_contact_email": "[email protected]",
  "custom_fields": [
    {
      "key": "client_code",
      "value": "CLIENT001"
    }
  ],
  "access": {
    "member_admins": [
      {
        "action": "upsert",
        "add_user_method": "email",
        "allow_user_invite": true,
        "project_limit": "view",
        "project_request_limit": "none",
        "user_id": "66d2308ba99324532079e111"
      },
      {
        "action": "remove",
        "user_id": "668ba6b1be6510000f78f79e"
      }
    ],
    "sso_1": [
      {
        "action": "upsert",
        "group_name": "AD-GROUP-2",
        "project_access_level": "view",
        "project_request_access_level": "edit"
      },
      {
        "action": "remove",
        "group_name": "AD-GROUP-1"
      }
    ],
    "sso_2": []
  },
  "auto_add_project_request": true,
  "enable_project_team_notifications": true
}'

Response

Response contains a status.

{
  "status": "ok"
}

Last updated