Update Project Roles for One MongoDB Cloud User
Deprecated /api/atlas/v2/groups/{groupId}/users/{userId}/roles Updates the roles of the specified user in the specified project. To specify the user to update, provide the unique 24-hexadecimal digit string that identifies the user in the specified project. To use this resource, the requesting Service Account or API Key must have the Group User Admin role.
Parameters
path Path Parameters
| Name | Type |
|---|---|
groupId
required
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access. NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups. | string |
userId
required
Unique 24-hexadecimal digit string that identifies the user to modify. | string |
query Query Parameters
| Name | Type |
|---|---|
pretty Flag that indicates whether the response body should be in the prettyprint format. | boolean |
envelope Flag that indicates whether Application wraps the response in an | boolean |
Request Body
Roles to update for the specified user.
groupRoles?: string[];
links?: readonly
}
Responses
OK
groupRoles?: string[];
links?: readonly
}
Client Errors
Unauthorized.
badRequestDetail?:
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
Forbidden.
badRequestDetail?:
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
Not Found.
badRequestDetail?:
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
Server Errors
Internal Server Error.
badRequestDetail?:
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}