## default
#
# Path parameters
export group_id="CHANGE_ME"
# Curl command
curl -X PATCH "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.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scim/Groups/${group_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"Operations": [
{
"op": "replace",
"path": "None",
"value": {
"displayName": "Real new group",
"id": "e43536e9-33fe-43f8-90b8-d3e39a7dd6ad"
}
},
{
"op": "add",
"path": "None",
"value": {
"members": [
{
"$ref": "https://app.datadoghq.com/api/scim/v2/Users/f85e3868-ad7b-47e3-a8a9-ff1eade2bbf9",
"displayName": "Bob Smith",
"value": "f85e3868-ad7b-47e3-a8a9-ff1eade2bbf9"
}
]
}
},
{
"op": "remove",
"path": "members[value eq \"fddf0cf2-9b60-11ef-ad4b-d6754a54a839\"]",
"value": null
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}
EOF
## json-request-body
#
# Path parameters
export group_id="CHANGE_ME"
# Curl command
curl -X PATCH "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.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scim/Groups/${group_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"Operations": [
{
"op": "replace",
"path": "None",
"value": {
"displayName": "Real new group",
"id": "e43536e9-33fe-43f8-90b8-d3e39a7dd6ad"
}
},
{
"op": "add",
"path": "None",
"value": {
"members": [
{
"$ref": "https://app.datadoghq.com/api/scim/v2/Users/f85e3868-ad7b-47e3-a8a9-ff1eade2bbf9",
"displayName": "Bob Smith",
"value": "f85e3868-ad7b-47e3-a8a9-ff1eade2bbf9"
}
]
}
},
{
"op": "remove",
"path": "members[value eq \"fddf0cf2-9b60-11ef-ad4b-d6754a54a839\"]",
"value": null
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}
EOF