ListUserGroupMemberships
get
/20160918/userGroupMemberships
List the UserGroupMembership objects in your tenancy. Specify the OCID of your tenancy for the compartment OCID.Specify a user OCID to list only the group memberships for that user. Specify a group OCID to list the users in that group. Specify both a user OCID and a group OCID to show whether the specified user is in the specified group. If the user is not in the group, the response is an empty list.
You can filter the list in the following ways. Either a user OCID or group OCID is required; both may be provided.
Request
Supported Media Types
- application/json
Query Parameters
-
compartmentId(required): string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment. -
groupId: string
The OCID of the group.
-
limit: integer
Minimum Value:
1
Maximum Value:1000
For list pagination. The maximum number of results per page, or items to return in a paginated List call. 1 is the minimum, 1000 is the maximum.Default Value:100
-
page: string
Minimum Length:
1
Maximum Length:512
For list pagination. The value of the opc-next-page response header from the previous List call.Default Value:oracle.doceng.json.BetterJsonNull@2c07545f
-
userId: string
The OCID of the user.
Response
Supported Media Types
- application/json
200 Response
Page of UserGroupMembership objects matching the specified criteria.
Headers
-
opc-next-page: string
For list pagination. When this header appears in the response, additional pages of results remain. Use this value as the page parameter to get the next page of items.
-
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 : schema
Type:
Show Source
array
-
Array of:
object UserGroupMembership
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.
Nested 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
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