Create group

POST https://api.ap1.datadoghq.com/api/v2/scim/Groupshttps://api.ap2.datadoghq.com/api/v2/scim/Groupshttps://api.datadoghq.eu/api/v2/scim/Groupshttps://api.ddog-gov.com/api/v2/scim/Groupshttps://api.us2.ddog-gov.com/api/v2/scim/Groupshttps://api.datadoghq.com/api/v2/scim/Groupshttps://api.us3.datadoghq.com/api/v2/scim/Groupshttps://api.us5.datadoghq.com/api/v2/scim/Groups

Overview

Create a new group. The group may contain members. This endpoint requires all of the following permissions:

  • user_access_invite
  • user_access_manage

  • Request

    Body Data (required)

    Expand All

    Field

    Type

    Description

    displayName

    string

    A human-readable name for the group.

    externalId

    string

    An identifier for the resource as defined by the provisioning client.

    id

    string

    The identifier of the resource. Not required when creating a group.

    members

    [object]

    Members of the group.

    $ref

    string

    The URI corresponding to a SCIM resource that is a member of this group.

    display

    string

    A human-readable name for the group member.

    type

    string

    A label indicating the type of resource.

    value

    string

    The identifier of the member of this group.

    meta

    object

    Metadata associated with a group.

    created

    date-time

    The date and time the group was created.

    lastModified

    date-time

    The date and time the group was last changed.

    location

    string

    URL identifying the resource.

    resourceType

    string

    Type of resource.

    schemas

    [string]

    Input JSON Schemas.

    {
      "displayName": "string",
      "externalId": "string",
      "id": "string",
      "members": [
        {
          "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
          "display": "John Doe",
          "type": "User",
          "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6"
        }
      ],
      "meta": {
        "created": "2024-10-17T12:53:35.793Z",
        "lastModified": "2024-10-19T12:53:35.793Z",
        "location": "https://app.datadoghq.com/api/scim/v2/Groups/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
        "resourceType": "Group"
      },
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
      ]
    }

    Response

    Created

    Definition of a group.

    Expand All

    Field

    Type

    Description

    displayName

    string

    A human-readable name for the group.

    externalId

    string

    An identifier for the resource as defined by the provisioning client.

    id

    string

    The identifier of the resource. Not required when creating a group.

    members

    [object]

    Members of the group.

    $ref

    string

    The URI corresponding to a SCIM resource that is a member of this group.

    display

    string

    A human-readable name for the group member.

    type

    string

    A label indicating the type of resource.

    value

    string

    The identifier of the member of this group.

    meta

    object

    Metadata associated with a group.

    created

    date-time

    The date and time the group was created.

    lastModified

    date-time

    The date and time the group was last changed.

    location

    string

    URL identifying the resource.

    resourceType

    string

    Type of resource.

    schemas

    [string]

    Input JSON Schemas.

    {
      "displayName": "string",
      "externalId": "string",
      "id": "string",
      "members": [
        {
          "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
          "display": "John Doe",
          "type": "User",
          "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6"
        }
      ],
      "meta": {
        "created": "2024-10-17T12:53:35.793Z",
        "lastModified": "2024-10-19T12:53:35.793Z",
        "location": "https://app.datadoghq.com/api/scim/v2/Groups/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
        "resourceType": "Group"
      },
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
      ]
    }

    Bad Request

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Too many requests

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Code Example

                      ## default
    # 
    
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scim/Groups" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ -d @- << EOF { "displayName": "Group 1", "externalId": "group1", "members": [ { "$ref": "https://app.datadoghq.com/api/scim/v2/Users/d34a5f93-5690-4d3f-a293-f2ad5c7a82a4", "display": "John Doe", "type": "User", "value": "d34a5f93-5690-4d3f-a293-f2ad5c7a82a4" }, { "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6", "display": "Jane Doe", "type": "User", "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6" } ], "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ] } EOF
    ## json-request-body #
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scim/Groups" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ -d @- << EOF { "displayName": "Group 1", "externalId": "group1", "members": [ { "$ref": "https://app.datadoghq.com/api/scim/v2/Users/d34a5f93-5690-4d3f-a293-f2ad5c7a82a4", "display": "John Doe", "type": "User", "value": "d34a5f93-5690-4d3f-a293-f2ad5c7a82a4" }, { "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6", "display": "Jane Doe", "type": "User", "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6" } ], "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ] } EOF