AddUserToGroup
post
/20160918/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
Supported Media Types
- application/json
Header Parameters
-
opc-retry-token: string
Minimum Length:
1
Maximum Length:64
A 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 (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
Request object for adding a user to a group.
Root Schema : AddUserToGroupDetails
Type:
Show Source
object
-
groupId(required):
string
The OCID of the group.
-
userId(required):
string
The OCID of the user.
Response
Supported Media Types
- application/json
200 Response
The user is being added to the group.
Headers
-
etag: string
For optimistic concurrency control. See if-match.
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : UserGroupMembership
Type:
object
An object that represents the membership of a user in a group. When you add a user to a group, the result is a UserGroupMembership with its own OCID. To remove a user from a group, you delete the UserGroupMembership object.
Show Source
-
compartmentId(required):
string
The OCID of the tenancy containing the user, group, and membership object.
-
groupId(required):
string
The OCID of the group.
-
id(required):
string
The OCID of the membership.
-
inactiveStatus:
integer(int64)
The detailed status of INACTIVE lifecycleState.
-
lifecycleState(required):
string
Minimum Length:
1
Maximum Length:64
Allowed Values:[ "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED" ]
The membership's current state. After creating a membership object, make sure its lifecycleState changes from CREATING to ACTIVE before using it. -
timeCreated(required):
string(date-time)
Date and time the membership was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
-
userId(required):
string
The OCID of the user.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
403 Response
Forbidden
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
409 Response
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
Default Response
An error has occurred.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload