Skip to main content

Add a Group

POST 

/api/v32.04/groups

x-prisma-cloud-target-env: {"permission":"userManagement","saas":false,"self-hosted":true}
x-public: true

Creates a group with users.

To invoke this endpoint in the Console UI:

  1. Navigate to Manage > Authentication > Groups.
  2. Add a collection using + Add group.
  3. Enter a group name and add at least one user.
  4. Click the Save button.

cURL Request

Refer to the following example cURL command that creates a new group named my-group:

$ curl -k \
-X POST \
-u <USER> \
-H 'Content-Type: application/json' \
-d \
'{
"groupName": "my-group",
"user": [
{"username": "john"},
{"username": "jane"}
]
}' \
'https://<CONSOLE>/api/v<VERSION>/groups'

This group includes the users associated with the usernames john and jane.

Note: You must use usernames that already exist in the system.

No response will be returned upon successful execution.

Request

Body

    _id string

    Group name.

    groupId string

    Group identifier in the Azure SAML identification process.

    groupName string

    Group name.

    lastModified date-time

    Datetime when the group was created or last modified.

    ldapGroup boolean

    Indicates if the group is an LDAP group (true) or not (false).

    oauthGroup boolean

    Indicates if the group is an OAuth group (true) or not (false).

    oidcGroup boolean

    Indicates if the group is an OpenID Connect group (true) or not (false).

    owner string

    User who created or modified the group.

    permissions object[]

    Permissions is a list of permissions

  • Array [
  • collections string (string)[]

    List of collections the user can access.

    project string

    Names of projects which the user can access.

  • ]
  • role string

    Role of the group.

    samlGroup boolean

    Indicates if the group is a SAML group (true) or not (false).

    user object[]

    Users in the group.

  • Array [
  • username string

    Name of a user.

  • ]

Responses

OK

Loading...