This section will cover some core APIs for extracting data from AIMS
List all systems connected to an environment
curl --location --request GET 'https://api.aimsinnovation.com/api/environments/{environment_id}/systems' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic yourKeyGoesHere'
will return
{
"environmentId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version":"v1.0",
"agentId":"mssql",
"groupId":111,
"id":2,
"majorVersion":1,
"minorVersion":0,
"name":"AIMS-SQL01"
}
Parameter | Optional | Comment |
N/A |
The "id"s returned can then be used in the query below as "systemId", to list all nodes for a specific system in an environment.
List nodes for the systems (or specific system) in an environment
curl --location --request GET 'https://api.aimsinnovation.com/api/environments/{environment_id}/nodes?systemId=1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic yourKeyGoesHere'
will return
{
"id":33374,
"systemId":2,
"name":"dbo.AddDailyPartitions",
"status":"aims.core.undefined",
"type":"aims.mssql.database-sql-procedure"
}
Parameter | Optional | Comment |
systemId | yes | include if the query is targeting a specific system |
"id" returned is the nodeId, "systemId" is the id for the system that was queried. "Type" is the type of node as defined by the agent.
List filtered events for an environment
curl --location --request GET 'https://api.aimsinnovation.com/api/environments/{environment_id}/events?take=20&from=2021-03-21T00:00:00Z&to=2021-03-21T10:00:00Z&levels=error&keywords=anomaly&nodeIds=40280' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic yourKeyGoesHere'
will return
[
{
"count":1,
"endTime":"2021-03-21T05:15:00Z",
"eventLevel":"error",
"eventStatus":"open",
"eventType":"aims.core.anomaly",
"id":23379025,
"message":"Anomaly detected",
"nodeIds":[
40280
],
"nodes":[
{
"id":40280,
"systemId":818,
"name":"AIMS-D01",
"status":"aims.core.stopped",
"type":"aims.azurerg.microsoft-classiccompute-vm"
}
],
"startTime":"2021-03-21T03:15:00Z"
}
]
Parameter | Optional | Comment |
take | yes | how many events to list. If unspecified, 500 events will be returned |
from | yes | from date in format shown above |
to | yes | to date in format shown above |
levels | yes | event level / criticality: unspecified, verbose, info, warning, error, critical |
keywords | yes | free-text. Should be set to "anomaly" if only anomaly events are to be listed |
nodeIds | yes | list events for specific node(s). Comma separated if more than one |