{ "opencollection": "1.0.0", "info": { "name": "MongoDB Atlas Administration Access Tracking MongoDB Cloud Users API", "version": "2.0" }, "request": { "auth": { "type": "oauth2", "flow": "client_credentials", "accessTokenUrl": "https://cloud.mongodb.com/api/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "items": [ { "info": { "name": "MongoDB Cloud Users", "type": "folder" }, "items": [ { "info": { "name": "Return All MongoDB Cloud Users in One Project", "type": "http" }, "http": { "method": "GET", "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/users", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "groupId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**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." }, { "name": "includeCount", "value": "", "type": "query", "description": "Flag that indicates whether the response returns the total number of items (`totalCount`) in the response." }, { "name": "itemsPerPage", "value": "", "type": "query", "description": "Number of items that the response returns per page." }, { "name": "pageNum", "value": "", "type": "query", "description": "Number of the page that displays the current set of the total objects that the response returns." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "flattenTeams", "value": "", "type": "query", "description": "Flag that indicates whether the returned list should include users who belong to a team with a role in this project. You might not have assigned the individual users a role in this project. If `\"flattenTeams\" : false`, this resource returns only users with a role in the project. If `\"flattenTeams\" : true`, this resource returns both users with roles in the project and users who belong to teams with roles in the project." }, { "name": "includeOrgUsers", "value": "", "type": "query", "description": "Flag that indicates whether the returned list should include users with implicit access to the project, the Organization Owner or Organization Read Only role. You might not have assigned the individual users a role in this project. If `\"includeOrgUsers\": false`, this resource returns only users with a role in the project. If `\"includeOrgUsers\": true`, this resource returns both users with roles in the project and users who have implicit access to the project through their organization role." }, { "name": "orgMembershipStatus", "value": "", "type": "query", "description": "Flag that indicates whether to filter the returned list by users organization membership status. If you exclude this parameter, this resource returns both pending and active users. Not supported in deprecated versions." }, { "name": "username", "value": "", "type": "query", "description": "Email address to filter users by. Not supported in deprecated versions." } ] }, "docs": "Returns details about the pending and active MongoDB Cloud users associated with the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.\n\n**Note**: This resource cannot be used to view details about users invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint.\n\n**Note**: To return both pending and active users, use v2-{2025-02-19} or later. If using a deprecated version, only active users will be " }, { "info": { "name": "Add One MongoDB Cloud User to One Project", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/users", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "groupId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**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." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Adds one MongoDB Cloud user to one project. To use this resource, the requesting Service Account or API Key must have the Project Owner role or Project Access Manager role. \n- If the user has a pending invitation to join the project's organization, MongoDB Cloud modifies it and grants project access. \n- If the user doesn't have an invitation to join the organization, MongoDB Cloud sends a new invitation that grants the user organization and project access. \n- If the user is already active in the" }, { "info": { "name": "Return One MongoDB Cloud User in One Project", "type": "http" }, "http": { "method": "GET", "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/users/:userId", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "groupId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**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." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the project. If you need to lookup a user's `userId` or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Project resource and filter by `username`." } ] }, "docs": "Returns information about the specified MongoDB Cloud user within the context of the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.\n\n**Note**: You can only use this resource to fetch information about MongoDB Cloud human users. To return information about an API Key, use the [Return One Organization API Key](#tag/Programmatic-API-Keys/operation/getApiKey) endpoint.\n\n**Note**: This resource does not return information about" }, { "info": { "name": "Remove One MongoDB Cloud User from One Project", "type": "http" }, "http": { "method": "DELETE", "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/users/:userId", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "groupId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**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." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the project. If you need to lookup a user's `userId` or verify a user's status in the organization, use the [Return All MongoDB Cloud Users in One Project](#tag/MongoDB-Cloud-Users/operation/listProjectUsers) resource and filter by `username`." } ] }, "docs": "Removes one MongoDB Cloud user from the specified project. You can remove an active user or a user that has not yet accepted the invitation to join the organization. To use this resource, the requesting Service Account or API Key must have the Project Owner role or Project Access Manager role.\n\n**Note**: This resource cannot be used to remove pending users invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint.\n\n**Note**: To remove pending or active users, use v2-{" }, { "info": { "name": "Add One Project Role to One MongoDB Cloud User", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/users/:userId:addRole", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "groupId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**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." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the project. If you need to lookup a user's `userId` or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Project resource and filter by `username`." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Adds one project-level role to the MongoDB Cloud user. You can add a role to an active user or a user that has been invited to join the project. To use this resource, the requesting Service Account or API Key must have the Project Owner role or Project Access Manager role.\n\n**Note**: This resource cannot be used to add a role to users invited using the deprecated Invite One MongoDB Cloud User to Join One Project endpoint." }, { "info": { "name": "Remove One Project Role from One MongoDB Cloud User", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/users/:userId:removeRole", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "groupId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**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." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the project. If you need to lookup a user's `userId` or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Project resource and filter by `username`." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Removes one project-level role from the MongoDB Cloud user. You can remove a role from an active user or a user that has been invited to join the project. To replace a user's only role, add the new role before removing the old role. A user must have at least one role at all times. To use this resource, the requesting Service Account or API Key must have the Project Owner role or Project Access Manager role.\n\n**Note**: This resource cannot be used to remove a role from users invited using the dep" }, { "info": { "name": "Return All MongoDB Cloud Users Assigned to One Team", "type": "http" }, "http": { "method": "GET", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/teams/:teamId/users", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "itemsPerPage", "value": "", "type": "query", "description": "Number of items that the response returns per page." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pageNum", "value": "", "type": "query", "description": "Number of the page that displays the current set of the total objects that the response returns." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "teamId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the team whose application users you want to return." }, { "name": "username", "value": "", "type": "query", "description": "Email address to filter users by. Not supported in deprecated versions." }, { "name": "orgMembershipStatus", "value": "", "type": "query", "description": "Organization membership status to filter users by. If you exclude this parameter, this resource returns both pending and active users. Not supported in deprecated versions." }, { "name": "userId", "value": "", "type": "query", "description": "Unique 24-hexadecimal digit string to filter users by. Not supported in deprecated versions." } ] }, "docs": "Returns details about the pending and active MongoDB Cloud users associated with the specified team in the organization. Teams enable you to grant project access roles to MongoDB Cloud users. To use this resource, the requesting Service Account or API Key must have the Organization Member role.\n\n**Note**: This resource cannot be used to view details about users invited via the deprecated [Invite One MongoDB Cloud User to Join One Project](#tag/Projects/operation/createProjectInvitation) endpoint" }, { "info": { "name": "Add One MongoDB Cloud User to One Team", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/teams/:teamId:addUser", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "teamId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the team to add the MongoDB Cloud user to." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Adds one MongoDB Cloud user to one team. You can add an active user or a user that has not yet accepted the invitation to join the organization. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.\n\n**Note**: This resource cannot be used to add a user invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint." }, { "info": { "name": "Remove One MongoDB Cloud User from One Team", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/teams/:teamId:removeUser", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "teamId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the team to remove the MongoDB user from." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Removes one MongoDB Cloud user from one team. You can remove an active user or a user that has not yet accepted the invitation to join the organization. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.\n\n**Note**: This resource cannot be used to remove a user invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint." }, { "info": { "name": "Return All MongoDB Cloud Users in One Organization", "type": "http" }, "http": { "method": "GET", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/users", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "includeCount", "value": "", "type": "query", "description": "Flag that indicates whether the response returns the total number of items (`totalCount`) in the response." }, { "name": "itemsPerPage", "value": "", "type": "query", "description": "Number of items that the response returns per page." }, { "name": "pageNum", "value": "", "type": "query", "description": "Number of the page that displays the current set of the total objects that the response returns." }, { "name": "username", "value": "", "type": "query", "description": "Email address to filter users by. Not supported in deprecated versions." }, { "name": "orgMembershipStatus", "value": "", "type": "query", "description": "Organization membership status to filter users by. If you exclude this parameter, this resource returns both pending and active users. Not supported in deprecated versions." } ] }, "docs": "Returns details about the pending and active MongoDB Cloud users associated with the specified organization. To use this resource, the requesting Service Account or API Key must have the Organization Member role.\n\n**Note**: This resource cannot be used to view details about users invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint.\n\n**Note**: To return both pending and active users, use v2-{2025-02-19} or later. If using a deprecated version, only active users w" }, { "info": { "name": "Add One MongoDB Cloud User to One Organization", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/users", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Invites one new or existing MongoDB Cloud user to join the organization. The invitation to join the organization will be sent to the username provided and must be accepted within 30 days. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.\n\n**Note**: If the user does not have an existing MongoDB Cloud account, they will be prompted to finish setting up an account upon accepting the invitation. If the user already has an account, they will still " }, { "info": { "name": "Return One MongoDB Cloud User in One Organization", "type": "http" }, "http": { "method": "GET", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/users/:userId", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the organization. If you need to lookup a user's `userId` or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Organization resource and filter by `username`." } ] }, "docs": "Returns information about the specified MongoDB Cloud user within the context of the specified organization. To use this resource, the requesting Service Account or API Key must have the Organization Member role.\n\n**Note**: This resource can only be used to fetch information about MongoDB Cloud human users. To return information about an API Key, use the [Return One Organization API Key](#tag/Programmatic-API-Keys/operation/getApiKey) endpoint.\n\n**Note**: This resource does not return informatio" }, { "info": { "name": "Update One MongoDB Cloud User in One Organization", "type": "http" }, "http": { "method": "PATCH", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/users/:userId", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the organization. If you need to lookup a user's `userId` or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Organization resource and filter by `username`." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates one MongoDB Cloud user in the specified organization. You can update an active user or a user that has not yet accepted the invitation to join the organization. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.\n\n**Note**: Only include the fields you wish to update in the request body. Supplying a field with an empty value will reset that field on the user.\n\n**Note**: This resource cannot be used to update pending users invited via the " }, { "info": { "name": "Remove One MongoDB Cloud User from One Organization", "type": "http" }, "http": { "method": "DELETE", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/users/:userId", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the organization. If you need to lookup a user's `userId` or verify a user's status in the organization, use the [Return All MongoDB Cloud Users in One Organization](#tag/MongoDB-Cloud-Users/operation/listOrganizationUsers) resource and filter by `username`." } ] }, "docs": "Removes one MongoDB Cloud user in the specified organization. You can remove an active user or a user that has not yet accepted the invitation to join the organization. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.\n\n**Note**: This resource cannot be used to remove pending users invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint.\n\n**Note**: To remove pending or active users, use v2-{2025-02-19} or later. I" }, { "info": { "name": "Add One Organization Role to One MongoDB Cloud User", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/users/:userId:addRole", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the organization. If you need to lookup a user's `userId` or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Organization resource and filter by `username`." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Adds one organization-level role to the MongoDB Cloud user. You can add a role to an active user or a user that has not yet accepted the invitation to join the organization. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.\n\n**Note**: This operation is atomic.\n\n**Note**: This resource cannot be used to add a role to users invited using the deprecated Invite One MongoDB Cloud User to Join One Project endpoint." }, { "info": { "name": "Remove One Organization Role from One MongoDB Cloud User", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/orgs/:orgId/users/:userId:removeRole", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "orgId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies the pending or active user in the organization. If you need to lookup a user's `userId` or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Organization resource and filter by `username`." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Removes one organization-level role from the MongoDB Cloud user. You can remove a role from an active user or a user that has not yet accepted the invitation to join the organization. To replace a user's only role, add the new role before removing the old role. A user must have at least one role at all times. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.\n\n**Note**: This operation is atomic.\n\n**Note**: This resource cannot be used to remove" }, { "info": { "name": "Create One MongoDB Cloud User", "type": "http" }, "http": { "method": "POST", "url": "https://cloud.mongodb.com/api/atlas/v2/users", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates one MongoDB Cloud user account. A MongoDB Cloud user account grants access to only the MongoDB Cloud application. To grant database access, create a database user. MongoDB Cloud sends an email to the users you specify, inviting them to join the project. Invited users don't have access to the project until they accept the invitation. Invitations expire after 30 days.\n\n MongoDB Cloud limits MongoDB Cloud user membership to a maximum of 250 MongoDB Cloud users per team. MongoDB Cloud limits" }, { "info": { "name": "Return One MongoDB Cloud User by Username", "type": "http" }, "http": { "method": "GET", "url": "https://cloud.mongodb.com/api/atlas/v2/users/byName/:userName", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userName", "value": "", "type": "path", "description": "Email address that belongs to the MongoDB Cloud user account. You cannot modify this address after creating the user." } ] }, "docs": "Returns the details for one MongoDB Cloud user account with the specified username. You can't use this endpoint to return information about an API Key. To return information about an API Key, use the Return One Organization API Key endpoint. To use this resource, the requesting Service Account or API Key can have any role." }, { "info": { "name": "Return One MongoDB Cloud User by ID", "type": "http" }, "http": { "method": "GET", "url": "https://cloud.mongodb.com/api/atlas/v2/users/:userId", "params": [ { "name": "envelope", "value": "", "type": "query", "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body." }, { "name": "pretty", "value": "", "type": "query", "description": "Flag that indicates whether the response body should be in the prettyprint format." }, { "name": "userId", "value": "", "type": "path", "description": "Unique 24-hexadecimal digit string that identifies this user." } ] }, "docs": "Returns the details for one MongoDB Cloud user account with the specified unique identifier for the user. You can't use this endpoint to return information on an API Key. To return information about an API Key, use the Return One Organization API Key endpoint. You can always retrieve your own user account. If you are the owner of a MongoDB Cloud organization or project, you can also retrieve the user profile for any user with membership in that organization or project. To use this resource, the " } ] } ], "bundled": true }