Moogsoft APIs

Moogsoft supports "API-first" workflows. You can perform your setup, configuration, and analysis tasks programmatically using the Moogsoft APIs.

Request requirements

Each API request must include the following:

  • The URL path and endpoint — for example:

    • https://api.moogsoft.com/v1/integrations/metrics

    • https://api.moogsoft.com/v1/integrations/events

    • https://api.moogsoft.com/v1/alerts

    • https://api.moogsoft.com/v1/collectors/datums

  • A content-type header such as:

    "Content-type": application/json

    Note

    Most endpoints expect application/json as the content type, but there are exceptions. Verify the required content type in the documentation before you send a command.

  • The API key. Moogsoft supports basic and bearer token authentication.

    "apiKey:" : your-name_eaeGvIxikEMsXt8WB51Wo2cSJOMTyn1MPO6

To generate an API key, go to the Moogsoft UI > Settings > Manage API Keys page.

Note

Users do not have API keys by default. You must create them manually. Read Managing API Keys for important notes and details.

API Authentication

Moogsoft supports basic and bearer token authentication for programmatic access to our public APIs.

Basic authentication

Embed the username and API key in the URL using the format username:api_key@domain_name. For example:

curl -k "https://my-username:my-api-key_!bmf0u446-7345-297j-3769-g57rs8qqztm@api.moogsoft.ai/v1/integrations/metrics"\
    -H "Content-Type: application/json"
    -d '{ "metric": "your-metric", "data": 10, "source": "www.your-source.com", "key": "dev", "tags": { "key": "value" }, "utc_offset": "GMT-07:00"}'

Bearer token authentication

Include the API key as a header in the body of the HTTP request. For example:

curl -k "https://api.moogsoft.ai/v1/integrations/metrics"\
    -H "Content-Type: application/json"
    -H 'apiKey: mynamespace_!bmf0u446-7345-297j-3769-g57rs8qqztm'
    -d '{ "metric": "your-metric", "data": 10, "source": "www.your-source.com", "key": "dev", "tags": { "key": "value" }, "utc_offset": "GMT-07:00"}'

Responses

This API generates standard HTTP response codes. For descriptions of these codes, see www.w3.org or a similar reference.

Filters

Some endpoints include a "filter" parameter that enables you to filter the set of incidents, alerts, or metrics.

Publication date

Documentation published 2021-04-09T16:07:52+02:00