Grafana Cloud Grafana Incident Grafana Incident APIs
Grafana Cloud

Grafana Incident APIs

Interacting programmatically with Grafana Incident is the quickest way for engineering teams to customize the workflow and integrate with other tools.

Grafana Incident provides a variety of ways to integrate programmatically:

  1. Prefilling web forms using URL parameters
  2. Add a Declare Incident bookmarklet to your browser
  3. Outgoing Webhooks that allow you to respond to events within Grafana Incident
  4. Explore experimental APIs like Incoming Webhooks and Public API docs

Prefilling the Declare Incident form with URL parameters

A simple way to help people declare an incident is to prefill the title, and other contextual information, during the declaration process.

You can do this using URL parameters on the page.

  • title - (optional) string - Prefill the title of the incident (a human readable string)
  • url - (optional) url - Attach some context to the incident from the beginning
  • caption - (optional) string - A description of the attached context (the label for the URL)

For example, try the following URL in your stack (Note: You should replace

Declare Incident bookmarklet

You can add a Declare Incident button to your browser to allow you to declare incidents from any website.

The bookmarklet will carry the URL and title of the page into the Incident. For example, GitHub issues, JIRA tickets, SLO page, Grafana Dashboard, even a specific tweet, any URL.

To create a bookmarklet, consult the help docs of your specific browser. However, you will likely follow this process:

  1. Add or create a new bookmark (it is recommended that you place it on your Bookmarks Bar)
  2. For the title or caption, enter Declare Incident
  3. Use the code below for the URL field, providing the correct value for the placeholder
javascript: (() => {
  let title = encodeURIComponent(document.title);
  let url = encodeURIComponent(window.location.href);

Experimental APIs

The following items are currently under active development. These docs are published here as a preview of what we’re building.

  1. The JSON/HTTPS RPC API (experimental) for getting, creating and updating things
  2. Incoming Webhook (experimental), to declare an incident from a third-party system

If you have any questions, or would like to be an early adopter, please get in touch via our grafana/incident-community repo.