Update Organization Roles for One MongoDB Cloud User
Deprecated /api/atlas/v2/orgs/{orgId}/users/{userId}/roles Updates the roles of the specified user in the specified organization. To specify the user to update, provide the unique 24-hexadecimal digit string that identifies the user in the specified organization. To use this resource, the requesting Service Account or API Key must have the Organization User Admin role.
Parameters
path Path Parameters
| Name | Type |
|---|---|
orgId
required
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access. | 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.
links?: readonly
orgRoles?: ("ORG_OWNER" | "ORG_MEMBER" | "ORG_GROUP_CREATOR" | "ORG_BILLING_ADMIN" | "ORG_BILLING_READ_ONLY" | "ORG_STREAM_PROCESSING_ADMIN" | "ORG_READ_ONLY")[];
}
Responses
OK
links?: readonly
orgRoles?: ("ORG_OWNER" | "ORG_MEMBER" | "ORG_GROUP_CREATOR" | "ORG_BILLING_ADMIN" | "ORG_BILLING_READ_ONLY" | "ORG_STREAM_PROCESSING_ADMIN" | "ORG_READ_ONLY")[];
}
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;
}