Support Center Home

Add OpsNotes


You can use LogicMonitor’s REST API to programmatically add ops notes to your account. As with all of our API calls, authentication is required.

Request Information


URI: /setting/opsnotes

Request Parameters: You can POST the following properties for all new ops notes.

Property Description Required? Type Example
note The note message Yes String “note”:”software update from 1.0.0 to 1.2.4″
happenedOnInSec The date and time associated with the note, in epoch seconds format No. Defaults to current time Integer “happenOnInSec”:1488826440
scopes The scopes associated with the note. A note with no scope will show up for everything in the account. Each scope object should have a type (device, service, deviceGroup, serviceGroup). For group scopes, a groupId should be specified. For device/service scopes, deviceId/serviceId should be specified & groupId can optionally be included. No. Defaults to no scope JSON Object “scopes”:[{“type”:”device”,”deviceId”:56},{“type”:”service”,”serviceId”:87,”groupId”:74}]
tags The tags that should be associated with the note. Each tag has a unique id and a name – you can either include the name of a new or existing tag, or the id of an existing tag. No. Defaults to no tags JSON Object “tags”:[{“name”:”release”},{“name”:”upgrade”}]


The following Python script adds an Ops Note to account, with note “deploy version 3.4.5” and tag “reporting” to the device with id 530.

#!/bin/env python

import requests
import json
import hashlib
import base64
import time
import hmac

#Account Info
AccessId ='48v2wRzfK94y53sq5EuF'
AccessKey ='H_D9i(f5~B^U36^K6i42=^nS~e75gy382Bf6{)P+'
Company = 'api'

#Request Info
httpVerb ='POST'
resourcePath = '/setting/opsnotes'
queryParams =''
data = '{"note":"deploy version 3.4.5","tags":[{"name":"reporting"}],"scopes":[{"type":"device","deviceId":530}]}'

#Construct URL 
url = 'https://'+ Company +'' + resourcePath +queryParams

#Get current time in milliseconds
epoch = str(int(time.time() * 1000))

#Concatenate Request details
requestVars = httpVerb + epoch + data + resourcePath

# Construct signature
hmac1 =,msg=requestVars.encode(),digestmod=hashlib.sha256).hexdigest()
signature = base64.b64encode(hmac1.encode())
# Construct headers
auth = 'LMv1 ' + AccessId + ':' + signature.decode() + ':' + epoch
headers = {'Content-Type':'application/json','Authorization':auth}
# Make request
response =, data=data, headers=headers)
# Print status and body of response
print('Response Status:',response.status_code)
print('Response Body:',response.content)

In This Article