Skip to Content
GraphQL API

Mondoo GraphQL API

Use the Mondoo GraphQL API to query assets, findings, and vulnerabilities and to automate actions such as exceptions, tickets, and integration scans.

The Mondoo API is the same GraphQL API that the Mondoo App uses. Spaces, assets, findings, vulnerabilities, exceptions, tickets, and integrations are all available to your own scripts and tools, so you can read your data and act on it without opening the app.

How the API works

The API is a single GraphQL endpoint. You send every request, whether it reads data (a query) or changes data (a mutation), as an HTTP POST with a JSON body to the /query path of your region:

RegionEndpoint
UShttps://us.api.mondoo.com/query
EUhttps://eu.api.mondoo.com/query

Use the endpoint of the region your organization runs in. To learn which region your organization is in, read Regions. https://api.mondoo.com/query also reaches the US region, but the region-specific hosts are the recommended form.

The JSON body has two fields:

  • query: the GraphQL operation, as a string
  • variables: an object with the values for the operation's variables

The response is JSON with a data object and, if something went wrong, an errors array. To learn how to read both, read API Concepts.

When to use the API

The API is the right tool when you want to pull Mondoo data into another system or automate a task that you'd otherwise do by hand in the Mondoo App. For example:

  • Export the vulnerabilities in a space to a data warehouse or a spreadsheet every night.
  • Remove decommissioned machines from a space as part of a cleanup job.
  • Open a ticket for every critical vulnerability that appears on a production asset.
  • Start an integration scan after a deployment finishes.

Other Mondoo tools cover some of these jobs with less code:

If you want toUse
Scan systems and send the results to Mondoocnspec
Manage spaces, integrations, policies, and access as codeThe Mondoo Terraform provider
Ask questions about your findings in plain language from an assistantThe Mondoo MCP server
Send findings to a data platform on a scheduleAn export integration

Get started

  1. Authenticate: create an API token and learn which headers to send.
  2. Make your first request with curl, Python, or JavaScript.
  3. Learn the concepts you need for most calls: MRNs, pagination, filters, errors, and how to explore the schema.
  4. Copy a recipe for a common task:

Explore the full schema

The recipes in this section cover common tasks. The API offers many more queries and mutations. The endpoint supports GraphQL introspection, so any GraphQL client or IDE plugin pointed at it with your token can load the full schema, including every query, mutation, argument, and its description. To learn more, read Explore the schema.

Last updated on

On this page