Créer un groupe
https://api.datadoghq.com/api/v2/scim/Groupshttps://api.us3.datadoghq.com/api/v2/scim/Groupshttps://api.us5.datadoghq.com/api/v2/scim/Groupshttps://api.datadoghq.eu/api/v2/scim/Groupshttps://api.ap1.datadoghq.com/api/v2/scim/Groupshttps://api.ap2.datadoghq.com/api/v2/scim/Groupshttps://api.uk1.datadoghq.com/api/v2/scim/Groupshttps://api.ddog-gov.com/api/v2/scim/Groupshttps://api.us2.ddog-gov.com/api/v2/scim/GroupsPrésentation
Créer un nouveau groupe. Le groupe peut contenir des membres.
Requête
Body Data (required)
displayNameDéfinition d'un groupe.
externalIdAn identifier for the resource as defined by the provisioning client.
idThe identifier of the resource. Not required when creating a group.
membersMembers of the group.
$refThe URI corresponding to a SCIM resource that is a member of this group.
displayA human-readable name for the group member.
typeA label indicating the type of resource.
valueThe identifier of the member of this group.
metaMetadata associated with a group.
createdThe date and time the group was created.
lastModifiedThe date and time the group was last changed.
locationURL identifying the resource.
resourceTypeType of resource.
schemasInput 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-17 12:53:35.793883+00:00",
"lastModified": "2024-10-19 12:53:35.793883+00:00",
"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"
]
}Réponse
Created
Definition of a group.
displayNameA human-readable name for the group.
externalIdAn identifier for the resource as defined by the provisioning client.
idThe identifier of the resource. Not required when creating a group.
membersMembers of the group.
$refThe URI corresponding to a SCIM resource that is a member of this group.
displayA human-readable name for the group member.
typeA label indicating the type of resource.
valueThe identifier of the member of this group.
metaMetadata associated with a group.
createdThe date and time the group was created.
lastModifiedThe date and time the group was last changed.
locationURL identifying the resource.
resourceTypeType of resource.
schemasInput 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-17 12:53:35.793883+00:00",
"lastModified": "2024-10-19 12:53:35.793883+00:00",
"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.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Exemple de code
## default
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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## default
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"
curl -X POST "https://api.${DD_SITE}/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