You are here:... (Miscellaneous) > API > Events > Creating Events

Ingest Events - Creating Events

Utilizing the Ingest Events API, you can create events (also known as external events) to send to Netuitive. See External Events to read more about them. We recommend using the unique API key (found on the API keys page under the Account Profile drop-down menu) for the Custom integration automatically created for your account as your go-to for anything related to using our API.

Tip   To explore Netuitive's REST API and test some requests, go here.

Create an external event

This method will create an external event within Netuitive.

Method POST URL https://api.app.netuitive.com/ingest/events/{apiId}
Important   Replace {apiId} in the above URL with the API key from your Custom integration. To access this key, click Integrations in the user account drop-down menu in the top right-hand corner of Netuitive, then find the CUSTOM integration and copy the API key from the API Key column.
Parameters Required/Optional Description
events Required Body parameter; see below.
apiId Required URL (path) parameter; your API key.
X-Netuitive-Api-Options Optional

Header parameter. Two values you can include:

  • The value SEND_RESPONSE_BODY if you desire a detailed "Success Response" body.
  • The value INJECT_TIMESTAMP if you want the custom ingest service to inject the current server timestamp into the element sample's "timestamp" property.
    Note   This will overwrite any passed-in timestamps if they exist.

Input JSON Format for Request Header

Header Name Header Value
Content-Type application/json

Input JSON Format for Request Body

Attribute Required/Optional Description
type Required

The type attribute tells Netuitive what type of event this is; valid inputs are INFO, WARNING, or CRITICAL.

tags Optional You can tag events to enable filtering in Netuitive by passing in keys and values. The format for tags is [{"name":"key1", "value":"value1"}, {"name":"key2", "value":"value2"}, (etc.)]
data Required

The data attribute provides Netuitive with the content for the actual event. It contains three attributes:

  • elementId (required)
    • This should contain the fully qualified name (fqn) of the element you wish to generate an external event for.
  • level (optional)
    • The severity level of the event. Valid inputs are Info, Warning, or Critical.
      Note   If values are set at both level and type, the level value will take precedence since it's closer to the message itself and more specific.
  • message (optional)
    • The message text generated for the event.

source Optional Source of the event. This is set to the ingested integration if the value is missing.
title Required Title of the event.
timestamp Optional

You can define a timestamp, but it must be in the epoch format. If you do not define a timestamp, Netuitive will create one for you.

Important   If you do not include a timestamp, you must include X-Netuitive-Api-Options: INJECT_TIMESTAMP in the header.