MongoDB Custom Database Roles API

Returns, adds, edits, and removes custom database user privilege roles. Use custom roles to specify custom sets of actions that the MongoDB Cloud built-in roles can't describe. You define custom roles at the project level, for all clusters in the project. This resource supports a subset of MongoDB privilege actions. You can create a subset of custom role actions. To create a wider list of custom role actions, use the MongoDB Cloud user interface. Custom roles must include actions that all project's clusters support, and that are compatible with each MongoDB version that your project's clusters use. For example, if your project has MongoDB 4.2 clusters, you can't create custom roles that use actions introduced in MongoDB 4.4.

Business capability
Identity & Access Management BC-620.20

Operations 5

GET /api/atlas/v2/groups/{groupId}/customDBRoles/roles Return All Custom Roles in One Project #
POST /api/atlas/v2/groups/{groupId}/customDBRoles/roles Create One Custom Role #
DELETE /api/atlas/v2/groups/{groupId}/customDBRoles/roles/{roleName} Remove One Custom Role from One Project #
GET /api/atlas/v2/groups/{groupId}/customDBRoles/roles/{roleName} Return One Custom Role in One Project #
PATCH /api/atlas/v2/groups/{groupId}/customDBRoles/roles/{roleName} Update One Custom Role in One Project #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mongodb:mongodb-custom-database-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mongodb-custom-database-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mongodb Custom Database Roles API
  version: '2.0'
  license:
    name: CC BY-NC-SA 3.0 US
    url: https://creativecommons.org/licenses/by-nc-sa/3.0/us/
  termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions
  x-refined-note:
  - x-xgen-sha differs across the merged source definitions and was not carried
  description: 'Operations tagged Custom Database Roles across 2 of this provider''s published API definitions: mongodb-atlas-openapi.yaml, mongodb-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cloud.mongodb.com
security:
- ServiceAccounts: []
- DigestAuth: []
tags:


# --- truncated at 32 KB (35 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mongodb/refs/heads/main/openapi/mongodb-custom-database-roles-api-openapi.yml