Blue Triangle Help Center
Auto Light Dark
Auto Light Dark

Event Markers Endpoint

Summary

The Event Markers endpoint allows you to configure, update, get, and list event markers (lined annotations on graphs) for a specified time or range of times. These markers will appear on graphs in the portal for your site or account, depending on how the marker is configured. Please note that the HTTP request method is different for each endpoint. 

Create Event Marker

Endpoint

POST / https://api.bluetriangletech.com/event-markers

Required Parameters

Name

Type

Description

Options/Constraints

prefix

string

Identifier used for creating event markers for specific sites.

Lower case letters only.

eventType

string

Identifier used for creating event markers for one site, or for many sites within one account.

Accepts the values "account" or "site" only.

eventName

string

The name to be used for the event marker.

None

annotation

string

Annotation to be displayed next to the event marker line.

None

lineColor

string

The color of the event marker line.

Options: red, maroon, orange, yellow, lime, green, aqua, blue, purple, fuchsia

lineThickness

string

Thickness of line for event marker being displayed.

Options: thin, normal, thick

lineStyle

string

Style of line for the event marker.

Options: solid, dashed, dotted

eventStart

string

The epoch time of when the event occurred.

None

timezone

string

Timezone for the event marker.

Accepts values from the IANA list.

Optional Parameters

Name

Type

Description

Options/Constraints

eventEnd

string

The epoch time of when the event ended. Supplying an end time will shade in the area between the start and end markers.

None

description

string

Description of the event marker.

None

Example Request

{

 "prefix": "testsite",


 "eventStart": "1536552000",


 "eventType": "site",


 "eventName": "Testing API",


 "annotation": "API Testing",


 "lineColor": "yellow",


 "lineThickness": "normal",


 "lineStyle": "solid",


 "timezone": "America/New_York",


 "description": "this was a test"


}

Update Event Marker

Endpoint

PUT /event-markers

Required Parameters

Name

Type

Description

Options/Constraints

id

integer

Unique id that identifies the event marker.

Integers only

prefix

string

Identifier used for creating event markers for specific sites.

Lower case letters only.

Optional Parameters

Name

Type

Description

Options/Constraints

eventType

string

Identifier used for creating event markers for one site, or for many sites within one account.

Accepts the values "account" or "site" only.

eventName

string

The name to be used for the event marker.

None

annotation

string

Annotation to be displayed next to the event marker line.

None

lineColor

string

The color of the event marker line.

Options: red, maroon, orange, yellow, lime, green, aqua, blue, purple, fuchsia

lineThickness

string

Thickness of line for event marker being displayed.

Options: thin, normal, thick

lineStyle

string

Style of line for the event marker.

Options: solid, dashed, dotted

eventStart

string

The epoch time of when the event occurred.

None

timezone

string

Timezone for the event marker.

Accepts values from the IANA list.

eventEnd

string

The epoch time of when the event ended. Supplying an end time will shade in the area between the start and end markers.

None

description

string

Description of the event marker.

None

Example Request

curl -X PUT "https://api.bluetriangletech.com/event-markers"\
-H "X-API-Email: email@company.com" \
-H "X-API-Key: 2831ac6dffec75a48fe712345e000481" \
-H "Content-Type: application/json"
--data '{  "id": 22,
 "prefix": "testsite",
 "eventStart": "1536552000",
 "eventType": "site",
 "eventName": "Testing API",
 "annotation": "API Testing",
 "lineColor": "yellow",
 "lineThickness": "normal",
 "lineStyle": "solid",
 "timezone": "America/New_York",
 "description": "this was a test"
}'

Get Event Marker

Endpoint

GET /event-markers?id=[:id]

Required Parameters

Name

Type

Description

Options/Constraints

id

integer

Unique id that identifies the event marker.

Integers only

Example Request

curl -X GET "https://api.bluetriangletech.com/event-markers?id=22"\
-H "X-API-Email: email@company.com" \
-H "X-API-Key: 2831ac6dffec75a48fe712345e000481" \
-H "Content-Type: application/json"

List Event Markers

Endpoint

GET /event-markers?prefix=[:prefix]

Required Parameters

Name

Type

Description

Options/Constraints

prefix

string

Identifier used for creating event markers for specific sites.

Lower case letters only.

Example Request

curl -X GET "https://api.bluetriangletech.com/event-markers?prefix=siteprefix"\
-H "X-API-Email: email@company.com" \
-H "X-API-Key: 2831ac6dffec75a48fe712345e000481" \
-H "Content-Type: application/json"