AddUserToGroup

POST {{baseUrl}}/userGroupMemberships/

Adds the specified user to the specified group and returns a UserGroupMembership object with its own OCID.

After you send your request, the new object's lifecycleState will temporarily be CREATING. Before using the object, first make sure its lifecycleState has changed to ACTIVE.

Request Body

{"userId"=>"{{user_ocid}}", "groupId"=>"ocid1.group.oc1...."}

HEADERS

KeyDatatypeRequiredDescription
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or
server error without risk of executing that same action again. Retry tokens expire after 24
hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
has been deleted and purged from the system, then a retry of the original creation request
may be rejected).
Content-Typestring
Datestring(Required) Current Date
Authorizationstring(Required) Signature Authentication on Authorization header
x-content-sha256string(Required) Content sha256 for POST, PUT and PATCH operations

RESPONSES

status: OK

{"id":"sint consectetur sed","compartmentId":"dolor aliquip","timeCreated":"1964-10-21T07:12:51.184Z","lifecycleState":"INACTIVE","groupId":"dolor consequat an","userId":"deserunt cillum occaecat quis","inactiveStatus":40616992}