NAV Navbar

Core APIs and Concepts

Welcome to the Anodot API Reference Site.

This section describes the basic API concpets

As well as core resource APIs such as

API Reference

API Base URLs

The Anodot API endpoints can be used to:

Run in Postman

Authentication

Basic Authentication

Using the basic token in a REST call:

POST 'https://{{app-url}}/api/v1/metrics?token={{DC_Key}}&protocol=anodot20'

Basic authentication is used for:

Anodot basic authentication uses a Data Collection Key. Copy the Data Collection Key from the Token Management page and use it in your REST calls.

Access Tokens

Endpoint: /access-token :

Step 2 - Request example:

POST 'https://{{app-url}}/api/v2/access-token/?responseformat=JSON' \
--header 'Content-Type: application/json' \
--data-raw '{
    "refreshToken" : "{{access-key}}"
}
'

Step 2 response - contains the access-token Option 1 is in plain-text:

"{{bearer-token-string}}"

Option 2 is in JSON format:

{
    "token" : "{{bearer-token-string}}"
}

Step 3 - Using the token you get in subsequent calls:

curl -X GET \
https://{{app-url}}.anodot.com/api/v2/feedbacks \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer {{bearer-token}}"
-d '{"startTime" : 1578391000, "endTime": 1578392000}'

To use access token authentication, follow these 3 simple steps:

Step 1: Create an access-key in the Token Management page within Anodot.

Step 2: Use the access-key's token to request a bearer-token.
The retrieved bearer-token is valid for 24 hours.

Step 3: Use the retrieved bearer-token in your subsequent API calls
Set the Authorization header of your calls with Bearer and the retrieved bearer-token.

Step 2 Request Arguments

Argument Description
refreshToken Copied from Anodot app, see step 1
responseformat [Optional] Can be set to JSON (case sensitive!) if you would like to get the response in a json format.

Response Codes:

Code Description
200 OK - The response includes a token
401 NOK - Token Mismatch

Get CustomerID

Each customer has a unique customerID which can be useful for some scenarios.

End Point prefix: /api/v2/customers/id

Request example:

curl --location --request GET 'https://app.anodot.com/api/v2/customers/id' \
--header 'Authorization: Bearer {{Bearer-Token}}' \
--data-raw ''
'

Request Arguments

None.

The Response contains the customerID.

"6062047f0f6585000e1a7107"

Anomaly

The Anomaly Object

End Point /api/v2/anomalies

Anomalies are deviations from a normal pattern in one or more metrics that signal unexpected behavior. Anodot treats anomalies as distinct objects when have their own attributes, rather than a collection of anomalous data points.

The anomaly API can be used to get and anlalyze the list of anomalies in your account.

List anomalies

Request Example: Get all anomalies

curl -X GET 'https://app.anodot.com/api/v2/anomalies?startDate=1655769600&endDate=1655856000&resolution=short,medium,long,longlong,weekly&state=both'' \
-H 'Authorization: Bearer {bearer-token} \
-H 'Content-Type: application/json'

Get all anomalies based on a search query. If no query is defined, the call will return all the anomalies in the account.
Used to fetch multiple group anomalies by their properties.
All Arguments are passed as query params, there is no body to the call.

Argument Description
q * (string) Search Query - include only anomalies of abnormal metrics that are part of the given search query.
startDate (integer) Filter anomalies that started after this given time (inclusive). Units are epoch in seconds.
endDate (integer) Relevant only when requesting closed anomalies, only anomalies that started before the given time are retrieved (inclusive). Units are epoch in seconds.
state (string) Anomaly state {open, closed, both}. Default: both
resolution (string) Include anomalies of the listed timescales,
currently supported timescales are: {short (1 min), medium (5 min), long (1 hour), longlong (1 day), weekly}.
The list passed should be comma separated string list, i.e. 'short,medium'. If you do not send this parameter, the default is 'medium'.
durationUnit (string) Can be one of the following: {seconds, minutes, hours, days}.
durationValue (integer) Minimum anomaly duration. Units are based on durationUnits.
score (number) Minimum anomaly score in range (0,1) (inclusive).
bookmark (string) Filter by bookmarks. The following options are available:
all - filter bookmarked anomalies.
none - filter anomalies with no bookmarks.
user_id - filter anomalies that are bookmarked by the given user.
* - filter anomalies that are not bookmarked by the given user.
sort (string) Sort by {startDate, endDate, duration, score}.
order (string) Sort order {asc, desc}.
index (integer) Anomaly starting index (for paging the results).
size (integer) Number of anomalies to fetch staring from index given by parameter index (for paging the results).
valueDirection (string) Direction of the anomaly breach - one of: {down,up,both}.
deltaType (string) Delta of the metric anomaly peak relative to the baseline. Delta type can be: percentage or absolute.
delta (number) Delta of the metric anomaly peak relative to the baseline. Units are based on the deltaType.

Response

Response Example

{
    "total": 1146,
    "pagingMax": "50",     
    "anomalies": [
        {
            "id": "2af8dcb64b3520178dd115345af28bc3", 
            "state": "open", 
            "name": "anomaly name given by the user", 
            "resolution": 'small', 
            "startDate": 1409051280, 
            "endDate": 1409051310, 
            "score": 95, 
            "duration": 300,
            "detailedScore": 95, 
            "metrics": [  
                {
                    "compositeId": "",
                    "user": "58e5f6b3ba01b264935d99f9",
                    "score": 0.41,
                    "maxBreach": 12.130026035603969,
                    "maxBreachPercentage": 46.88843542053082,
                    "anomalySumDeltas": 22.427541379084232,
                    "upperAbsoluteDelta": 12.130026035603969,
                    "upperPercentageDelta": 46.88843542053082,
                    "value": 23,
                    "delta": 46.88843542053082,
                    "state": "closed",
                    "correlation": "graph",
                    "lastNormalTime": 1614508200,
                    "timestamp": 1614516760,
                    "anomalies": [
                        [
                            1614508800,
                            1614513600,
                            "closed",
                            0.41,
                            true,
                            38,
                            "transient"
                        ]
                    ],
                    "currentAnomalyIntervals": [
                        {
                            "startDate": 1614508800,
                            "endDate": 1614513600,
                            "state": "closed",
                            "score": 0.41,
                            "directionUp": true,
                            "type": "transient",
                            "peakValue": 38,
                            "absoluteDelta": 12.130026035603969,
                            "percentageDelta": 46.88843542053082,
                            "anomalySumDeltas": 22.427541379084232
                        }
                    ],
                    "otherAnomalyIntervals": [],
                    "id": "bctele.0.SSSoKR5Z9lZ5S.RUNNING.samples-submit",
                    "name": "what=monitoring.module=bc.stream_name=test_BC_in_prod.stream_state=RUNNING.stream_type=Postgres.target_type=counter.type=samples-submit.unit=samples.version=0",
                    "what": "monitoring",
                    "properties": [
                        {
                            "key": "module",
                            "value": "bc"
                        },
                        {
                            "key": "stream_name",
                            "value": "test_BC_in_prod"
                        },
                        {
                            "key": "stream_state",
                            "value": "RUNNING"
                        },
                        {
                            "key": "stream_type",
                            "value": "Postgres"
                        },
                        {
                            "key": "type",
                            "value": "samples-submit"
                        },
                        {
                            "key": "version",
                            "value": "0"
                        },
                        {
                            "key": "target_type",
                            "value": "counter"
                        },
                        {
                            "key": "unit",
                            "value": "samples"
                        }
                    ],
                    "tags": [],
                    "dataPoints": [],
                    "baseline": []    
                }
            ]
        } 
    ]
}
Value Description Example
total (integer) Total Anomalies 1146
pagingMax (integer) The max numbers of items supported for paging, beyond this limit no items will return. 100
anomalies (array) An array of anomalies. See below

GroupAnomaly Array

Value Description Example
id Anomaly Id 2af8dcb64b3520178dd115345af28bc3
mergedIds (array) Ids of anomalies that were merged into this anomaly group. [ "1111111111111cff9ffb666814ef311b", "2222222222222cff9ffb666814ef311b" ]
state (string) State of anomaly - Enum: [open, closed] closed
resolution (string) Time scale of the anomaly metrics. Enum: [ small, medium, long, longlong, weekly ] medium
startDate (integer) Start date of the anomaly. 1470045775
endDate (integer) End date of the anomaly. 1470218575
score (double) Anomaly score in [0, 1]. (inclusive) 0.95
duration (integer) Anomaly duration in seconds. 300
metrics (array) See Metric Array below

Metric Array

Value Description Example
compositeId (string) Id of the composite definition generating the metric (null for non composite metrics). 111111122222222333333
score (double) Anomaly score in [0, 1]. (inclusive) 0.2
upperAbsoluteDelta (double) Absolute breach delta relative to the upper baseline 30.7
upperPercentageDelta (double) Percentage breach delta relative to the upper baseline 70.9
lowerAbsoluteDelta (double) Absolute breach delta relative to the lower baseline 20.5
lowerPercentageDelta (double) Percentage breach delta relative to the lower baseline 60.4
state (string) Anomaly state - open or closed open
lastNormalTime (ineteger) Last epoch time the metric recieved sample within the baseline band 1470218575
timestamp (integer) Last server time (epoch in seconds) of when the abnormal metric was reported 1470218575
currentAnomalyIntervals (array) See AnomalyInterval Array below

AnomalyInterval Array

Value Description Example
startDate (integer) Start time of the anomaly interval (epoch in seconds) 1470045775
endDate (integer) End of the anomaly interval (epoch in seconds), null for open anomalies 1470218575
state (string) Anomaly interval state, open or closed open
score (double) Anomaly score in [0, 1]. (inclusive) 0.67
directionUp (boolean) Boolean indicating the anomaly interval direction true
type (string) Anomaly classification. transient or pattern_change transient
peakValue (double) Anomaly interval peak value 60.8
absoluteDelta (double) Absolute breach delta relative to the baseline 45.8
percentageDelta (double) Percentage breach delta relative to the baseline 34.12

Count Anomalies

Request Example: Get count of anomalies

curl -X GET 'https://app.anodot.com/api/v2/anomalies/count?startDate=1648512000&endDate=1648598400&resolution=short,medium,long,longlong,weekly' \
-H 'Authorization: Bearer {bearer-token} \
-H 'Content-Type: application/json'

Get a total number of anomalies identified by Anodot for a time frame. Note that all the filters which you can use in the List Anomalies call apply here. It is recommended to use at elast the resolution parameter - otherwise you will get a subset of the results.

Argument Description
startDate (integer) Filter anomalies that started after this given time (inclusive). Units are epoch in seconds.
endDate (integer) Relevant only when requesting closed anomalies, only anomalies that started before the given time are retrieved (inclusive). Units are epoch in seconds.
resolution (string) Include anomalies of the listed timescales,
currently supported timescales are: {short (1 min), medium (5 min), long (1 hour), longlong (1 day), weekly}.
The list passed should be comma separated string list, i.e. 'short,medium'. If you do not send this parameter, the default is 'medium'.

Response

Response Example

{
    "total": 1819
}
Value Description
total (integer) Total Anomalies

Get Anomalies token map

End Point Prefix: /api/v2/anomalies/tokenMap

curl --location --request GET 'https://app.anodot.com/api/v2/anomalies/tokenMap?anomalyId=36862597743148e0b2d70f95a5f56339&resolution=longlong' \
--header 'Authorization: Bearer {bearer-token}

Retrieves the token map for an anomaly if exists. Notice that all the below parameters are appended to the URL and the body remains empty.

Argument Description
q * (string) Search Query - include only anomalies of abnormal metrics that are part of the given search query (mandatory when no anomalyId is passed)
anomalyId (string) Filter by specific anomaly Id (mandatory when no q is passed)
startDate (integer) Filter anomalies that started after this given time (inclusive). Units are epoch in seconds.
endDate (integer) Relevant only when requesting closed anomalies, only anomalies that started before the given time are retrieved (inclusive). Units are epoch in seconds.
state (string) Anomaly state {open, closed, both}
resolution (string) Include anomalies of the listed timescales,
currently supported timescales are: {short, medium, long, longlong, weekly}.
The list passed should be comma separated string list. This parameter is mandatory when using anomlayId.
durationUnit (string) Can be one of the following: {seconds, minutes, hours, days}.
durationValue (integer) Minimum anomaly duration. Units are based on durationUnits.
score (number) Minimum anomaly score in range (0,1) (inclusive).
sort (string) Sort by (startData, endDate, duration, score)
bookmark (string) Filter by bookmarks. The following options are available:
all - filter bookmarked anomalies.
none - filter anomalies with no bookmarks.
user_id - filter anomalies that are bookmarked by the given user.
* - filter anomalies that are not bookmarked by the given user.
order (string) Sort order {asc, desc}.
valueDirection (string) Direction of the anomaly breach - one of {down, up, both}
delta (number) Delta of the metric anomaly peak relative to the baseline. Delta type can be: percentage or absolute.
delta (number) Delta of the metric anomaly peak relative to the baseline. Units are based on the deltaType.
tokenMapClustersLimit (integer) Number of token map clusters to fetch
toklenMapClusterLimit (integer) Max number of tokens to include per cluster

Response

Response Example:

[
  {
    "key": "what",
    "value": "errors",
    "weight": 1.53303,
    "tokens": [
      {
        "key": "server",
        "value": "my_server_name01",
        "weight": 0.7,
        "anomalyOccurrences": 30,
        "totalOccurrences": 309
      }
    ],
    "anomalyOccurrences": 30,
    "totalOccurrences": 309
  }
]

An array of key-values with tokens of the specific anomaly.

Argument Description
Key (string) Token Key.
Value (String) Token value.
weight (number) weight of the token
anomalyOccurances (number) How many abnormal metrics of the cluster measure (what)
totalOccurances (number) The number of metrics in the cluster measure (what)

Get Anomaly Metrics

End Point Prefix: **/api/v2/anomalies/{anomalyId}/metrics

curl --location --request GET 'https://app.anodot.com/api/v2/anomalies/36862597743148e0b2d70f95a5f56339/metrics?startDate=1614507300' \
--header 'Authorization: Bearer {bearer-token}'

Get anomaly data, used in anomaly investigation view. Used to fetch a single anomaly including the abnormal metrics data points.

Argument Description
anomalyId (String) (Required) The Id of the anomaly
startDate (Integer) Filter anomalies that started after this given time (inclusive). Units are epoch in seconds.
endDate (Integer) Relevant only when requesting closed anomalies. Filter anomalies that started before this given time (inclusive). Units are epoch in seconds.
q (String) Search query - include only abnormal metrics what are part of the given search query.
state (String) Anomaly State {open, closed, both}
resolution (string) Include anomalies of the listed timescales: {short, medium, long, longlong, weekly}. The list passed should be a comma seperated string list.
durationUnit (String) Can be one of the following: {seconds, minutes, hours, days}
durationValue (Integer) Minimum anomaly duration. Units are based on durationUnits
score (Number) Minimum anomaly score (between 0 and 1)
sort (String) Sort by {startDate, endDate, duration, score}
order (String) Sort order {asc, desc}
index (integer) Metrics starting index (for paging the results)
valueDirection (String) Direction of the anomaly breach - one of {down, up, both}
deltaType (String) Delta of the metric anomaly peak relative to the baseline. Delta type can be percentage or absolute.
delta (Number) Delt aof the metric anomaly peak relative to the baseline. Units are based on the deltaType

Response Example:

{{
  "id": "2af8dcb64b3520178dd115345af28bc3",
  "mergedIds": [
    "1111111111111cff9ffb666814ef311b",
    "2222222222222cff9ffb666814ef311b"
  ],
  "state": "closed",
  "resolution": "medium",
  "startDate": 1470045775,
  "endDate": 1470218575,
  "score": 0.95,
  "duration": 300,
  "metrics": [
    {
      "compositeId": "111111122222222333333",
      "score": 0.2,
      "upperAbsoluteDelta": 30.7,
      "upperPercentageDelta": 70.9,
      "lowerAbsoluteDelta": 30.7,
      "lowerPercentageDelta": 70.9,
      "state": "open",
      "lastNormalTime": 1470218575,
      "timestamp": 1470218575,
      "currentAnomalyIntervals": [
        {
          "startDate": 1470045775,
          "endDate": 1470218575,
          "state": "open",
          "score": 0.67,
          "directionUp": true,
          "type": "transient",
          "peakValue": 60.8,
          "absoluteDelta": 45.8,
          "percentageDelta": 34.12
        }
      ]
    }
  ]
}

Get Metric Anomalies

End Point Prefix: /api/v2/anomalies/{anomalyId}/metric/{metricId}

curl --location --request GET 'https://app.anodot.com/api/v2/anomalies/36862597743148e0b2d70f95a5f56339/metric/bctele.0.SSSY8i9l3GIoH.RUNNING.data-lag?startDate=1614507300' \
--header 'Authorization: Bearer {bearer-token} \
Argument Description
anomalyId (String) (Required) The Id of the anomaly
metricId (String) (Required) The Name of the metric. Example: what=cpu.server=ano1.dc=ny
startDate (Integer) Filter anomalies that started after this given time (inclusive). Units are epoch in seconds.
endDate (Integer) Relevant only when requesting closed anomalies. Filter anomalies that started before this given time (inclusive). Units are epoch in seconds.
resolution (string) Include anomalies of the listed timescales: {short, medium, long, longlong, weekly}. The list passed should be a comma seperated string list.

Response Example:

{
  "compositeId": "111111122222222333333",
  "score": 0.2,
  "upperAbsoluteDelta": 30.7,
  "upperPercentageDelta": 70.9,
  "lowerAbsoluteDelta": 30.7,
  "lowerPercentageDelta": 70.9,
  "state": "open",
  "lastNormalTime": 1470218575,
  "timestamp": 1470218575,
  "currentAnomalyIntervals": [
    {
      "startDate": 1470045775,
      "endDate": 1470218575,
      "state": "open",
      "score": 0.67,
      "directionUp": true,
      "type": "transient",
      "peakValue": 60.8,
      "absoluteDelta": 45.8,
      "percentageDelta": 34.12
    }
  ]
}

Users and Groups

The below end-points are meant to help you better understand how users in your account are using Anodot. This section will be growing in the near future. Stay tuned!

Authentication type: Access Token Authentication.

Get list of Users

Request Example: Getting all users in the account

curl -X GET 'https://app.anodot.com/api/v2/users' \
-H 'Authorization: Bearer {{bearer-token}}' \
-H 'Content-Type: application/json'

Get the list of all users in the account. This request has no body

Response Fields

Response Example:

[
    {
        "_id": "608e9f23980ab6000ed6f696",
        "createdAt": "2021-05-02T12:46:27.823Z",
        "firstName": "Wiley",
        "lastName": "Coyote",
        "email": "wiley.coyote@acme.com",
        "roles": [
            "customer-user"
        ],
        "disabled": false,
        "ownerOrganization": "5ffc5ca1c4b329000e9d1063",
        "groups": [],
        "defaultGroup": ""
    },
    {
        "_id": "5ffc5ca3c4b329000e9d1065",
        "createdAt": "2021-01-11T14:11:47.052Z",
        "firstName": "Roger",
        "lastName": "Rabbit",
        "email": "roger.rabbit@acme.com",
        "roles": [
            "customer-admin"
        ],
        "disabled": false,
        "ownerOrganization": "5ffc5ca1c4b329000e9d1063",
        "groups": [
            "5ffc6662c4b329000e9d1066"
        ],
        "defaultGroup": "5ffc6662c4b329000e9d1066",
        "lastActive": "2021-04-05T11:23:15.476Z"
    }
]

The response is an array of "user" items. Each one of them has the following fields:

Field Type Description / Example
id String ($uuid) The unique user id
createAt timestamp Time when the user was created.
firtName String First name of the user
lastName String Last name of the user
email String email of the user
roles enum user role. Could be one of the following: {'customer-user', 'customer-admin'}
disabled boolean false if the user is active, true if the user is disabled.
ownerOrganization String ($uuid) This is the customerID - this will be identical for all the users in your account.
groups array List of groupIDs to which the user belongs (or empty if that user does not belong to any group).
defaultGroup String ($uuid) groupID of the default group to which the user belongs to.
lastActive timestamp Time when the user was last active. Will not be sent of the user was never active.

Create User

Request Example: Create a new user in the account

curl --location --request POST 'https://app.anodot.com/api/v2/users' \
--header 'Authorization: Bearer {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "emails": [
        "wiley.coyote@acme.com"
    ],
    "groups": [
            "62b8622e3f062e000f8be297"
        ],
    "defaultGroup": "62b8622e3f062e000f8be297",
    "role": "customer-user",
    "personalMsg": "Welcome to Anodot"
}'

Create a user in the account

Request Fields

Field Type Description / Example
emails String User email
groups array List of groupIDs to which the user belongs (or empty if that user does not belong to any group).
defaultGroup String ($uuid) groupID of the default group to which the user belongs to.
role enum which role should the user be assigned. Available options are "customer-user" and "customer-read-only". We do not recommend creating admin users using API so this is blocked.
personalMsg String Welcome message the user will get in their registration email.

Response Fields

Response Example: invalid email

{
    "users": null,
    "groups": null,
    "validationResult": {
        "passed": false,
        "failures": [
            {
                "email": "wiley.coyote@acmecom",
                "message": "Some mail addresses are not valid."
            }
        ]
    }
}

The response is a "user" object. See the Get User call for details.

Get List of Groups

The below end-points are meant to help you better manage groups in your Anodot account. Authentication type: Access Token Authentication.

Request Example: Getting list of all groups in the account

curl -X GET 'https://app.anodot.com/api/v2/groups' \
-H 'Authorization: Bearer {{bearer-token}}' \
-H 'Content-Type: application/json'

Get the list of all groups in the account. This request has no body

Response Fields

Response Example:

[
    {
        "id": "6107947dac294a324f042789",
        "name": "Test Gr1",
        "created": "2021-08-02T06:45:17.817Z",
        "modified": "2021-09-09T12:39:47.177Z"
    },
    {
        "id": "610f6b0696d0a2478bef06f6",
        "name": "Test Gr2 - rename",
        "created": "2021-08-08T05:26:30.137Z",
        "modified": "2021-10-12T07:39:46.058Z"
    }
]

The response is an array of "group" items. Each one of them has the following fields:

Field Type Description / Example
id String ($uuid) The unique group id
name String Group name
created timestamp Time when the group was created.
modified timestamp Time when the group was modified.

Create Group

Request Example: Creating a new group in the account

curl -X POST 'https://app.anodot.com/api/v2/groups' \
-H 'Authorization: Bearer {{data-token}}' \
-H 'Content-Type: application/json'
--data-raw '{
    "name": "AnodotOps"
}'

Create a group in the account.

Request Parameters Field | Type | Description / Example -|-|- name | String | Group name

Response Fields

Response Example:

{
    "colorSchema": "gray",
    "users": [],
    "_id": "62e8e76d6e2440000f38f117",
    "ownerOrganization": "5fc35adc94bd29000ef14b3d",
    "createdBy": "60f943f57fb4d5000f919610",
    "name": "AnodotOps",
    "created": "2022-08-02T08:59:25.737Z",
    "modified": "2022-08-02T08:59:25.737Z",
    "__v": 0
}

The response is an a group object with all the parameters.

Field Type Description / Example
colorSchema enum Color which is assigned to the group. Default is "gray".
users array Array of users assigned to the group. Since this group is new, it should be empty.
_id String ($uuid) The unique group id
ownerOrganization String ($uuid) ID of the account.
name String Group name
created timestamp Time when the group was created.
modified timestamp Time when the group was modified.

Forecast

Endpoint: GET /api/v2/forecast/

Anodot Autonomous Forecast is an additional product on top of Anodot, enabling the customer to get continous forecast for specific metrics.
The forecast product is based on Tasks which are running in Anodot. The tasks are providing the projected values of metrics based on previous behaviour. You can consider tasks as a kind of stream which sends forecast metrics into your account, enabling you to build dashboards on top of them.

The data hierarchy is as follows: Forecast Tasks --> Each task has metrics --> Each metric has forecast values (or results). So a good way to traverse all the information would be:

New! We recently added a way to get the metrics directly regardless of tasks. For this please use the following:

Authentication type: Access Token Authentication.

GET forecast tasks

Request Example: Getting all tasks in the account

curl --location --request GET 'https://app.anodot.com/api/v2/forecast/tasks' \
--header 'Authorization: Bearer {{data-token}}' \
--data-raw ''

Get the list of forecast tasks

Response Fields

Response Example:

[
    {
        "forecastTaskId": "565fda42-d3ab-46da-9fe2-d9a57bcf43cf",
        "forecastTaskName": "Forecast_20210411_aws"
    }
]

The response is an array of forecast tasks. Each one of them has the following fields:

Field Type Description / Example
forecastTaskId String ($uuid) Unique identifier of the forecast task.
forecastTaskName String Readable name of the forecast task (to be used going forward in creating dashboards, etc.)

GET forecast results per task

Request Fields

Request Example: Get forecast results for a specific task

curl --location --request GET 'https://app.anodot.com/api/v2/forecast/tasks/{{forecast-taskid}}/results' \
--header 'Authorization: Bearer {{data-token}}' \
--data-raw ''

This call gets all the results for a specific task. This returns the results for all the metrics in the task.

Field Type Description / Example
forecastTaskId String ($uuid) Unique identifier of the forecast task (you can get this from the GET Forecast Tasks call).

Response Fields

Response Example:

{
  {
    "forecastResults": [
        {
            "last_forecast_ts": "1620000000",
            "last_updated_ts": "1620119209",
            "metric_id": "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSBackup.UnblendedCost",
            "points": [
                {
                    "lowerBand": 0.4523230493,
                    "timestamp": 1620086400,
                    "upperBand": 0.9068104625,
                    "value": 0.5088179708
                },
                {
                    "lowerBand": 0.5381199121,
                    "timestamp": 1620172800,
                    "upperBand": 1.0131766796,
                    "value": 0.6004434824
                },
                {
                    "lowerBand": 1.136085391,
                    "timestamp": 1620259200,
                    "upperBand": 1.7545015812,
                    "value": 1.2390322685
                },
                {
                    "lowerBand": 1.1384156942,
                    "timestamp": 1620345600,
                    "upperBand": 1.7573906183,
                    "value": 1.2415208817
                }
            ]
        },
        {
            "last_forecast_ts": "1620000000",
            "last_updated_ts": "1620119208",
            "metric_id": "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSCloudTrail.UnblendedCost",
            "points": [
                {
                    "lowerBand": 110.9317855835,
                    "timestamp": 1620086400,
                    "upperBand": 114.520149231,
                    "value": 113.305770874
                },
                {
                    "lowerBand": 215.4238891602,
                    "timestamp": 1620172800,
                    "upperBand": 220.5315246582,
                    "value": 218.9199981689
                },
                {
                    "lowerBand": 112.3378067017,
                    "timestamp": 1620259200,
                    "upperBand": 115.9466094971,
                    "value": 114.726890564
                },
                {
                    "lowerBand": 206.5173797607,
                    "timestamp": 1620345600,
                    "upperBand": 211.495513916,
                    "value": 209.9178314209
                }
            ]
        }
    ]
}

The response itself looks as following:

Field Type Description / Example
last_forecast_ts timestamp (in epoch) The last timestamp which the forecast was done from, meaning the date from which the forecast is done forward. For example, for a daily forecast of 7 days, the last_forecast_ts can be the epoch of 5.5.2021, and then the resulting 7 days will be of 6.5.2021, 7.5.2021 etc.
last_updated_ts timestamp (in epoch) The time that this record was updated.
metric_id String Name of forecast metric
points Array An array of forecast data points.

GET forecast metrics

Request Fields

Request Example: Get forecast metrics

curl --location --request GET 'https://app.anodot.com/api/v2/forecast/metrics' \
--header 'Authorization: Bearer {{data-token}}' \
--data-raw ''

This call gets all the forecast metrics in the account

The request has no input fields

Response Fields

Response Example:

{
    "forecastMetrics":
        [
            "3afa10d8-ba60-45aa-aef1-e5b9e5edd01b.0014P00002QZllCQAT.VOLUME_SUM", "ff761ee7-74db-4f26-9293-c242fe55e7b4.sumSeries", 
            "3afa10d8-ba60-45aa-aef1-e5b9e5edd01b.0014P00002QZljTQAT.VOLUME_SUM" 
        ]
}
Field Type Description / Example
metric_id Array An array of forecast metric

GET task metrics

This call gets all the metrics for a specific task.

Request Fields

Request Example: Get forecast metrics for a specific task

curl --location --request GET 'https://app.anodot.com/api/v2/forecast/tasks/{{forecast-taskid}}/metrics' \
--header 'Authorization: Bearer {{data-token}}' \
--data-raw ''
Field Type Description / Example
forecastTaskId String ($uuid) Unique identifier of the forecast task (you can get this from the GET Forecast Tasks call).

Response Fields

Response Example:

[
    {
        "forecastMetrics": [
            "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSBackup.UnblendedCost",
            "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSCloudTrail.UnblendedCost",
            "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSConfig.UnblendedCost",
            "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSCostExplorer.UnblendedCost",
            "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSELB.UnblendedCost",
            "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSEvents.UnblendedCost",
            "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSGlue.UnblendedCost"
        ],
        "forecastTaskId": "565fda42-d3ab-46da-9fe2-d9a57bcf43cf"
    }
]

The response is list of metric IDs covered by this task.

GET forecast results per task

Request Fields

Request Example: Get forecast results for a specific metric per task

curl --location --request GET 'https://app.anodot.com/api/v2/forecast/tasks/{{forecast-taskid}}/metrics/{{forecast-metricId}}/results' \
--header 'Authorization: Bearer {{data-token}}' \
--data-raw ''

This call gets all the forecast results for a specific metric of a given task.

Field Type Description / Example
forecastTaskId String ($uuid) Unique identifier of the forecast task (you can get this from the GET Forecast Tasks call).
metricID String ($uuid) Unique identifier of the forecast metric (you can get this from the GET Task Metrics call).

Response Fields

Response Example:

{
    "forecastResults": {
        "last_forecast_ts": "1620000000",
        "last_updated_ts": "1620119209",
        "metric_id": "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSBackup.UnblendedCost",
        "points": [
            {
                "lowerBand": 0.4523230493,
                "timestamp": 1620086400,
                "upperBand": 0.9068104625,
                "value": 0.5088179708
            },
            {
                "lowerBand": 0.5381199121,
                "timestamp": 1620172800,
                "upperBand": 1.0131766796,
                "value": 0.6004434824
            },
            {
                "lowerBand": 1.136085391,
                "timestamp": 1620259200,
                "upperBand": 1.7545015812,
                "value": 1.2390322685
            },
            {
                "lowerBand": 1.1384156942,
                "timestamp": 1620345600,
                "upperBand": 1.7573906183,
                "value": 1.2415208817
            }
        ]
    }
}

The response is an array of forecast results. A forecast result will be a set of predicted data points per metric. A data point has a value and a lower band and upper band of forecast, all at a given time stamp. See GET Forecast Results for the details.

GET forecast results

Request Fields

Request Example: Get forecast results for a specific metric

curl --location --request GET 'https://app.anodot.com/api/v2/forecast/metrics/{{forecast-metricId}}/results' \
--header 'Authorization: Bearer {{data-token}}' \
--data-raw ''

This call gets all the forecast results for a specific metric regardless of the task.

Field Type Description / Example
metricID String ($uuid) Unique identifier of the forecast metric (you can get this from the GET Task Metrics call or from the GET Metrics call).
forecastFunction (Optional) enum A function which enables aggregation of forecast metrics. Possible values: DAILY_SUM, MONTHLY_SUM, QUARTERLY_SUM, YEARLY_SUM.

Response Fields

Response Example:

{
    "forecastResults": {
        "last_forecast_ts": "1620000000",
        "last_updated_ts": "1620119209",
        "metric_id": "92fe84ca-97c7-4b27-b993-c53fbb7be33a.AWSBackup.UnblendedCost",
        "points": [
            {
                "lowerBand": 0.4523230493,
                "timestamp": 1620086400,
                "upperBand": 0.9068104625,
                "value": 0.5088179708
            },
            {
                "lowerBand": 0.5381199121,
                "timestamp": 1620172800,
                "upperBand": 1.0131766796,
                "value": 0.6004434824
            },
            {
                "lowerBand": 1.136085391,
                "timestamp": 1620259200,
                "upperBand": 1.7545015812,
                "value": 1.2390322685
            },
            {
                "lowerBand": 1.1384156942,
                "timestamp": 1620345600,
                "upperBand": 1.7573906183,
                "value": 1.2415208817
            }
        ]
    }
}

The response is an array of forecast results. A forecast result will be a set of predicted data points per metric. A data point has a value and a lower band and upper band of forecast, all at a given time stamp. See GET Forecast Results for the details.

GET forecast results history

Request Fields

Request Example: Get forecast results for a specific metric

curl --location --request GET 'https://app.anodot.com/api/v2/forecast/metrics/{{forecast-metricId}}/history?for_date=1541618139' \
--header 'Authorization: Bearer {{data-token}}' \
--data-raw ''

This call gets all the forecast results for a specific metric regardless of the task.

Field Type Description / Example
metricID String ($uuid) Unique identifier of the forecast metric (you can get this from the GET Task Metrics call or from the GET Metrics call).
for_date timestamp (epoch) The date for which to get the historical forecast results.

Response Fields

Response Example:

{
    "Actual": {
        "points": [
            {
                "timestamp": 1560384000,
                "value": 107.8399963379
            },
            {
                "timestamp": 1565827200,
                "value": 0
            },
            {
                "timestamp": 1565913600,
                "value": 0
            },
            {
                "timestamp": 1566086400,
                "value": 0
            },
            {
                "timestamp": 1566172800,
                "value": 98.3499984741
            },
            {
                "timestamp": 1566345600,
                "value": 0
            },
            {
                "timestamp": 1570752000,
                "value": 0
            },
            {
                "timestamp": 1571270400,
                "value": 0
            },
            {
                "timestamp": 1571443200,
                "value": 0
            },
            {
                "timestamp": 1572220800,
                "value": 0
            }
        ]
    },
    "Forecast": {
        "last_forecast_ts": "1634688000",
        "last_updated_ts": "1636378064",
        "metric_id": "3afa10d8-ba60-45aa-aef1-e5b9e5edd01b.0014P00002QZfjeQAD.VOLUME_SUM",
        "points": [
            {
                "lowerBand": 9870080,
                "timestamp": 1541635200,
                "upperBand": 9879956,
                "value": 9875018
            },
            {
                "lowerBand": 9960603,
                "timestamp": 1541721600,
                "upperBand": 9970569,
                "value": 9965586
            },
            {
                "lowerBand": 10056923,
                "timestamp": 1541808000,
                "upperBand": 10066985,
                "value": 10061954
            },
            {
                "lowerBand": 9589967,
                "timestamp": 1541894400,
                "upperBand": 9599561,
                "value": 9594764
            },
            {
                "lowerBand": 11604541,
                "timestamp": 1541980800,
                "upperBand": 11616151,
                "value": 11610346
            },
            {
                "lowerBand": 11557702,
                "timestamp": 1542067200,
                "upperBand": 11569266,
                "value": 11563484
            },
            {
                "lowerBand": 11614124,
                "timestamp": 1542153600,
                "upperBand": 11625744,
                "value": 11619934
            },
            {
                "lowerBand": 13145074,
                "timestamp": 1542240000,
                "upperBand": 13158226,
                "value": 13151650
            }
        ]
    }
}

The response is built of two arrays:

-- Information you need to Know --

Rates and Limits

Specific end-points have different limits, please see the table below:

End Point Rate Limit (RPM)
Post metrics 5000 RPM for all post-metrics calls
Alert configuration 500 RPM for all alerts API calls
Alert triggers 500 RPM for all triggers API calls
Anomaly 1000 RPM for all anomaly API calls
Feedback GET - 50 RPM
Stream POST/PUT - 1 RPM
GET - 10 RPM
DELETE - 15 RPM
Cardinality 50 RPM for all cardinality API calls

The overall number of entities is limited according to the terms of use or your specific contract.

Response Codes

HTTP Responses

Anodot APIs use HTTP status codes to indicate the success or failure of a request.

An error indicates that the service did not successfully handle your request. In addition to the status code, the response may contain a JSON object with an errors array containing more detailed error messages (see Error response format bellow).

If the service is able to handle your request, but some issues are present (e.g. one of the metric sent has an illegal timestamp but all the reset are ok), the HTTP status code will indicate success and the response body will contain the expected result with the addition of errors array containing detailed error messages.

HTTP Status Codes

Error Code Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Server error

Error Response Fields

Error Response Example

{ 
  “errors”:[ 
    {
      "index":"failed sample index",
      “error”: "<error code>", 
      “description”:”error description” 
    } 
  ] 
}
Field Description
errors An array of errors received from the request
index In case a batch of records was sent in the request, the index directs to the faulty entry
error Error code
description The error Description

The error code list

Anodot Error Codes

Error Code Description
1001 Json parsing error
1002 General error
1004 API calls rate exceeded the maximum allowed
1005 Number of streams exceeded the maximum allowed
1006 Number of incomplete streams exceeded the maximum allowed
1007 Number of Data Sources exceeded the maximum allowed
2001 Token is not active
2002 Too many concurrent requests
2003 Metrics per seconds limit reached
2004 Metric properties are not defined. Must have at least one property.
2005 Metric properties limit exceeded. Metric may contain up to: {xxx} properties.
2006 Undefined property key. Metric property key must contain at least 1 character.
2007 Property: ''{xxx}'' key length exceeded. maximum key length is {yyy} characters.
2008 Undefined property value. Metric property value must contain at least 1 character.
2009 Property: ''{xxx}'' value length exceeded. Maximum value length is {yyy} characters .
2010 Property key: ''{xxx}'' contains illegal characters. ''.'' character and space characters are not allowed.
2011 Property value: ''{xxx}'' contains illegal characters. ''.'' character and space characters are not allowed.
2012 Property: ''what'' is undefined. ''what'' is a mandatory property that specified what is being measured by this metric.
2013 Metric tags limit exceeded. Metric may contain up to: {xxx} tags.
2014 Undefined tag key. Metric tag key must contain at least 1 character.
2015 Tag: ''{xxx}'' key length exceeded. Maximum key length is {yyy} characters.
2016 Undefined tag value. Metric tag value must contain at least 1 character.
2017 Tag: ''{xxx}'' value length exceeded. Maximum value length is {yyy} characters.
2018 Tag key: ''{xxx}'' contains illegal characters. ''.'' character and space characters are not allowed.
2019 Tag value: ''{xxx}'' contains illegal characters. ''.'' character and space characters are not allowed.
2020 Metric timestamp is undefined. Timestamp must be an epoch time in seconds.
2021 Metric timestamp: ''{xxx}'' is not a valid epoch time. Timestamp must be an epoch time in seconds.
2022 Metric timestamp: ''{xxx}'' is in the future. Timestamp must be an epoch time in seconds.
2023 Metric timestamp: ''{xxx}'' is negative. Timestamp must be an epoch time in seconds.
2024 Metric value is undefined. The ''value'' must be a valid decimal double precision number.
2025 Metric value: ''{xxx}'' is not a valid decimal number. The ''value'' must be a valid decimal double precision number.
2026 Metric value is NaN or Infinite
2027 Metric name is null or empty
2028 Metric name length exceeded the maximum allowed: {xxx}.
2029 Invalid protocol - supported protocols are: {xxx}.
2030 Invalid target type: ''{xxx}''. valid values are: {yyy}.

Alerts

This section lists Alert configuration and Alert trigger APIs

Alert Configuration

End Point prefix is /api/v2/alerts

Use the Alert Config API to:

Authentication type: Access Token Authentication.

List all alert configurations

Request Example: Get All Alert Configurations

curl -X GET \
"https://app.anodot.com/api/v2/alerts" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API to get All Alert Configurations and their respective ID's

Response Fields

Response Example:

[
  {
    "id": "20262fb3-00ba-412c-a515-aec74c4824cd",
    "meta": {
      "createdTime": 1513760272,
      "modifiedTime": 1513760272,
      "createdBy": "string",
      "modifiedBy": "string",
      "creatorId": "20262fb3-00ba-412c-a515-aec74c4824cd",
      "modifierId": "20262fb3-00ba-412c-a515-aec74c4824cd",
      "associatedDashboardTile": {
        "dashboardId": "20262fb3-00ba-412c-a515-aec74c4824cd",
        "tileId": "30262fb3-00ba-412c-a515-aec74c4824cd"
      }
    },
    "configuration": {
      "labels": [
          {
              "name": "documentation"
          },
          {
              "name": "API"
          }
      ],
      "timeScale": "5m",
      "type": [
        "anomaly"
      ],
      "title": "Jetty servers availability",
      "owner": "user@domain.com",
      "description": "This alerts monitors the availablity of the jetty servers",
      "search": {
        "type": "expression",
        "expression": {
          "expression": [
            {
              "type": "string",
              "key": "host",
              "value": "anodot13",
              "isExact": true
            }
          ]
        },
        "compositeId": "20262fb3-00ba-412c-a515-aec74c4824cd"
      },
      "severity": "critical",
      "isOnlyOpen": false,
      "channels": [
        "20262fb3-00ba-412c-a515-aec74c4824cd"
      ],
      "subscribers": [
        "20262fb3-00ba-412c-a515-aec74c4824cd"
      ],
      "conditions": [
        {
          "type": "delta",
          "absolute": 46.85,
          "percentage": 10,
          "deltaDuration": null,
          "enableAutoTuning": true
        },
        {
          "type": "significance",
          "id": "82be-a4e815888888",
          "significance": 0.7
        },
        {
          "type": "duration",
          "id": "82be-a4e81599999",
          "duration": 86400
        },
        {
          "type": "direction",
          "id": "82be-a4e81598765",
          "direction": "up"
        },
        {
          "type": "volume",
          "id": null,
          "value": 2596.68,
          "rollup": "weekly",
          "bound": "LOWER",
          "numLastPoints": 1,
          "enableAutoTuning": true,
          "enabled": true
        },
        {
          "type": "minParticipating",
          "id": "82be-a4e815b12345",
          "absolute": 1,
          "percentage": null
        },
        {
          "type": "threshold",
          "id": "82be-a4e815baxxxx",
          "upperBound": "greaterThan",
          "lowerBound": "lessThan",
          "upperValue": 100,
          "lowerValue": 5
        }
      ],
      "correlatedEvents": {
        "query": {
          "expression": [
            {
              "type": "string",
              "key": "host",
              "value": "anodot13",
              "isExact": true
            }
          ]
        }
      }
    },
    "state": {
      "state": "string",
      "resumeTime": 1513760272,
      "pausedTime": 1513760272,
      "pausedBy": "string",
      "pausedId": "string"
    },
    "validation": {
      "isValid": true,
      "general": [
        {
          "id": 2987,
          "message": "Alert excceded maximum amount of allowed metrics."
        }
      ]
    }
  }
]

This call will return an array of alert configurations, each one with the following structure:

Field Type Description / Example
id String Alert id. This id can be used in future calls for alert creation.
Meta Array Alert meta deta such as creation details (time, owner, etc.).
Configuration Array The configuration details for the alert. For a detailed breakdown, see Create a new alert.
State Array The current state of the alert (paused/live)

Create a new alert

Request Example: Create a new alert

curl -X POST \
"https://app.anodot.com/api/v2/alerts" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Request JSON Example:

{
  "timeScale": "5m",
  "type": [
    "anomaly"
  ],
  "title": "Jetty servers availability",
  "description": "This alerts monitors the availablity of the jetty servers",
  "search": {
    "type": "expression",
    "expression": {
      "expression": [
        {
          "type": "string",
          "key": "host",
          "value": "anodot13",
          "isExact": true
        }
      ]
    },
    "compositeId": "20262fb3-00ba-412c-a515-aec74c4824cd"
  },
  "severity": "critical",
  "isOnlyOpen": false,
  "channels": [
    "20262fb3-00ba-412c-a515-aec74c4824cd"
  ],
  "subscribers": [
    "20262fb3-00ba-412c-a515-aec74c4824cd"
  ],
  "conditions": [
    {
      "type": "delta",
      "absolute": 46.85,
      "percentage": 10,
      "deltaDuration": null,
      "enableAutoTuning": true
    },
    {
        "type": "significance",
        "significance": 0.7
    },
    {
        "type": "duration",
        "duration": 86400
    },
    {
        "type": "direction",
        "direction": "both"
    },
    {
        "type": "volume",
        "id": null,
        "value": 2596.686320664465,
        "rollup": "weekly",
        "bound": "LOWER",
        "numLastPoints": 1,
        "enableAutoTuning": true,
        "enabled": true
    },
    {
        "type": "minParticipating",
        "absolute": 1,
        "percentage": null
    },
    {
        "type": "maxParticipating",
        "absolute": null,
        "percentage": null
    },
    {
        "type": "threshold",
        "upperBound": "greaterThan",
        "lowerBound": "lessThan",
        "upperValue": 100,
        "lowerValue": 5
    }
  ],
  "correlatedEvents": {
    "query": {
      "expression": [
        {
          "type": "string",
          "key": "host",
          "value": "anodot13",
          "isExact": true
        }
      ]
    }
  },
  "labels": [
    {
        "name": "new label"
    },
    {
        "name": "API"
    }
  ]
}

Create a new alert configuration.
Please note, the new alert owner will be the token owner.

Request Arguments

Selected Request Arguments:

Argument Type Description
timescale String The timescale of the alert, valid options include (1m,5m,1h,1d,1w)
type String The type of anomaly (anomaly, static, no data)
title String The title that will appear when an alert is fired
description String The description that will appear when an alert is fired
search Array The alert query. Search by a key/value pair or via a stream ID. To get stream IDs, please see GET data streams.
severity String Add additional meta data (critical,high,medium,low and info)
isOnlyOpen Boolean Enable to get notifications on alert start and alert close
channels String Use this to determine which channels the alert will fire to. To get channel IDs, please see GET channels.
subscribers String Use this to determine which user's email the alert will fire to. To get subscriber IDs, use the GET alerts API to see an example of an alert that has already been set up with the relevant subscriber ID.
conditions Array Anomaly alerts require: direction, significance and duration conditions. Static alers require duration and threshold conditions. No data alerts require the no data duration condition.
correlatedEvents Array Determines if static events that are sent via the events API are included in the alert. Filter out events based on a key:value pair.
labels Array Assigns labels to the alert. Notice that if a label specified in the call does not exist in the system it will be created.

Get Alert by ID

Request Example:

curl -X GET \
"https://app.anodot.com/api/alerts/{alertID}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API to get a single alert configuration

Response Example:

{
    "id": "864fe6b3-32db-46f3-a7bf-bd1ca2422ef6",
    "meta": {
        "createdTime": 1617569462,
        "modifiedTime": 1627973755,
        "owner": "andt-group",
        "modifiedBy": "coyote@acme.corp",
        "ownerId": "5ffc6662c4b329000e9d1066",
        "modifierId": "5ffc6744c4b329000e9d1067",
        "associatedDashboardTile": null
    },
    "configuration": {
        "labels": [
            {
                "name": "documentation"
            },
            {
                "name": "API"
            }
        ],
        "timeScale": "1h",
        "type": [
            "anomaly"
        ],
        "title": "Anomaly on Pageviews by {{Page_Title}} from Slate API views",
        "description": "",
        "severity": "high",
        "conditions": [
            {
                "type": "direction",
                "id": "3e04-072646de894d",
                "direction": "both"
            },
            {
                "type": "duration",
                "id": "1254-7113a0ad468e",
                "duration": 7200
            },
            {
                "type": "significance",
                "id": "3d64-739d8d5b2b4c",
                "significance": 0.75
            },
            {
                "type": "delta",
                "id": "b9e4-5a5ba2e13a9d",
                "absolute": 1.0135593220338988,
                "percentage": 10,
                "deltaDuration": {
                    "enabled": false,
                    "rollup": "long",
                    "minDuration": 7200
                },
                "enableAutoTuning": true
            },
            {
                "type": "volume",
                "id": null,
                "value": 8,
                "rollup": "longlong",
                "bound": "LOWER",
                "numLastPoints": 1,
                "enableAutoTuning": true,
                "enabled": true
            }
        ],
        "channels": [
            "c5ab76da-8c30-4cee-9b70-389a3176f3cf"
        ],
        "subscribers": [
            "roadrunner@acme.corp"
        ],
        "search": {
            "type": "composite",
            "compositeId": "bcbb62cc-8112-4b04-8826-827a5d7588c9"
        },
        "correlatedEvents": null
    },
    "state": {
        "state": "active",
        "resumeTime": null,
        "pausedTime": null,
        "pausedBy": null,
        "pausedId": null
    },
    "validation": {
        "isValid": true
    }
}

Request Arguments

Argument Type Description
id String Alert id to retrieve.

Response Fields

Similar to the results returned by the List all alert configurations call.

Update Alert Configuration

Request Example:

curl -X PUT \
"https://app.anodot.com/api/v2/alerts/{alertID}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API to edit an alert

Request Arguments

Argument Type Description
id String Alert id to edit.

Notice that you will in the body of this message the updated definition of the alert. The definition is the same as the one used in the alert creation API.

Response

The updated configuration of the alert (same structure as the Get Alert call)

Delete alert

Request Example:

curl -X DELETE \
"https://app.anodot.com/api/v2/alerts/{alertID}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API to delete an alert

Request Arguments

Argument Type Description
id String Alert id to delete.

Pause Alert

Request Example:

curl -X POST \
"https://app.anodot.com/api/v2/alerts/{alertID}/pause" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API to pause an alert.

Request Arguments

Argument Type Description
id String Alert id to pause.

Resume Alert

Request Example:

curl -X POST \
"https://app.anodot.com/api/v2/alerts/{alertID}/resume" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API to resume an alert.

Request Arguments

Argument Type Description
id String Alert id to resume.

Alert Actions

End Point prefix is /api/v2/alert-actions

Using this set of API calls you can manage the Alert Actions defined in your account. For more information about Alert actions, please click here.

Authentication type: Access Token Authentication.

List all alert actions

Request Example: Get All Alert Actions

curl -X GET \
"https://app.anodot.com/api/v2/alert-actions" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer {{bearer-token}}"

Use this API to get All Alert actions and their respective ID's

Response Example:

[
    {
        "id": "61f8fad5b7eda06537d01ed2",
        "userId": "61f8f55360635d000f2c8e5d",
        "actionType": "OUTSIDE_LINK",
        "actionName": "Grafana Name",
        "btnName": "Grafana Button Name",
        "data": {
            "url": "https://acme.corp.com/grafana"
        },
        "created": 1643707093,
        "modified": 1643707093
    },
    {
        "id": "61f8fb01b7eda06537d01ed3",
        "userId": "61f8f55360635d000f2c8e5d",
        "actionType": "OUTSIDE_LINK",
        "actionName": "New Jira Name",
        "btnName": "New Jira Button",
        "data": {
            "url": "https://www.acme.com/jira"
        },
        "created": 1643707137,
        "modified": 1643728479
    }
]

Response Fields

This call will return an array of alert actions, each one with the following structure:

Field Type Description / Example
id String Alert action id. This id can be used in future calls for action modification / deletion.
userId String ID of the action owner (The user which created the action)
actionType Array The type of the action defined. Currently - only "OUTSIDE_LINK" actions are supported, but in the future additional types will be added.
actionName String Name of the action as it shows up inside Anodot. Note that this is different than the text which is actually shown on the button when the alert recipient activates the action.
btnName String The text which appears
data Array Relevant parameters for defining the action. For OUTSIDE_LINK actions, the only parameter is url.
created epoch timestamp of when the action was created
modified epoch timestamp of when the action was modified

Get alert action by ID

Request Example: Get alert action by ID

curl -X GET \
"https://app.anodot.com/api/v2/alert-actions/{{action-id}}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer {{bearer-token}}"

Use this API to get a specific alert action.

Request Arguments

Argument Type Description
id String Alert action id to retrieve.

Response Example:

[
    {
        "id": "61f9579eb7eda06537d01ed5",
        "userId": "61f8f55360635d000f2c8e5d",
        "actionType": "OUTSIDE_LINK",
        "actionName": "Postman Glory",
        "btnName": "Postman Button Name",
        "data": {
            "url": "https://acme.corp.com/postman"
        },
        "created": 1643730846,
        "modified": 1643730846
    }
]

Response Fields

Similar to the results returned by the List all alert actions call.

Create a new alert action

Create a new alert action.

Request Example: Create a new alert action

curl -X POST \
curl --location --request POST 'https://app.anodot.com/api/v2/alert-actions/create' \
--header 'Authorization: Bearer {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '[
  {
    "userId": "61f8f55360635d000f2c8e5d",
    "actionType": "OUTSIDE_LINK",
        "actionName": "Postman Glory",
        "btnName": "Postman Button Name",
        "data": {
            "url": "https://acme.corp.com/postman"
        }
    }
]'

Request Arguments

Selected Request Arguments:

Argument Type Description
userId String ID of the action owner (The user which created the action)
actionType Array The type of the action defined. Currently - only "OUTSIDE_LINK" actions are supported, but in the future additional types will be added.
actionName String Name of the action as it shows up inside Anodot. Note that this is different than the text which is actually shown on the button when the alert recipient activates the action.
btnName String The text which appears
data Array Relevant parameters for defining the action. For OUTSIDE_LINK actions, the only parameter is url.

Response Example:

[
    {
        "id": "61fa747483efad63412d2ca3",
        "userId": "61f8f55360635d000f2c8e5d",
        "actionType": "OUTSIDE_LINK",
        "actionName": "Postman Glory",
        "btnName": "Postman Button Name",
        "data": {
            "url": "https://acme.corp.com/postman"
        },
        "created": 1643803764,
        "modified": 1643803764
    }
]

Response Fields

The response will show the parameters of the created alert action together with the newly created ID and the created/modified time.

Update Alert Action

Use this API to edit an alert action

Request Example:

curl -X PUT \
"https://app.anodot.com/api/v2/alert-actions/{{actionID}}" \
--header 'Authorization: Bearer {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
        "id": "61fa747483efad63412d2ca3",
        "userId": "61f8f55360635d000f2c8e5d",
        "actionType": "OUTSIDE_LINK",
        "actionName": "What'\''s the story with",
        "btnName": "Morning Glory",
        "data": {
            "url": "https://www.acme.com/Oasis"
        }
    }
]'

Request Arguments

Argument Type Description
id String Alert action id to edit.

Notice that you need to pass the ID of the action on the URL itself as well as the in the body of the call the updated definition of the action. The definition is the same as the one used in the alert action creation API.

Response

The updated configuration of the action (same structure as the Get Alert action call)

Delete alert action

Use this API to delete an alert action

Request Example:

curl --location --request DELETE 'https://app.anodot.com/api/v2/alert-actions/{{actionID}}' \
--header 'Authorization: Bearer {{bearer-token}}' \
--data-raw ''"

Request Arguments

Argument Type Description
id String Alert action id to delete.

Response Example:

{
    "numDeleted": 1
}

Response Fields

Assuming the operation was sucessfull you will recieve in the body of the reponse a confirmation how many alerts were deleted (supposed to be 1)

Alert Triggers

The Alert Trigger Object

The Alert Trigger object is sent when an anomaly / static / no-data alert matches all its conditions. Alert Triggers can be sent in groups based on correlations, proximity in time and recipients. The Alert Triggers API manages and queries these triggers and groups.

Get Triggered Alerts

Request Example: Get Triggered Alerts

curl -X GET 'https://app.anodot.com/api/v2/alerts/triggered?startTime=1616929887&order=asc&sort=updatedTime&labels=aws%20monitoring&types=anomaly&channels=645aa58b-16d5-4945-a95a-9fc83af55ae6&severities=HIGH&status=OPEN' \
--header 'Authorization: Bearer {{bearer-token}}' 

Request Example: Get Triggered Alerts by alert configuration ID

curl -X GET 'https://app.anodot.com/api/v2/alerts/triggered?alertConfigurationIds={{alertConfigurationID}}' \
--header 'Authorization: Bearer {{bearer-token}}' 

Request Arguments

Field Type Description / Example
startTime integer Retrieve alerts which started after this time (epoch time)
order enum Can be either {asc, desc}
sort enum Can be either {startTime, updateTime, duration, score, metrics}
labels string Labels according to which the alerts are filtered.
types enum Can be one (or more) of the following: {anomaly, static, noData}
channels string Comma seperated list of channel IDs to which these alerts have been sent.
severities enum Can be one (or more) of the following: {INFO,LOW,MEDIUM,HIGH,CRITICAL}
status enum Can be either "OPEN" or "CLOSE"
size integer You can specify the max number of triggers to return. The default is 20
alertConfigurationIds string Alert configuration ID, limit the call to fetch triggers for a specific alert configuration

Response Example:

{
    "total": 1,
    "alertGroups": [
        {
            "id": "e23c3444be71438ba8d6a0fcd32bcef7",
            "name": "Anomaly on BlendedCost by ap-south-1 and eu-west-1, Hrs",
            "alerts": [
                {
                    "id": "a1af9f23-1052-4458-abb2-28e797920bcf",
                    "timeScale": "1d",
                    "type": "anomaly",
                    "status": "OPEN",
                    "groupId": "e23c3444be71438ba8d6a0fcd32bcef7",
                    "alertConfigurationId": "5218023a-13e7-4442-9d14-40c1e3ff8aaa",
                    "title": "Anomaly on BlendedCost by ap-south-1 and eu-west-1, Hrs",
                    "description": "",
                    "severity": "high",
                    "startTime": 1617148800,
                    "updateTime": 1617580800,
                    "endTime": 1617580800,
                    "duration": 432000,
                    "channels": [
                        {
                            "id": "645aa58b-16d5-4945-a95a-9fc83af55ae6",
                            "type": "webhook",
                            "name": "slack-test-spectory2"
                        },
                        {
                            "id": "b99aa3ad-c3ad-46e9-be31-11f5da16bc2f",
                            "type": "webhook",
                            "name": "Trello"
                        },
                        {
                            "id": "85bb3cab-d9e2-4b2c-870c-0335a73a930a",
                            "type": "webhook",
                            "name": "Twilio - SMS"
                        }
                    ],
                    "subscribers": [],
                    "metrics": [
                        {
                            "id": "a2c28da9-0b19-4e7e-b13e-36bb20c701f3.Hrs.ap-south-1",
                            "name": "what=BlendedCost.func=Sum.pricing_unit=Hrs.region=ap-south-1.mtype=alert",
                            "what": "BlendedCost",
                            "properties": [
                                {
                                    "key": "pricing_unit",
                                    "value": "Hrs"
                                },
                                {
                                    "key": "region",
                                    "value": "ap-south-1"
                                },
                                {
                                    "key": "func",
                                    "value": "Sum"
                                },
                                {
                                    "key": "mtype",
                                    "value": "alert"
                                }
                            ],
                            "tags": [],
                            "dataPoints": [],
                            "baseline": [],
                            "origin": {
                                "type": "ALERT",
                                "id": "5218023a-13e7-4442-9d14-40c1e3ff8aaa",
                                "title": "Anomaly_on_BlendedCost_by_{{region}},_{{pricing_unit}}_BlendedCost"
                            },
                            "status": "close",
                            "updatedTime": 1617580800,
                            "startTime": 1617148800,
                            "displayStartTime": 1615939200,
                            "displayEndTime": 1618140542,
                            "snooze": null,
                            "stopLearning": null,
                            "intervals": [
                                {
                                    "status": "CLOSE",
                                    "startTime": 1617148800,
                                    "endTime": 1617494400,
                                    "duration": 345600,
                                    "anomalyId": "e23c3444be71438ba8d6a0fcd32bcef7",
                                    "direction": "UP",
                                    "peak": 134.79038581359998,
                                    "score": 0.8065615790125528,
                                    "deltaAbsolute": 62.12345294310754,
                                    "deltaPercentage": 85.49067710594642,
                                    "sumDeltas": 194.84395965044826
                                }
                            ],
                            "upperAbsoluteDelta": 62.12345294310754,
                            "upperPercentageDelta": 85.49067710594642,
                            "lowerAbsoluteDelta": null,
                            "lowerPercentageDelta": null,
                            "impact": null
                        },
                        {
                            "id": "a2c28da9-0b19-4e7e-b13e-36bb20c701f3.Hrs.eu-west-1",
                            "name": "what=BlendedCost.func=Sum.pricing_unit=Hrs.region=eu-west-1.mtype=alert",
                            "what": "BlendedCost",
                            "properties": [
                                {
                                    "key": "pricing_unit",
                                    "value": "Hrs"
                                },
                                {
                                    "key": "region",
                                    "value": "eu-west-1"
                                },
                                {
                                    "key": "func",
                                    "value": "Sum"
                                },
                                {
                                    "key": "mtype",
                                    "value": "alert"
                                }
                            ],
                            "tags": [],
                            "dataPoints": [],
                            "baseline": [],
                            "origin": {
                                "type": "ALERT",
                                "id": "5218023a-13e7-4442-9d14-40c1e3ff8aaa",
                                "title": "Anomaly_on_BlendedCost_by_{{region}},_{{pricing_unit}}_BlendedCost"
                            },
                            "status": "open",
                            "updatedTime": 1617235200,
                            "startTime": 1617148800,
                            "displayStartTime": 1615939200,
                            "displayEndTime": 1617667201,
                            "snooze": null,
                            "stopLearning": null,
                            "intervals": [
                                {
                                    "status": "OPEN",
                                    "startTime": 1617148800,
                                    "endTime": 1617580800,
                                    "duration": 432000,
                                    "anomalyId": "e23c3444be71438ba8d6a0fcd32bcef7",
                                    "direction": "UP",
                                    "peak": 2.155577299200001,
                                    "score": 0.8899891304643669,
                                    "deltaAbsolute": 1.7445812570728427,
                                    "deltaPercentage": 425.2623051375808,
                                    "sumDeltas": 7.026737624452241
                                }
                            ],
                            "upperAbsoluteDelta": 1.7445812570728427,
                            "upperPercentageDelta": 425.2623051375808,
                            "lowerAbsoluteDelta": null,
                            "lowerPercentageDelta": null,
                            "impact": null
                        }
                    ],
                    "summary": {
                        "totalMetrics": 2,
                        "snoozedMetrics": 0,
                        "stlMetrics": 0,
                        "snoozeSummary": null,
                        "stlSummary": null
                    },
                    "stars": [],
                    "reads": [],
                    "feedback": [],
                    "impactEligible": false,
                    "impact": null,
                    "alertActions": null
                }
            ],
            "startTime": 1617148800,
            "updateTime": 1617580800
        }
    ]
}

Alert Response Fields

Field Type Description / Example
total number Number of alert groups which meet the criteria.
alertGroups Array Array of Alert Group objects.

Count Triggered Alerts

Request Example: Count Triggered Alerts

curl -X GET 'https://app.anodot.com/api/v2/alerts/triggered/count?startTime=1616929887&types=anomaly' \
--header 'Authorization: Bearer {{bearer-token}}' 

Request Arguments

Request arguments are the same as the List all triggered alerts API Call and will enable you to filter the triggered alerts count you will get.

Response Example:

{
    "total": 1
}

Alert Response Fields

Field Type Description / Example
total number Number of alert triggers which meet the criteria.

Acknowledge an Alert Trigger

Request Structure: POST /triggered/{alert-id}/acknowledge/add


curl --location --request POST 'https://app.anodot.com/api/v2/alerts/triggered/{{alert-id}}/acknowledge/add' \
--header 'Authorization: Bearer {{bearer-token}} \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId": "{{user-id}}"
}'

Acknowledge the Alert Trigger

Request Arguments

Argument Type Description
groupId string ID of the triggered alert group Required
userId application/json Required. This Id specifies which user performed the Acknowledgement.

Response

None.

Remove an Acknowledgement from an Alert Trigger

Request Structure: POST /triggered/{alert-id}/acknowledge/remove


curl --location --request POST 'https://app.anodot.com/api/v2/alerts/triggered/{{alert-id}}/acknowledge/remove' \
--header 'Authorization: Bearer {{bearer-token}} \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId": "{{user-id}}"
}'

Remove the Ack from the alert trigger

Request Arguments

Argument Type Description
groupId string ID of the triggered alert group Required
userId application/json The object that will be removed Required. This Id specifies which user is removed from the Acknowledgement.

Response

None.

Assign an Alert Trigger

Request Structure: PUT /triggered/{alert-id}/assignee


curl --location --request PUT 'https://app.anodot.com/api/v2/alerts/triggered/{{alert-id}}/assignee' \
--header 'Authorization: Bearer {{bearer-token}} \
--header 'Content-Type: application/json' \
--data-raw '{
    "assigneeId": "{{user-id}}",
    "assignerId": "{{user-id}}"
}'

Assign an Alert Trigger

Request Arguments

Argument Type Description
alertID string ID of the triggered alert group Required
assigneeId unique user identifier Required. This Id specifies to which user the alert trigger will be assigned.
assignerId unique user identifier Required. This Id specifies which user performed the Assignment.

Response

None.

Remove an Assignment from an Alert Trigger

Request Structure: DELETE /triggered/{alert-id}/assignee


curl --location --request DELETE 'https://app.anodot.com/api/v2/alerts/triggered/{{alert-id}}/assignee' \
--header 'Authorization: Bearer {{bearer-token}} \
--header 'Content-Type: application/json' \
--data-raw '{
    "assigneeId": "{{user-id}}",
    "assignerId": "{{user-id}}"
}'

Remove assignment from an Alert Trigger

Request Arguments

Argument Type Description
alertID string ID of the triggered alert group Required
assigneeId unique user identifier Required. This Id specifies to which user the alert trigger will be assigned.
assignerId unique user identifier Required. This Id specifies which user performed the Assignment.

Response

None.

Common Objects

Alert Group

Field Type Description / Example
id string(uuid) example: 20262fb3-00ba-412c-a515-aec74c4824cd.
Group Id.
name string example: Jetty servers availability. Alert name when grouping by alert configuration, empty otherwise.
alerts Array Array of Alert objects
stars String Array The ids of all the users that acknowledged the alert group

Alert

Field Type Description / Example
id string (uuid) Alert Trigger ID.
example: 20262fb3-00ba-412c-a515-aec74c4824cd
timeScale string(Enum - 1m - 5m - 1h - 1d - 1w) example: 5m
type string(Enum - no_data - static - anomaly) example: anomaly
status string(Enum - open - closed) example: open
groupId string(uuid) example: 20262fb3-00ba-412c-a515-aec74c4824ca.
Anodot automaticly groups related alert together.
This Id represents the group.
alertConfigurationId string(uuid) example: 20262fb3-00ba-412c-a515-aec74c4824ca. Alert configuration Id.
title string example: Jetty servers availability.
Alert title.
description string example: This alerts monitors the availablity of the jetty servers.
Alert description.
severity string(Enum - critical - high - medium - low - info) example: critical
Alert severity.
startTime integer(int32) example: 1512882919
Start time of the anomaly (epoch time in seconds).
updatedTime integer(int32) example: 1512882919
Last timestamp the alert was updated (epoch time in seconds).
Update means that an open metric was closed or new metric was added to the alert.
endTime integer(int32) example: 1512982919
End timestamp of the alert (epoch time in seconds). May be empty for non 'closed' alerts.
channels object array Array of channels associated with the alert.
metrics object array Array of metrics different types of alerts hold different metric interval objects.

Channels Array

Field Type Description / Example
id string example: 20262fb3-00ba-412c-a515-aec74c4824ca.
Channel Id.
type string(Enum - user - email - webhook - slack) example: email.
name string example: NOC Channel. Channel name.

Metrics Array

Field Type Description / Example
id string example: 20262fb3-00ba-412c-a515-aec74c4824ca. Metric Id.
name string example: what=cpu.metric=cpuIdle.server=anodot.dc=ny. Metric name.
what string example: cpu. Metric measurment.
properties Array Metric properties.
tags Array Metric Tags.
snooze Object Metric snooze Object.
origin Object Metric origin Object.
status string(Enum - open - closed) example: closed
updatedTime integer(int32) example: 1512982919
Last updated timestamp of the metric (epoch time in seconds).
displayStartTime integer example: 1512982919
The recommend time to display the metrics from (epoch time in seconds).
displayEndTime integer example: 1512982919
The recommend time to display the metrics until (epoch time in seconds).
intervals Array Array of metric interval breaches.
One of:
* Anomaly Metric Interval
* NoData Metric Interval
* StaticTHMetricInterval

Properties/Tags Array

Field Type Description / Example
key string example: server. Property key.
value string example: anodot32. Property value.

Metric Snooze Object

Field Type Description / Example
userId string example: 20262fb3-00ba-412c-a515-aec74c4824ca.
The Id of the user that snoozed the metric
snoozeTime integer example: 1525586116.
Epoch time (seconds) of when the metric was snoozed
resumeTime integer example: 1525586116
Epoch time (seconds) of when the metric should resume after snooze

Metric Origin Object

Field Type Description / Example
type string(Enum - alert - composite - stream) example: alert. Origin type.
id string example: 20262fb3-00ba-412c-a515-aec74c4824ca
Origin Id.
title string example: GA sessions of my application. Origin title.

Anomaly Metric Interval Object

Represents a metric anomaly caused by a baseline breach. Metric peak, deltaAbsolute, deltaPercentage are computed based on the first breach direction that occured.

Field Type Description / Example
status string(Enum - open - closed) example: closed
startTime integer(int32) example: 1512882919.
The anomaly start (epoch time in seconds).
endTime integer(int32) example: 1512982919
duration integer(int32) example: 300. Duration of the metric alert in seconds.
anomalyId string example: 20262fb3-00ba-412c-a515-aec74c4824ca. Anomaly Id.
direction string(Enum - up - down) example: up
score number(double) example: 0.99. Anomaly score between 0 to 1. Represents 0-100 in the UI.
peak number(double) example: 45.99. The highest or lowest value of the metric.
deltaAbsolute number(double) example: 3.76. The absolute delta between the metric value and the baseline sleeve.
deltaPercentage number(double) example: 10.42. The percentage delta between the metric value and the baseline sleeve.

No Data Metric Interval Object

Field Type Description / Example
status string(Enum - open - closed) example: closed
startTime integer(int32) example: 1512882919. The last time the metric was seen (epoch time in seconds).
endTime integer(int32) example: 1512982919. End timestamp of the metric alert (epoch time in seconds). null when metric is open.
duration integer(int32) example: 300. Duration of the metric alert in seconds.
lastSeenTime integer(int32) example: 1512382919. Last timestamp (epoch in seconds) the metric reported data at.

Static TH Metric Interval Object

Represents a metric static threshold breach. Metric peak is computed based on the first breach direction that occured.

Field Type Description / Example
status string(Enum - open - closed) example: closed
startTime integer(int32) example: 1512882919. Breach start time (epoch time in seconds).
endTime integer(int32) example: 1512982919. End timestamp of the metric alert (epoch time in seconds). null when metric is open.
duration integer(int32) example: 300. Duration of the metric alert in seconds.
threshold number(double) example: 40.3. The static threshold crossed by the metric.
direction string(Enum - up - down) example: up
peak number(double) example: 45.99. The highest or lowest value of the metric.

Metrics Operations

Snooze Learning

When should you use the Snooze the learning API ?

On occassions, metrics become very noisy, or out of their regular bounds. This may create several effects:

To handle these scenarios, the API allows you to:

Request Example: Stopping the learning on two metrics.

curl --location --request POST 'https://app.anodot.com/api/v1/metrics/stl/add?token={{data-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "userId": "5e3bc704bd8089000d1fbee2",
  "timeScale": "5m",
  "duration": 3600,
  "metricIds": "[m1,m2]"
}'

Use this request to snooze the learning of the metrics to a designated time.

Request Arguments

Argument Type Description
userId string The user requesting to snooze the learning
timescale Enum The timescale of the metrics. e.g. 5m
duration number The requested snooze duration in seconds.
metricIds Array of strings The array of metric ids we wish to snooze.

Resume Learning

Request Example: Resuming the learning on two metrics.

curl --location --request POST 'https://app.anodot.com/api/v1/metrics/stl/remove?token=58e5f6b3ba01b264935d99f8' \
--header 'Content-Type: application/json' \
--data-raw '{
  "userId": "58e5f6b3ba01b264935d99f9",
  "timeScale": "5m",
  "duration": 3600,
  "metricIds": "[m1,m2]"
}'

Use this request to resume the learning of the metrics you have snoozed earlier.

Request Arguments

Argument Type Description
userId string The user requesting to resume the learning
timescale Enum The timescale of the metrics. e.g. 5m
duration number The requested resume duration in seconds.
metricIds Array of strings The array of metric ids we wish to resume.

Get cardinality

End Point GET /api/v2/metrics/cardinality

Use this API to find metrics cardinality per dimension. The query returns dimensions sorted by their values caridnality with metrics examples.

Request Example: Get the cardinality of all metrics in a given time frame

curl --location --request GET 'https://app.anodot.com/api/v2/metrics/cardinality?startTime=1614771550&endTime=1614785550' \
--header 'Authorization: Bearer {bearer-token}'

Request Arguments

Name Description
startTime (Mandatory) featch metrics from startTime (Unix time in seconds). Maximum 90 days back.
endTime (Mandatory) featch metrics up to endTime (Unix time in seconds)
size size of dimensions to return
dims A comma-seperated list of dimensions to return in result.
stream Name of stream to return results for
from starting index to fetch data from (0 based integer).

Response Example:

{
    "totalMetrics": 233,
    "startIndex": 0,
    "nextIndex": 25,
    "metricsCardinality": {
        "user_name": {
            "cardinality": 72,
            "examples": [
                "what=active_streams.source_type=GOOGLE_ADS.user_name=BC_test",
                "what=active_streams.source_type=GOOGLE_ANALYTICS.user_name=BC_test.#source=athena",
                "what=active_streams.source_type=MYSQL.user_name=BC_test",
                "what=active_streams.source_type=KINESIS.user_name=BC_test",
                "what=active_streams.source_type=S3.user_name=BC_test",
                "what=active_streams.source_type=S3.user_name=BC_test",
                "what=active_streams.source_type=GOOGLE_ANALYTICS.user_name=BC_test",
                "what=active_streams.source_type=REDSHIFT.user_name=BC_test",
                "what=active_streams.source_type=SNOWFLAKE.user_name=BC_test",
                "what=active_streams.source_type=BIGQUERY.user_name=BC_test"
            ],
            "what": [
                "active_streams"
            ]
        },
        "Page": {
            "cardinality": 27,
            "examples": [
                "what=Unique_Pageviews.Page=/hc/en-us/articles/360010785800-Databricks.Page_Title=Databricks_–_Anodot",
                "what=Pageviews.Page=/hc/en-us/search?utf8=✓.Page_Title=Search_results_–_Anodot",
                "what=Pageviews.Page=/hc/en-us/articles/207878935-Anomalies-Overview.Page_Title=Anomalies_Overview_–_Anodot",
                "what=Pageviews.Page=/hc/en-us/articles/115001227989-No-Data-Alert-Webhook-Formats.Page_Title=No_Data_Alert_Webhook_Formats_–_Anodot",
                "what=Unique_Pageviews.Page=/hc/en-us/articles/115002813254-Group.Page_Title=Group_–_Anodot",
                "what=Unique_Pageviews.Page=/hc/en-us/articles/360023727754-Anodot-Agent-Overview-.Page_Title=Anodot_Agent_Overview_–_Anodot",
                "what=Pageviews.Page=/hc/en-us/articles/207214979-Delta.Page_Title=Delta_–_Anodot",
                "what=Entrances.Page=/hc/en-us/articles/207498789-Using-Statsd.Page_Title=Using_Statsd_–_Anodot",
                "what=Entrances.Page=/hc/en-us/articles/360001267433-Managing-Events-Categories.Page_Title=Managing_Events_Categories_–_Anodot",
                "what=Pageviews.Page=/hc/en-us/articles/209776765-Events-Overview.Page_Title=Events_Overview_–_Anodot"
            ],
            "what": [
                "Unique_Pageviews",
                "Entrances",
                "Pageviews"
            ]
        }
    }
}

Response

If successfull the API returns an array of cardinality objects as described below in additional to high level metadata.

Paramater Description
totalMetrics Number of metrics which meet the criteria
startIndex initial index of this call
nextIndex index of next batch of metrics (useful if you are using pagination)
cardinality The actual cardinality of the metric (Number)
examples An array containing some examples of the metric
what The measure to which this metric belongs to.

Get cardinality Per Stream

Use this API to find metrics cardinality per stream. otice that this API still uses the V1 authentication (e.g. Data token on the URL) and and not the bearer-authentication.

Request Example: Get the cardinality of all metrics in a given time frame

curl --location --request GET 'https://app.anodot.com/api/v1/metrics/cardinality/streams?sort=name&token={{data-token}}'

Request

Name Description
token (Mandatory) Data token of the account
sort (Mandatory) How to sort the results. Available values : name, size

Response Example:

{
    "streams": [
        {
            "name": "Alert_origin_4",
            "numMetrics": 66
        },
        {
            "name": "All permanently stopped streams [HOURLY]",
            "numMetrics": 1
        },
        {
            "name": "App Usage - Hourly",
            "numMetrics": 88
        },
        {
            "name": "BC Streams Stopped Aggregation",
            "numMetrics": 1
        }
    ]
}

Response

If successfull the API returns an array of stream names and the number of metrics for each one of them.

Get EPS (Events Per Second)

Request Example: Get the EPS of the top metrics in the account

curl --location --request GET 'https://app.anodot.com/api/v1/metrics/eps?token={{data-token}}&rollup=medium' 

Use this API in order to get the EPS (Events per second) of the top metrics in the account. The main use case for this is to see which metrics cause a load (if at all) at a given time. Notice that this API still uses the V1 authentication (e.g. Data token on the URL) and and not the bearer-authentication.

Request Arguments

Name Description
token (Mandatory) Data token of the account
rollup (Mandatory) Requested time scale for the EPS. Available values : short, medium, long, longlong, weekly

Response Example: Array of metric names and their EPS.

[
    {
        "metric": "bctele.0.SSS3702beLUpo.RUNNING.data-lag",
        "eps": 0.0588235
    },
    {
        "metric": "bctele.0.SSS3702beLUpo.RUNNING.samples-created",
        "eps": 0.0588235
    },
    {
        "metric": "bctele.0.SSS3702beLUpo.RUNNING.samples-invalid",
        "eps": 0.0588235
    },
    {
        "metric": "bctele.0.SSS3702beLUpo.RUNNING.rows-fetched",
        "eps": 0.0588235
    },
    {
        "metric": "bctele.0.SSS3702beLUpo.RUNNING.samples-submit",
        "eps": 0.0588235
    },
    {
        "metric": "bc.SSSvPErF5rIQT.bit.val",
        "eps": 0.0208333
    },
    {
        "metric": "bc.SSSAD7GDMwN9X.1.heartbeat",
        "eps": 0.0208333
    },
    {
        "metric": "bctele.0.SSSAD7GDMwN9X.RUNNING.data-lag",
        "eps": 0.0200803
    },
    {
        "metric": "bctele.0.SSSAD7GDMwN9X.RUNNING.rows-fetched",
        "eps": 0.0200803
    },
    {
        "metric": "bctele.0.SSSvPErF5rIQT.RUNNING.samples-invalid",
        "eps": 0.0200803
    },
    {
        "metric": "bctele.0.SSSAD7GDMwN9X.RUNNING.samples-invalid",
        "eps": 0.0200803
    }
]

Response

If successfull the API returns an array of cardinality objects as described below in additional to high level metadata.

Paramater Description
metric Metric name
eps Events per second for the metric.

Feedback

End Point GET /api/v2/feedbacks

Our users and trigger recipients give feedback (Not Interesting/Good Catch) to anomaly alert triggers via:

Use the feedback API endpoint to get the feedback instances given by your organization members, tune your alerts, map your anomalies to business cases and improve the use of Anodot by your teams.

Authentication type: Access Token Authentication.

Get Feedback

Request Example: Getting Feedback on anomaly alerts

curl -X GET \
https://app.anodot.com/api/v2/feedbacks?startDate=1647388810&endDate=1647860710' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Request Example: Getting Feedback on static alerts

curl -X GET \
https://app.anodot.com/api/v2/feedbacks/static' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Request Arguments

Argument Type Description
startTime [Required] Epoch Time the feedback was given.
Default value is "Now minus 24 hours"
endTime [Required] Epoch Time the feedback was given.
Default value is "Now".

Response Example:

{
    "total": 1,
    "feedbacks": [
        {
            "id": "b6deff91-2d8a-41c3-9605-e6d1e9edb0cf",
            "type": "GOOD_CATCH",
            "comment": "ok",
            "createdTime": 1637142124,
            "userName": "ran",
            "anomalyId": "https://app.anodot.com/#!/anomalies?ref=pd&tabs=main;0&activeTab=1&anomalies=;0(6b1ffc765925491c85c2206d05246e0f)&duration=;1(1)&durationScale=;minutes(minutes)&delta=;0(0)&deltaType=;percentage(percentage)&resolution=;longlong(longlong)&score=;0(0)&state=;both(both)&direction=;both(both)&bookmark=;()&alertId=;(1696e800-541a-41e5-b22b-b1ee220e9b81)&sort=;significance(significance)&q=;()&constRange=;1h(c)&startDate=;0(0)&endDate=;0(0)",
            "origin": "slack",
            "alerts": [
                {
                    "Id": "https://app.anodot.com/#!/r/alert-manager/edit/a038cba3-a76e-4edb-8e32-86655f7f6c12/settings",
                    "emailId": "6b1ff",
                    "alertName": "{{customer}}: possible risk [3 consecutive days!]",
                    "startTime": 1636675200,
                    "status": "OPEN",
                    "alertOwner": "CS"
                }
            ],
            "anomalyGroupId": "6b1ffc765925491c85c2206d05246e0f",
            "score": 48
        }
    ]
}

Response Fields

Field Type Description / Example
total Number Number of feedback instances included in the response
feedbacks[] Array An array of feedback instances
id String ($uuid) Feedback id
type String Type of feedback. Possible values:
* Good Catch
* Not Interesting
comment String Optional reason and comment, if provided by the user while giving the feedback.
createdTime Epoch Feedback creation time.
username String Email of the user who provided the feedback
anomalyId String Link to the anomaly Investigate page in the Anodot platform.
alerts[] Array An array of alerts related to the feedback instance.
anomalyGroupID String A unique identifier of alert group related to the feedback instance.
score Number Score of the anomaly for which the feedback was given.

Alerts Array Fields

Field Type Description / Example
Id String Link to the alert settings in the Anodot platform.
emailId String 5 characters used to identify the email.
These are also the first 5 chars of the AnomalyId.
alertName String Alert name in Anodot
startTime Epoch Alert start time
endTime Epoch [Optional] Alert end time, relevant if the alert is closed.
status String The alert status. Possible values:
* OPEN
* CLOSE.
alertOwner String The alert owner in Anodot. Possible values are:
* User first and Last name.
* Group name.

Create Feedback

Request Example:

curl -X POST \
https://app.anodot.com/api/v2/feedbacks \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-d '{
  "userId":"5e662ecxxxx61e000eaa0de8",
  "userName":"demo user",
  "triggerIds":["9e701a4b-xxxx-42e6-8799-7b6cde40b69e"],
  "type":"GOOD_CATCH",
  "origin":"api"
  }'

Feedback can be submitted in the Anodot app from The alert console, the investigation page, the insights widget and from the triggers you recieve to your inbox, slack or other channels. Use the POST call to provide your feedback using an API.

Request Arguments

Argument Type Description
userId String ($uuid) The ID of the user giving the feedback. Find this ID from your browser developer window.
userName String The first and last names of the user giving the feedback.
triggerIds Array of Strings ($uuid) A list of trigger IDs the feedback is given on, provide a single value.
type Enum Possible values:
GOOD_CATCH
NOT_INTERESETING
origin Enum Possible value:
api

Response Example

{
    "id": "ef66297a-48e8-4899-xxyy-d6b1612b1392",
    "meta": {
        "userId": "58e5f7893xxxyyyc736e701",
        "modifiedTime": 1600020701,
        "createdTime": 1600020701,
        "origin": "api"
    }
}

Response Fields

Field Type Description / Example
id string The specific feedback entry id, generated by Anodot.
meta (Object) JSON Object the fields related to the feedback entry
userId string ID of the user giving the feedback.
modifiedTime epoch Feedback entry modification time.
createdTime epoch Feedback entry creation time.
origin Enum The method this feedback entry was provided. For API calls, the value is "api"

Update Feedback

Request Example

curl -X PUT \
https://app.anodot.com/api/v2/feedbacks/{feedbackId} \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-d '{
  "userId":"5e662ecxxxx61e000eaa0de8",
  "userName":"demo user",
  "triggerIds":["9e701a4b-xxxx-42e6-8799-7b6cde40b69e"],
  "type":"GOOD_CATCH",
  "comment": "demo comment",
  "reason": "demo reason",
  "origin":"api"
  }'

To update the feedback entry with a reason and a comment:

To find the feedback id you with to update:

Request Fields

Two additional fields can be used in the PUT call:

Argument Type Description
reason string (Enum) Relevant only in NOT_INTERESTING feedback entries. Possible values:
* No Business Impact
* Incorrect Data
* Not an Anomaly
comment string Optional free text comment.

Response Example

{
    "id": "9e253017-741a-xxxx-913e-5ea250172921",
    "meta": {
        "userId": "58e5f7893xxxx2bc736e701",
        "modifiedTime": 1600021808,
        "createdTime": 1600020257,
        "origin": "api"
    }
}

Response Fields

The same fields are returned.
The modifiedTime field is updated with the PUT time.

Set Comment

Request Example:

curl --location --request POST 'https://app.anodot.com//api/v2/timeline/comments' \
--header 'Authorization: Bearer {{data-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "alertGroupId": "0f0748cfcacc42c89fbd45edce1f6dcf",
    "text": "This looks like a serious issue",
    "userId": "60d19b3148b5bf0010cdc3f4"    
}'

Use this API to add a comment to the timeline of an existing incident. This is similar to the comment being sent as part of the Update Feedback call, but without a specific feedback.

Request Arguments

Argument Type Description
alertGroupId String ($uuid) The ID of the anomaly group (a.k.a. anomalyId) to which the comment should be attached.
text String The comment text
userId String (optional) the user giving the feedback. Find this ID from your browser developer window.

Response Example

{
    "id": "61505cb6e3896c6ff4b75f24",
    "comment": "This looks like a serious issue",
    "createdTime": 1632656566
}

Response Fields

Field Type Description / Example
id string The specific comment entry id, generated by Anodot.
comment string Text which was added to the timeline
createdTime epoch Comment entry creation time.

Integrations

Incoming and outgoing integrations

Post Metrics

End Point prefix is /api/v1/metrics

Send data samples to Anodot using Metric 2.0/3.0 protocols. Both the version 2.0 and 3.0 protocols work with a schema - this means that the data is structured into key-value pairs and enables Anodot to better 'understand' and interact the metrics sent to it. The main difference between 2.0 and 3.0 is that 3.0 enable sending a 'watermark' notification to Anodot, enabling a better detection and assignment of data points to a time frame.

Use Anodot's sample code for a quick start

You can use Anodot's sample Python script to send metrics in Metrics 2.0 or 3.0 protocols.
Refer to Anodot on GitHub for more details.

Send Data Samples (3.0)

Request Example - Sending metrics (3.0)

curl --location --request POST 'https://app.anodot.com/api/v1/metrics?protocol=anodot30&token={{DC_Key}}' \
--header 'Content-Type: application/json' \
--data-raw '[
 {
   "schemaId": "111111-22222-3333-4444",
   "timestamp": “1438761780”,
   "dimensions": {
     "Geo": "US",
     "Device": "Mobile",
     "ProductCategory": "Shoes"
   },
   "measurements": {
     "measure1": “10”,
     "measure2": “25.5”
   },
   "tags": {
     "ActiveCampaignID": [
       “1234”
     ],
     "AccountManagers": [
       "JohnDoe",
       "MaryJane"
     ]
   }
 }
]'

High Level Flow

  1. Creating a Schema
  2. Sending samples matching the schema
  3. Sending watermarks timestamp to direct Anodot to process data samples up to the timestamp

Use this API to send metrics to Anodot based on a schema you've defined (Protocol 3.0) Please note that the maximal number of entries is 10K per request.

Some guidelines for using the protocol:

Request Arguments

Field Description
schemaId Id recieved from the create schema call
timestamp Integer - The data sample's timestamp (Unix epoc time in seconds). This has to be at most one hour in the future.
dimensions an array of key-value pairs of the metric dimensions.
measurements an array of a measurements - decimal double precision number, without a thousands seperator.
tags (Optional) List of tags attached to the measure. Key value pairs. Notice that tags are metadata of the metric and do not affect its uniqueness.

Send Stream Watermark (3.0)

Request Example - Sending a watermark request

curl --location --request POST 'https://app.anodot.com/api/v1/metrics/watermark?protocol=anodot30&token={{DC_Key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "schemaId": "111111-22222-3333-4444",
  "watermark": “1438770000”
}'

Use this API to send the watermark timestamp to Anodot (Only relevant for protocol 3.0). A watermark timestamp commits that no data samples with timestamps less than or equal to it will be sent.

Parameters

Field Description
schemaId Id recieved from the 'create schema' call
watermark (Integer) timestamp of the watermark (Unix epoch time in seconds)

FAQ (3.0)

Send Data Samples (2.0)

Use this API to send metrics to Anodot based on a schema you've defined (Protocol 2.0)

The “what=” property describes what is actually being measured, while the rest of the properties describe the various dimensions used to create the measure.

By adding the property name with equal sign (=) to each token, you can use the Anodot service to easily find, aggregate, manipulate and understand any metric.

The order of the property-value pairs in a 2.0 metric does not matter. All you need to do is simply be consistent with the property names, making sure that each metric has a unique name. Metrics are uniquely identified using their generated names; therefore, no two metrics should share all the same the property-value pairs.

Request Arguments

Request Example - Sending metrics (2.0)

curl --location --request POST 'https://app.anodot.com/api/v1/metrics?protocol=anodot20&token={{DC_Key}}' \
--header 'Content-Type: application/json' \
--data-raw '[
  {
    "properties": {
      "what": "NumberPurchases",
      "Geo": "US",
      "Device": "Mobile",
      "ProductCategory": "Shoes",
      "target_type": "counter"
    },
    "tags": {
      "ActiveCampaignID": [
        1234
      ],
      "AccountManagers": [
        "JohnDoe",
        "MaryJane"
      ]
    },
    "timestamp": 1438761780,
    "value": 58
  }
]'
Field Description
properties list of properties of the metrics in a key-pair value array. This array should always contain a 'what' property. See notes below on best practices using this.
tags (Optional) List of tags attached to the measure. Key value pairs. Notice that tags are metadata of the metric and do not affect its uniqueness.
timestamp Integer - The data sample's timestamp (Unix epoc time in seconds). This has to be at most one hour in the future.
value decimal double precision number, without a thousands seperator.

Some notes on the 'properties' array sent using the protocol:

Send Data Samples (1.0)

Use this API to send metrics to Anodot based on the 1.0 Metric protocol. You may use this protocol to create new metrics or submit data points for new or existing metrics. You can submit data points for multiple metrics in a single request.

Each token in a metric name represents a property describing what and where is being measured. In this convention, the position of each token reflects a property in the schema. Anodot indexes each token by its position, for example, Token1 is indexed with the property Pos1. When searching for metrics, the position property can be used to find the right set of metrics

Metric 1.0 will look like this: Token1.Token2.Token3...tokenN.value

Request Arguments

Request Example - Sending metrics (1.0)

curl --location --request POST 'https://app.anodot.com/api/v1/metrics&token={{DC_Key}}' \
--header 'Content-Type: application/json' \
--data-raw '[
  {
    "name": "anodot.MacOS.hello_world_count",
    "timestamp": 1520325400,
    "value": 100,
    "tags": {
      "target_type": "counter"
    }
  }
]'

In the request body you need to send an array of time series data points. The data points have the following parameters:

Field Description
name (Mandatory) The unique identifying name of the metric being tracked. See below notes on metric names.
timestamp Integer - The data sample's timestamp (Unix epoc time in seconds).
value decimal double precision number, without a thousands seperator.
tags (Optional) List of tags attached to the measure. Key value pairs. Notice that tags are metadata of the metric and do not affect its uniqueness.

Legal Metric Names:

Schema

The Schema Object

End Point /api/v2/stream-schemas

The Schema API enables you to create schemas as a preliminary step to sending Metrics to Anodot using Metrics 3.0 protocol.

Create Stream Schema

Request Example: Creating a schema

curl --location --request POST 'https://app.anodot.com/api/v2/stream-schemas' \
--header 'Authorization: Bearer {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
 "version": "1",
 "name": "schema name",
 "dimensions": [
   "OS",
   "GEO"
 ],
 "measurements": {
   "m1": {
     "units": "sec",
     "aggregation": "average",
     "countBy": "none"
   },
   "m2": {
     "units": "sec",
     "aggregation": "average",
     "countBy": "none"
   }
 },
 "missingDimPolicy": {
   "action": "fill",
   "fill": "dummy_val"
 },
 "dvpConfig": {
  "baseRollup": "LONGLONGROLLUP",
  "maxDVPDurationHours": 168,
  "preventNoData": true,
  "gaugeValue": {
    "keepLastValue": true,
    "value": 0.0
  },
  "counterValue": {
    "keepLastValue": false,
    "value": 0.0
  }
 }
}'

Use this request to create a new schema

Request Arguments

Argument Type Description
version String (Optional) Describe the schema version
name String (Required) max 200 chars Schema name, will be later used as the stream name
Dimensions Array (Required) List of dimensions, max 30. Each dimension must be unique. Each dimension name is up to 30 chars.
measurements Array (Required) List of measurements, max 200
For each measurement:
units String (Optional) Provide the unit for the measure, this unit will be used in Anodot display
aggregation String (Required) Aggregation function for the measure. Valid values: average , sum
countby String (Required) How to count the data points. Valid value: currently “None” is the only value supported (each bucket counts as “1”)
missingDimPolicy How to treat missing dimension values in the posted data.
action String Valid values:
fill - the empty dimension value will be filled with the value in the “fill” field (see below).
fail - data point will be rejected.
ignore - allow empty dimension values, such dimensions may be missing from the metrics.
fill String Fill value. Applicable if action field is set to fill
dvpconfig Section (Optional) Defines the way missing data points will be completed in this schema
baseRollup ENUM Define which is the minimal Anodot rollup to complete the data for. The possible values are
SHORTROLLUP (1 minute)<
MEDIUMROLLUP (5 minutes)
LONGROLLUP (1hour)
LONGLONGROLLUP (1 day)
WEEKLY (1 week)
maxDVPDurationHours Integer The number of hours Anodot will complete missing data points for a metric. The maximal completion period depends on the stream's interval. Daily streams can be filled up to 31 days (744 hours), hourly streams up to 7 days (168 hours) and less than hourly streams can be filled up to 1 day (24 hours)
preventNoData Boolean Keep this as "true"
gaugeValue / counterValue section The definition for gauge (average) or counter (sum) aggregation type measures in the stream related to this schema
keepLastValue Boolean true - use the last received value as the completion value. false - set the completion value manually.
value Float The completion value to use, in case keepLastValue is false.

Response fields

Response Example

{
  "schema": {
    "id": "111111-22222-3333-4444",
    "version": "1",
    "name": "schema name",
    "dimensions": [
      "OS",
      "GEO"
    ],
    "measurements": {
      "m1": {
        "units": "sec",
        "aggregation": "average",
        "countBy": "none"
      },
      "m2": {
        "units": "sec",
        "aggregation": "average",
        "countBy": "none"
      }
    },
    "missingDimPolicy": {
      "action": "fill",
      "fill": "dummy_val"
    }
  },
  "dvpConfig": {
            "baseRollup": "LONGLONGROLLUP",
            "maxDVPDurationHours": 168,
            "preventNoData": true,
            "gaugeValue": {
                "keepLastValue": true,
                "value": 0.0
            },
            "counterValue": {
                "keepLastValue": false,
                "value": 0.0
            }
        }
    },
  "meta": {
    "createdTime": 1547630800000,
    "modifiedTime": 1547630800000
  }
}

The response contains the schema details and provides a schema id for you to use when posting metrics to this schema.

Get User Stream Schema

Request Example: Get all schemas

curl --location --request GET 'https://app.anodot.com/api/v2/stream-schemas/schemas' \
--header 'Authorization: Bearer {{bearer-token}}'

After you've created the schema, you can use this call to get the list of all schemas in the account.

Response fields

Response Example

[
   {
       "streamSchemaWrapper": {
           "schema": {
               "id": "0MCop0RjSsWk3W-QGmpnWA",
               "version": "1",
               "name": "Anodot Usage 002 - Hourly",
               "dimensions": [
                   "Event_Action",
                   "Event_Category",
                   "Event_Label",
                   "Page_path_level_2",
                   "Page_path_level_3",
                   "Page_path_level_4",
                   "Version"
               ],
               "measurements": {
                   "Total_Events": {
                       "aggregation": "sum",
                       "countBy": "none"
                   },
                   "Pageviews": {
                       "aggregation": "sum",
                       "countBy": "none"
                   }
               },
               "missingDimPolicy": {
                   "action": "ignore"
               }
           },
           "meta": {
               "createdTime": 1533540645730,
               "modifiedTime": 1533540645730
           }
       },
       "schemaCubesWrapper": {}
   }

If the request is successfull, you will get an array of "streamsSchemaWrapper" objects. Each of these objects has the following properties:

Argument Description
schema Schema object (see above for definition)
meta Create and modified time of the schema.

Get Stream Schema

Request Example: Get a schema by Id

curl --location --request GET 'https://app.anodot.com/api/v2/stream-schemas/11111-22222-33333-4444' \
--header 'Authorization: Bearer {{bearer-token}}'

Use this API to get a specific schema by Id.

Name Description
id (string) Schema Id to retrieve

Response fields

Respone Example:

{
  "schema": {
    "id": "111111-22222-3333-4444",
    "version": "1",
    "name": "revenue schema",
    "dimensions": [
      "OS",
      "GEO"
    ],
    "measurements": {
      "m1": {
        "units": "sec",
        "aggregation": "average",
        "countBy": "samples"
      },
      "m2": {
        "units": "sec",
        "aggregation": "average",
        "countBy": "samples"
      }
    },
    "missingDimPolicy": {
      "action": "fill",
      "fill": "dummy_val"
    }
  },
  "meta": {
    "createdTime": 1547630800000,
    "modifiedTime": 1547630800000
  }
}

If the request is successfull, you will get an array of "streamsSchemaWrapper" objects. Each of these objects has the following properties:

Argument Description
schema Schema object (see above for definition)
meta Create and modified time of the schema.

Delete Stream Schema

Request Example: Delete a schema by Id

curl --location --request DELETE 'https://app.anodot.com/api/v2/stream-schemas/11111-22222-33333-4444' \
--header 'Authorization: Bearer {{bearer-token}}'

Use this API to delete a stream schema by Id.

Name Description
id (string) Schema Id to delete.

Response fields

Respone Example:

{
  "deleted": "111111-22222-3333-4444"
}

If successful - the call will return the id of the schema which was deleted.

Data Sources & Data Streams

End Point prefix is /api/v2/bc

The two steps to connect to an external data source and stream metrics to Anodot:

  1. In Anodot - Create an Anodot data source according to your source type: S3, a database, a Kinesis Stream, Google Ads or any other source from the list of available resources.
  2. In Anodot or through an API - Create one or more data streams to relay the needed data as metrics.

Additional information is available in our Help center documentation

Use the data streams API to:

Authentication type: Access Token Authentication.

Data Sources

End Point prefix is /api/v2/bc/data-sources

There are several options to get the configured data sources:

GET data-sources

Use this call to get all data sources defined in your account.
You can optionally get the data sources by type.

Request Arguments

Request Example: Get All Data Sources

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-sources" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Request Example: Get S3 Data Sources

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-sources?type=s3" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
query [Optional] String If left empty, the response returns all data sources.
To get data sources of a certain source type, use the relevant ENUM value in the query.

List of source types

ENUM Description
google_storage Google Cloud Storage
google_analytics Google Analytics
google_analytics_ga4 Google Analytics GA4 properties
google_auctions Google Auction insights
google_ads Google Ads
google_search Google Search Console
bigquery Google BigQuery DWH
adobe Adobe Analytics
local_file File Upload
s3 AWS S3
athena AWS S3 Parquet data source powered with Athena
athena_sql AWS Athena JDBC collector
timestream AWS timestream timeseries DB
salesforce Salesforce CRM
mysql MySQL DB
psql PostgreSQL DB
mssql Microsoft SQL Server DB
databricks Databricks
mariadb Maria DB
redshift AWS Redshift DWH
snowflake Snowflake DWH
oracle Oracle DB
teradata Teradata DB
mparticle mParticle listener
kinesis AWS Kinesis Stream
segment Segment Analytics
facebook_ads Facebook ads reporting
newrelic Newrelic APM metrics
coralogix Corlogix logs2metrics
eventhubs Azure Event hubs
datadog Datadog metrics
sumologic Sumologic metrics

Response Fields

Response Example:

[
    {
        "id": "CLF6EQisl",
        "name": "demo.csv 1584355051733",
        "type": "local_file"
    },
    {
        "id": "CS3Jwrk4gf",
        "name": "Demo S3 1584005873272",
        "type": "s3"
    }
]
Field Type Description / Example
id String Data source id. This id can be used in future calls to stream creation.
name String Data Source name. Used for human readability.
type String The source type. Possible values are listed in source types table above.

GET data-sources/find

Use this call to get a list of data sources according to their name.
The string you include in the search query will be used for a case insensitive search in the data source names.
The result will be a list of data sources matching the search.

Request Arguments

Request Example: Get Data Sources containing S3 in their name

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-sources/find?searchQuery=s3" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
searchQuery String The query string is used to search the available the data source names

Response Fields

Response Example: an S3 data source and its parameters

[
   {
      "path" : "",
      "region" : "us-east-1",
      "modifyTime" : 1584285442,
      "id" : "CS3xxxBfrk4gf",
      "bucket" : "demo",
      "createTime" : 1584005874,
      "type" : "s3",
      "name" : "S3_anodot-bc Data Source 1584005873272"
   }
]

Response: List of data sources.
There are mutual fields appearing for all source types.
Each type has some fields relevant to that type.

Field Type Description / Example
id string The data source unique id
type string [ENUM] One of the data source types listed
name string Data source name as it appears in the Anodot App.
modifyTime epoch epoch time the data source was updated
createTime epoch epoch time the data source was created
additional Various Additional fields according to data source type.
e.g. authentication type, database name, database host, region, bucket name and more

GET data-sources/:id

Use this call to get a single data source according to its id.
The result will be a data source object matching the id.
In addition, all the data streams linked to the data source will be listed

Request Arguments

Request Example: Get Data Source by id

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-sources/CPGLrAfdxxxFm" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
id String Data source id to retrieve.

Response Fields

Response Example: A PostgresDB data source

{
   "name" : "Postgres demo Data Source 1584551534093",
   "dbHost" : "demo.anodot.com",
   "type" : "psql",
   "modifyTime" : 1584551534,
   "id" : "CPGLrAfdxxxFm",
   "verifyServerCertificate" : false,
   "createTime" : 1584551534,
   "dbName" : "demo_api",
   "dbPort" : 5432,
   "useSSL" : true,
   "userName" : "demodbuser",
   "streams": [
        {
            "id": "SSS0uMc43vFkO",
            "name": "stream1",
            "type": "psql"
        },
        {
            "id": "SSShvwKn0mnMa",
            "name": "stream2",
            "type": "psql"
        }
   ]
}

Response: A data source object, including all fields according to its type.

Field Type Description / Example
id string The data source unique id
type string [ENUM] One of the data source types
name string Data source name as it appears in the Anodot App.
modifyTime epoch epoch time the data source was updated
createTime epoch epoch time the data source was created
additional Various Additional fields according to data source type.
e.g. authentication type, database name, database host, region, bucket name and more
streams Array The list of streams linked to the data source

Divert data-streams

Use this request to divert data streams from a one data source to another.
A data source may become invalid when user credentials were revoked and cannot be updated in the same datasource. This is the case when using "Sign in with google", "Sign in with Facebook". Other scenarios may apply too. Note the two sources are the same data source type.

Request Arguments and body

Request Example: Divert streamX and streamY from source A to source B

curl -X POST \
"https://app.anodot.com/api/v2/bc/data-sources/divertStreams?fromDataSrc={SourceId}&toDataSrc={DestinationId}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}" \
-d '["streamX-Id", "streamY-Id"]'
Argument Type Description
fromDataSrc String Id of the datasource streams are taken from.
toDataSrc String Id of the datasource streams are linked to.
Body Array An array of stream Ids to be diverted between the sources

Data Streams

End Point prefix is /api/v2/bc/data-streams

GET data-streams

Use this call to get all data streams in your account with basic information

Request

Request Example: Get all data streams basic information

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-streams" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

This request has no body

Response Fields

Response Example:

[
    {
        "id": "SSSrlxxxxxxSC",
        "name": "postgres test",
        "type": "psql",
        "dataSourceId": "XXXYYYZZZAYYY"
    },
    {
        "id": "SSSyjxxxxxgfq",
        "name": "S3 Test",
        "type": "s3",
        "dataSourceId": "XXXYYYZZZBYYY"
    },
    {
        "id": "SSSxxxxzYUP0O",
        "name": "Google Ads Test",
        "type": "google_ads",
        "dataSourceId": "XXXYYYZZZCYYY"
    },
    {
        "id": "SSS4xxxxxxQqn",
        "name": "My Data Test",
        "type": "local_file",
        "dataSourceId": "XXXYYYZZZDYYY"
    },
    {
        "id": "SSSxxxxxxxCoR",
        "name": "S3 Parquet Test",
        "type": "athena",
        "dataSourceId": "XXXYYYZZZEYYY"
    }
]

The response includes a basic list of data streams, the fields for each data stream are:

Field Type Decsription
id string Data stream unique ID
name string Data stream name.
type string [ENUM] Data stream type. See source type list
dataSourceId string Unique identifier of this stream's data source

GET data-streams/find

Use this call to get a list of data streams according to the search query.
The string you include in the search query will be used for a case insensitive search in the data stream names.
The result will be a list of data streams matching the search.

Request Arguments

Request Example: Get Data Streams containing test in their name

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-streams/find?searchQuery=test" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
searchQuery String The query string is used to search the available data stream names

Response Fields

Response Example: an S3 data stream and its parameters

[
   {
      "timeDefinition" : {
         "timeColumnIdx" : 5,
         "timePattern" : "epoch_seconds"
      },
      "schema" : {
         "columns" : [
            {
               "targetType" : "gauge",
               "id" : "5655-cd1f2cff1c1d",
               "sourceColumn" : "0",
               "name" : "id",
               "hidden" : false,
               "type" : "metric"
            },
            {
               "type" : "metric",
               "hidden" : false,
               "sourceColumn" : "1",
               "name" : "number1",
               "targetType" : "gauge",
               "id" : "0838-fc15de8c75c8"
            },
            {
               "hidden" : false,
               "type" : "metric",
               "sourceColumn" : "2",
               "name" : "number2",
               "id" : "74e6-090be30f786f",
               "targetType" : "gauge"
            },
            {
               "hidden" : false,
               "type" : "metric",
               "id" : "4505-7814afd0f9fa",
               "targetType" : "gauge",
               "sourceColumn" : "3",
               "name" : "number3"
            },
            {
               "name" : "cloths",
               "sourceColumn" : "4",
               "id" : "9472-9a1b7e338ef6",
               "type" : "dimension",
               "hidden" : false
            }
         ],
         "sourceColumns" : [
            {
               "id" : "0",
               "index" : 0
            },
            {
               "index" : 1,
               "id" : "1"
            },
            {
               "index" : 2,
               "id" : "2"
            },
            {
               "index" : 3,
               "id" : "3"
            },
            {
               "index" : 4,
               "id" : "4"
            }
         ]
      },
      "modifyTime" : 1584355552,
      "paused" : false,
      "hasDimreduce" : false,
      "metrics" : [
         0,
         1,
         2,
         3
      ],
      "dataSourceId" : "CS3JwVBfxxxgf",
      "missingDimPolicy" : {
         "action" : "fill",
         "fill" : "unknown"
      },
      "fileNamePattern" : "yyyyMMddHH",
      "state" : "running",
      "path" : "folder6f537479-xxxx-43f2-9ce3-66b0294b7532",
      "maxMissingFiles" : 0,
      "type" : "s3",
      "createTime" : 1584355524,
      "fileNameSuffix" : "_data.csv",
      "fileNamePrefix" : "data3_",
      "name" : "test",
      "timeZone" : "UTC",
      "status" : "ok",
      "pollingInterval" : "daily",
      "fileFormat" : {
         "shouldReplaceEmptyCells" : true,
         "decimalPointChar" : ".",
         "hasHeader" : true,
         "delimiter" : ",",
         "ignoreEmptyLines" : false,
         "quoteChar" : "'"
      },
      "historicalDateRange" : {
         "constRange" : "m3"
      },
      "id" : "SSSq07uxxxyvI",
      "dimensions" : [
         4
      ]
   }
]

The response contains a list of complete data stream objects

GET data-streams/:id

Use this call to get a single data stream according to itd id.
The result will be a data stream object matching the id.

Request Arguments

Request Example: Get Data Stream by id

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-streams/{id}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
id String Data stream id to retrieve.

Response Fields

Response Example: A Google Ads data stream

{
    "status" : "ok",
    "createTime" : 1584878085,
    "schema" : {
        "sourceColumns" : [
        {
            "name" : "Cost",
            "id" : "Cost"
        },
        {
            "id" : "Clicks",
            "name" : "Clicks"
        },
        {
            "id" : "Impressions",
            "name" : "Impressions"
        },
        {
            "name" : "Conversions",
            "id" : "Conversions"
        }
        ],
        "columns" : [
        {
            "id" : "32dd-8f1cbb6d3e48",
            "hidden" : false,
            "name" : "Cost",
            "metricTags" : {
                "unit" : "USD"
            },
            "type" : "metric",
            "targetType" : "counter",
            "transform" : {
                "parameters" : [
                    "0.000001"
                ],
                "name" : "scale",
                "input" : [
                    {
                    "sourceColumn" : "Cost"
                    }
                ]
            }
        },
        {
            "name" : "Clicks",
            "sourceColumn" : "Clicks",
            "hidden" : false,
            "id" : "79d8-fa375dd34f90",
            "targetType" : "counter",
            "type" : "metric"
        },
        {
            "sourceColumn" : "Impressions",
            "name" : "Impressions",
            "id" : "8214-d826d1746a93",
            "hidden" : false,
            "type" : "metric",
            "targetType" : "counter"
        },
        {
            "type" : "metric",
            "targetType" : "counter",
            "id" : "5489-090f6c31b882",
            "hidden" : false,
            "sourceColumn" : "Conversions",
            "name" : "Conversions"
        },
        {
            "name" : "Dummy Dimension",
            "hidden" : false,
            "id" : "dfcb-4aaf2c5188b1",
            "transform" : {
                "parameters" : [
                    "1"
                ],
                "name" : "dummy",
                "input" : []
            },
            "type" : "dimension"
        }
        ]
    },
    "timezone" : "America/Los_Angeles",
    "missingDimPolicy" : {
        "action" : "fill",
        "fill" : "unknown"
    },
    "metrics" : [
        "Clicks",
        "Conversions",
        "Cost",
        "Impressions"
    ],
    "pollingInterval" : "daily",
    "paused" : false,
    "clientCustomerId" : "7559118320",
    "type" : "google_ads",
    "state" : "running",
    "id" : "SSSjMxxxfXgdL",
    "hasDimreduce" : false,
    "pollingResolution" : "days",
    "delayMinutes" : 60,
    "modifyTime" : 1584879047,
    "historicalDateRange" : {
        "constRange" : "m1"
    },
    "reportType" : "ACCOUNT_PERFORMANCE_REPORT",
    "name" : "test",
    "dataSourceId" : "CAW5nPxxxxwt4",
    "dimensions" : [],
    "basedOnTemplateId" : "44"
}

The response contains the complete data stream object.

POST data streams

Use this call to create a data-stream. The call needs to contain the entire data-stream object, including the link to parent data-source.

Request Arguments

Request Example: Create an AWS Cost Monitoring data Stream

curl -X POST \
  "https://app.anodot.com/api/v2/bc/data-streams" \
  -H 'Authorization: Bearer ${TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "your_CUR_stream_id",
  "name": "CUR Stream",
  "dataSourceId": "your_data_source_id",
  "type": "aws_cur",
  "historicalDateRange": {
    "constRange": "m3"
  },
  "pollingInterval": "daily",
  "basedOnTemplateId": "na",
  "state": "new",
  "schema": {
    "columns": [
      {
        "sourceColumn": "lineItem/UsageAmount",
        "id": "lineItem/UsageAmount",
        "name": "UsageAmount",
        "type": "metric",
        "targetType": "counter",
        "hidden": false
      },
      {
        "sourceColumn": "lineItem/BlendedCost",
        "id": "lineItem/BlendedCost",
        "name": "BlendedCost",
        "type": "metric",
        "targetType": "counter",
        "hidden": false
      },
      {
        "sourceColumn": "lineItem/UnblendedCost",
        "id": "lineItem/UnblendedCost",
        "name": "UnblendedCost",
        "type": "metric",
        "targetType": "counter",
        "hidden": false
      },
      {
        "sourceColumn": "savingsPlan/SavingsPlanEffectiveCost",
        "id": "savingsPlan/SavingsPlanEffectiveCost",
        "name": "SavingsPlanEffectiveCost",
        "type": "metric",
        "targetType": "gauge",
        "hidden": false
      },
      {
        "sourceColumn": "savingsPlan/UsedCommitment",
        "id": "savingsPlan/UsedCommitment",
        "name": "savingsPlan_UsedCommitment",
        "type": "metric",
        "targetType": "counter",
        "hidden": false
      },
      {
        "sourceColumn": "product/region",
        "id": "product/region",
        "name": "region",
        "type": "dimension",
        "hidden": false
      },
      {
        "sourceColumn": "product/instanceType",
        "id": "product/instanceType",
        "name": "instanceType",
        "type": "dimension",
        "hidden": false
      },
      {
        "sourceColumn": "lineItem/ProductCode",
        "id": "lineItem/ProductCode",
        "name": "ProductCode",
        "type": "dimension",
        "hidden": false
      },
      {
        "sourceColumn": "lineItem/LineItemType",
        "id": "lineItem/LineItemType",
        "name": "LineItemType",
        "type": "dimension",
        "hidden": false
      },
      {
        "sourceColumn": "lineItem/UsageType",
        "id": "lineItem/UsageType",
        "name": "lineItem_UsageType",
        "type": "dimension",
        "hidden": false
      },
      {
        "sourceColumn": "lineItem/UsageAccountId",
        "id": "lineItem/UsageAccountId",
        "name": "UsageAccountId",
        "type": "dimension",
        "hidden": false
      },
      {
        "sourceColumn": "savingsPlan/OfferingType",
        "id": "savingsPlan/OfferingType",
        "name": "savingsPlan_OfferingType",
        "type": "dimension",
        "hidden": false
      }
    ],
    "sourceColumns": [
      {
        "id": "lineItem/UsageAmount",
        "name": "lineItem/UsageAmount"
      },
      {
        "id": "lineItem/UnblendedCost",
        "name": "lineItem/UnblendedCost"
      },
      {
        "id": "lineItem/BlendedCost",
        "name": "lineItem/BlendedCost"
      },
      {
        "id": "product/region",
        "name": "product/region"
      },
      {
        "id": "product/instanceType",
        "name": "product/instanceType"
      },
      {
        "id": "lineItem/ProductCode",
        "name": "lineItem/ProductCode"
      },
      {
        "id": "lineItem/LineItemType",
        "name": "lineItem/LineItemType"
      },
      {
        "id": "lineItem/UsageType",
        "name": "lineItem/UsageType"
      },
      {
        "id": "lineItem/UsageAccountId",
        "name": "lineItem/UsageAccountId"
      },
      {
        "id": "savingsPlan/SavingsPlanEffectiveCost",
        "name": "savingsPlan/SavingsPlanEffectiveCost"
      },
      {
        "id": "savingsPlan/UsedCommitment",
        "name": "savingsPlan/UsedCommitment"
      },
      {
        "id": "savingsPlan/OfferingType",
        "name": "savingsPlan/OfferingType"
      }
    ]
  },
  "paused": false,
  "missingDimPolicy": {
    "action": "ignore"
  },
  "dimensions": [
    "product/region",
    "product/instanceType",
    "lineItem/ProductCode",
    "lineItem/LineItemType",
    "lineItem/UsageType",
    "lineItem/UsageAccountId",
    "savingsPlan/OfferingType"
  ],
  "metrics": [
    "lineItem/UnblendedCost",
    "lineItem/BlendedCost",
    "lineItem/UsageAmount",
    "savingsPlan/SavingsPlanEffectiveCost",
    "savingsPlan/UsedCommitment"
  ],
  "filters": [],
  "path": "cur_reports_path",
  "timeZone": "UTC"
}'

Request Example: Create a PostgreSQL data Stream

curl -X POST \
  "https://app.anodot.com/api/v2/bc/data-streams" \
  -H 'Authorization: Bearer ${TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
      "tableName" : "bc_stream",
      "dimensions" : [
         "status",
         "resolution"
      ],
      "timestampColumn" : "create_time",
      "historicalDateRange" : {
         "constRange" : "d3"
      },
      "maxBackFillIntervals" : 3,
      "dataSourceId" : "CPGLrAfd3YpFm",
      "timeZone" : "UTC",
      "metrics" : [
         "is_paused"
      ],
      "schema" : {
         "sourceColumns" : [
            {
               "name" : "is_paused",
               "id" : "is_paused"
            },
            {
               "name" : "status",
               "id" : "status"
            },
            {
               "id" : "resolution",
               "name" : "resolution"
            }
         ],
         "columns" : [
            {
               "name" : "is_paused",
               "targetType" : "counter",
               "type" : "metric",
               "hidden" : false,
               "id" : "b888-6cd7a274c69a",
               "sourceColumn" : "is_paused"
            },
            {
               "sourceColumn" : "status",
               "id" : "8e11-b51f18268970",
               "type" : "dimension",
               "hidden" : false,
               "name" : "status"
            },
            {
               "name" : "resolution",
               "id" : "3ec1-fa87d9bf32a4",
               "sourceColumn" : "resolution",
               "type" : "dimension",
               "hidden" : false
            }
         ]
      },
      "pollingInterval" : "hourly",
      "delayMinutes" : 60,
      "schemaName" : "public",
      "name" : "postgres test api 2",
      "customQuery" : false,
      "missingDimPolicy" : {
         "action" : "ignore",
         "fill" : "unknown"
      },
      "type" : "psql",
      "timestampType" : "TIMESTAMP"
   }
'

Request Example: Create a Kinesis data Stream

curl -X POST \
  "https://app.anodot.com/api/v2/bc/data-streams" \
  -H 'Authorization: Bearer ${TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "kinesis api test 1",
    "dataSourceId": "CKISt8xxxI4Vp",
    "type": "kinesis",
    "pollingInterval": "m5",
    "dimensions": ["serverId.id", "checksum.offset"],
    "metrics": ["load"],
    "schema": {
        "columns": [
            {
                "sourceColumn": "load",
                "id": "b8af-14c99d63d6c1",
                "name": "load",
                "type": "metric",
                "targetType": "gauge",
                "hidden": false
            },
            {
                "sourceColumn": "serverId.id",
                "id": "b8af-14c99d63d6c2",
                "name": "serverId.id",
                "type": "dimension",
                "hidden": false
            },
            {
                "sourceColumn": "checksum.offset",
                "id": "b8af-14c99d63d6c3",
                "name": "checksum.offset",
                "type": "dimension",
                "hidden": false
            }
        ],
        "sourceColumns": [
            {"id": "load", "path": "load"},
            {"id": "serverId.id", "path": "serverId.id"},
            {"id": "checksum.offset", "path": "checksum.offset"}
        ]
    },
    "recordType": "single_json",
    "filters": [{"path": "clazz", "value": "HeartbeatMessage"}],
    "delayMinutes": 5,
    "timeDefinition": {"path": "checksum.time", "timePattern": "epoch_millis"}
    }'

The request is a complete data stream object.
See below a partial list of stream components.

Schedule Arguments

Field Description & Values
pollingInterval The possible frequencies to collect data:
m1, m5, m10, m15, m30, hourly, h2, h3, h4, h6, h8, h12, daily
[m=minute, h=hour]
Historical Range The history to collect:
h1, h4, d1, d3, w1, m1, m3, m6, y1
[h=last hour, w=last week, m=last month, y=last year]

Polling interval restrictions per type:

Historical time span restrictions per type:

Polling interval and Historical span Allowed combinations:

Polling interval Historical spans allowed
m1 h1, h4, d1, d3, w1
m5, m10, m15, m30 h1, h4, d1, d3, w1, m1
hourly, h2, h3, h4, h6, h8, h12 d1, d3, w1, m1, m3, m6, y1
daily d1, d3, w1, m1, m3, m6, y1, y2, y5, y10, y15, y20

Response Fields

The response contains the created data stream object.

Get data stream total metric count

Use this call to get the number of metrics created by an active stream in a designated time range.

Request Arguments

Request Example:

curl -X GET \
"https://app.anodot.com/api/v2/bc/data-streams/metrics/total?streamId={id}&timeRange=day" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
streamId String Data stream id to retrieve. Alternatively, you can use the stream name.
streamName String Full data stream name to retrieve.
timeRange String [ENUM] Time range to collect the number of metrics.
Allowed values: "day", "week"

Response Fields

Response Example:

{
    "total" : 100
}
Field Type Description / Example
total Int Number of metric created by the data stream in the given time range.

Get data stream connected entities

Use this call to get the number of entities which are connected to a stream. These entities can be alerts, dashboards or composites. 'Connected' means that when the alerts were defined, they have the reference to this stream (Same goes for dashboards and composites). This is equivalent to the 'Alerts & Dashboards' tab you can see in the stream summary modal inside the app.

Request Arguments

Request Example:

curl --location --request GET 'https://app.anodot.com/api/v2/bc/data-streams/totals?streamId={{stream-id}}' \
--header 'Authorization: Bearer {{bearer-token}}'
Argument Type Description
streamId String Data stream id to retrieve.

Response Fields

Response Example:

{
    "alerts": {
        "alerts": [
            {
                "id": "5a1f1886-a92e-4bb5-978b-2781ef81c75d",
                "title": "Alert Views for {{customer_name}}"
            },
            {
                "id": "f2c84112-286c-436d-8316-6beb8186a6b6",
                "title": "Anomaly on events by {{type}}, {{category}}, {{customer_name}} from Alert Views"
            }
        ],
        "total": 2
    },
    "composites": {
        "composites": [],
        "total": 0
    },
    "dashboards": {
        "dashboards": [
            {
                "id": "610fb48151b949000f5a17a1",
                "title": "Alert Views"
            }
        ],
        "total": 1
    }
}
Field Type Description / Example
alerts Array An array of alerts. For each alert you will get the id and title. At the end of the array you can get the total number of connected alerts.
composites Array An array of composites. For each composite you will get the id and title. At the end of the array you can get the total number of connected composites.
dashboards Array An array of dashboards. For each dashboard you will get the id and title. At the end of the array you can get the total number of connected dashboards.

Pause or Resume a data Stream

Use this call to pause a working data stream, or resume a paused stream.

Request Arguments

Request Example:

curl -X PUT \
"https://app.anodot.com/api/v2/bc/data-streams/{id}/state/{action}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
id String Id of the data stream you wish to pause or resume
action String [ENUM] The action to perform on the data stream.
Valid values: "pause", "resume"

Response Fields

Response Example:

{
   "name" : "test",
   "id" : "SSSGxxxDegnQEv",
   "paused" : true
}
Field Type Description / Example
name String Data stream name
id String Data stream id
paused boolean true - Data stream is paused, false - Data stream activity is resumed

Edit data stream

Request Example:

curl -X PUT \
"https://app.anodot.com/api/v2/bc/data-streams/{id}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}" \
-d "{stream json from GET request}"

To edit stream parameters:

  1. Use a GET request to get the stream current settings.
  2. Edit the required settings to the new settings (schedule, measures, dimensions) in the structure you've received
  3. Use a PUT request using the stream id and the updated settings as the request body.

To force recollecting the data. Use:
https://app.anodot.com/api/v2/bc/data-streams/{id}?shouldRewind=true

Delete data Stream

Use this call to delete a stream based on its id.

Request Arguments

Request Example:

curl -X DELETE \
"https://app.anodot.com/api/v2/bc/data-streams/{id}" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
id String Id of the data stream you wish to delete
deleteMetrics [optional] boolean Delete the metrics created by the stream. Default = true.

Response fields

Response Example
If the operation succeeded - you get no response.

Failure Response Example:

{
   "path" : "/api/v2/bc/data-streams/SSSGYfxxxxob7",
   "message" : "object not found in underlying storage:  stream SSSGYfxxxxob7 was not found for user {account id}",
   "additionalInfo" : null,
   "name" : "HttpError",
   "andtErrorCode" : 11002,
   "status" : 404
}

If the operation succeeded - you get no response.
In case the operation failed, you will receive the failure reason

Lookup Tables

End Point /api/v2/lookup/data

Lookup tables can be used in data streams to replace dimension values and/or filter records according to the dimension value.

Use the lookup end point to:

Authentication type: Access Token Authentication.

Get lookup tables

Request Example:

curl -X GET \
https://app.anodot.com/api/v2/lookup/data \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Get the list of lookup tables currently available at this account.

Response Fields

Response Example:

[
    "lookup1.csv",
    "lookup2.csv",
    "simple-lookup6.csv",
    "simple-lookup7.csv",
    "simple-lookup8.csv",
    "simple-lookup9.csv",
    "simple-lookup11.csv"
]

The response is a list of the available lookup tables used in the account

POST / PUT lookup table

This endpoint supports two ways to load the CSV files

  1. Binary file stream - Use this method if you plan to provide the file content as a binary stream of data.
  2. Form data - Use this method if you plan to provide your users with a User Interface to submit the file.

Request Arguments - Binary file stream

Request Example: Using binary file stream

The requested file name should appear as the filename parameter

curl -X POST \
https://app.anodot.com/api/v2/lookup/data?filename=mylookup.csv \
-H 'Content-Type: text/csv' \
-H "Authorization: Bearer ${TOKEN}" \
--data-binary '@/Users/myuser/filesforAnodot/mylookup.csv'
Argument Type Description
filename string The file name used to store the binary data stream information
data-binary file reference The binary stream of data. The exmple shows a cURL reference according to a file name, by using the "@" symbol at the start of the string.

Request Arguments - Form data

Request Example: Using form-data

curl -X POST \
https://app.anodot.com/api/v2/lookup/data \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer ${TOKEN}" \
-F 'filefield=@mylookup.csv'
Argument Type Description
File Field file reference Specify the filename starting with @

Channels

End Point GET /api/v2/channels

Channels are the outgoing integrations used to send alert triggers to their destinations. Anodot supports multiple channel types. For a full list of supported channel types, please see here

Use the channel API endpoint to get the channels available in your account and link them to alerts you create using the alerts API. You may also use the same endpoint to create new channels programmaticaly.

Authentication type: Access Token Authentication.

Get channels

Request Arguments

Request Example: GET All channels in the account

curl -X GET \
https://app.anodot.com/api/v2/channels \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Request Example: GET All channels of type slack

curl -X GET \
https://app.anodot.com/api/v2/channels?type=slack \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Request Example: GET All channels of type slack containing "alert" in the name

curl -X GET \
https://app.anodot.com/api/v2/channels?type=slack&name=alert \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
Argument Type Description
type [Optional] string Limit the response to this channel type.
Use single, lowercase word. Possible values are listed in the channel list below.
name [Optional] string Limit the response to anodot channel names containing this string

Response Fields

Response Example:

[
    {
        "id": "2b7465e5-dbda-46f5-ae67-xxxxxyyyyy",
        "name": "Test",
        "type": "email"
    },
    {
        "id": "558ef7a2-7064-49be-873d-xxxxxyyyyy",
        "name": "test slack",
        "type": "slack"
    }
] 

The response is a list of channels

Field Type Description / Example
id String ($uuid) channel id. Use this id when you create alerts via API and need to provide a destination channel.
type String Channel type. See possible values in channel list
name String Channel name.

Create channel

Request Arguments

Request Example: Create a webhook channel in the account

curl -X POST \
https://app.anodot.com/api/v2/channels/webhook \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
    "channelData":
    {
        "authenticate": false,
        "url":"https://www.acme.corp/webhookurl/"
    },
    "name":"hudson hook"
}'

Request Example: Create a slack channel in the account

curl -X POST \
https://app.anodot.com/api/v2/channels/slack \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
    "channelData": {
        "url": "https://acme.slack.com/webhookurl",
        "channel": "#nocnoc"
    },
    "name": "noc slack channel"
}'
Argument Type Description
type string [Enum] Type of channel to be created (appended to the request URL)
Use single, lowercase word. Possible values are listed in the channel list below.
parameters JSON Object A JSON object with the required parameters for the creating the relevant channel type. See examples on the right for the relevant paylod for each type.

Response Fields

Response Example (creating a webhook channel):

{
    "id": "70eec7d8-da35-453a-9e84-5924abe810ec",
    "name": "hudson hook",
    "tags": "{\"type\":\"webhook\",\"owner\":\"coyote@acme.corp\"}",
    "channelData": {
        "url": "https://www.acme.corp/webhookurl/",
        "authenticate": false
    },
    "state": "ACTIVE",
    "channelMeta": {
        "id": "webhook",
        "userId": "0",
        "templateId": "1",
        "type": "WEBHOOK"
    },
    "timezone": "UTC"
}

Response Example (creating a slack channel):

{
    "id": "360f3c20-122d-4617-b0a2-fa766470360e",
    "name": "noc slack channel",
    "tags": "{\"type\":\"slack\",\"owner\":\"coyote@acme.corp\"}",
    "channelData": {
        "url": "https://acme.slack.com/webhookurl",
        "channel": "#nocnoc"
    },
    "state": "ACTIVE",
    "channelMeta": {
        "id": "slack",
        "userId": "0",
        "templateId": "2",
        "type": "SLACK"
    },
    "timezone": "UTC"
}

The response is a list of channels

Field Type Description / Example
id String ($uuid) channel id.
type String Channel type. See possible values in channel list
name String Channel name.
tags String Tags automatically assigned to the channel (based on the API token used when creating it)
channelData JSON Channel parameters as they appear in Anodot
state String Channel state (Should be "Active" when just created)
channelMeta JSON Channel metadata as stored in Anodot
timezone String the time zone definition of the channel.

Channel List

Type Description
email Create an email and send to participants in the email distribution list
webhook Send the alert as a JSON object to a webhook server
slack Post the alert as a slack message on a slack channel
pagerduty Create an event in a PagerDuty service
jira Open the alert as ticket in a JIRA project
opsgenie Create an OpsGenie alert
msteams Post the alert as an MS Teams message on an MS Teams channel
tamtam Send the alert as a TamTam message
slackapp Use Anodot's Slack App to handle the alerts
mattermost Create a mattermost message
sns Send alerts as AWS sns messages
telegram Send alerts as telegram messages

Anodot Webhook Channel

The Anodot Webhook channel is used by customers to create custom handling of Alert triggers. The trigger is sent to a webhook URL the customer specifies and then you can create your own handling of the payload you get from Anodot. Instructions on setting up the webhook from the Anodot application can be found - here

The Anodot Webhook format has four variants, based on the Alert type:

Below you can see the format for each alert and sample payloads.

Main Fields

Field Description
subject Alert subject - same as alert email. Taken from Alert title
severity Determined by the alert with the highest severity amongst the alerts included in the webhook. Possible values: info, low, medium, high, critical
description Description of the alert who’s title was used in the subject
investigationUrl Link to Anoboard within Anodot for investigation purposes
triageUrl Link to the triage screen for this specific alert trigger.
startTime Human-readable start time of 1st alert in the anomaly
startTimeEpoch startTime in Epoch
timescale Alert timescale values: 1min, 5min, 1 hour, 1 day, 1 week
type Alert type: Anomaly / Static / No Data
mergedAnomalies An array of all merged anomalies
alerts An array of all alerts included in this triggered instance
metrics An array of all metrics in each alert
direction Up/down or both. If both, then the upper/lower are relevant
delta For backward compatibility
name Metric name (including tags and user given names for composite)
id Metric id
state Specific metric state. Values: OPEN, CLOSED
season Values: "None" if no season, or season value (2w, 1w, 1d, 12h, 6h, 5h, 4h, 3h, 2h, 1h, 30m, 15m, 10m, 5m).
events If correlated in the alert - User events within the time of the alert metrics
buckets An array of the events grouped by dates
topEvents Top X events for the alert
alertid Specific alert id
AlertSettingsURl Link to specific alert configuration
description Specific alert description
severity Specific alert severity. Possible values: info, low, medium, high, critical
alertGroupId A unique identifier for the entire incident. This is useful if you would like to collate the different notifications of a specific incidents together - i.e. getting the 'open', 'update' and 'close' messages of the same incident together. They will all have the same alertGroupId.

Anomaly Alert

Anomaly Alert Template:

{
"subject": "{{subject}}",
"severity": "{{severity}}",
"description": "{{description}}",
"investigationUrl": "{{The link to the Anoboard}}",
"startTime": "{{startTime}} (UTC)",
"startTimeEpoch": "{{startTimeEpoch}}",
"anomalyId": "{{anomalyId}}",
"alertGroupId": "{{alertGroupId}}",
"mergedAnomalies":"[{{anomalyId}}]",
"timeScale": "timeScale",
"alerts": [
{
    "title": "{{title}}",
    "metrics": [
        {
        "closeReasonPhrase": "{{closeReasonPhrase}}",
        "duration": "{{duration}}",
        "durationInSeconds": "{{durationInSeconds}}",
        "startTime": "{{startTime}} (UTC)",
        "startTimeEpoch": "{{startTimeEpoch}}",
        "imageUrl": "{{imageUrl}}",
        "peak": "{{peak}}",
        "direction": "{{direction}}",
        "delta": "{{delta}}",
        "significance" : "{{score}}",
        "name": "{{name}}",
        "id":"{{id}}",
        "state": "{{state}}",
        "season":"{{season}}"
        }
    ],
    "events":{
        "Total":"{{total Events}}",
        "buckets":[
        {
        "date":"{{date}}",
        "Total":"{{total events in aggregation}}",
        "topEvents":[
            {
            "title" :"{{title}}",
            "description" :"{{description}}",
            "source" :"{{source}}",
            "category" : "{{category}}",
            "startDate" :"{{startDate}}",
            "endDate" : "{{endDate}}"
            }
        ]
    }
    ]
},
    "alertId": "{{alertId}}",
    "alertSettingsUrl": "{{The link to the alert’s setting}}",
    "description": "{{description}}",
    "severity": "{{severity}}"
    }
]
}

Anomaly alerts are the main type of Anodot alerts. Notice that Anomaly alerts have two versions for the webhook format - standard and extended. The extended version is open to select customers upon request. Please send a mail to support@anodot.com if you would like to start using the extended version. On the right you can see the template and a sample of the standard Anomaly alert trigger.

Anomaly alert response

Anomaly Alert Response Example (With Multiple Metrics):

 {
  "subject": "(2 Alerts) Close: [6-1. Automation DAL1] and [6-2. Automation DAL2] [critical][a42ba]",
  "severity": "critical",
 "description": "should generate one alert story with DAL1 contains metrics m1(up) and DAL2 contains metrics m4(down)",   
 "investigationUrl": "https://yourdomain.anodot.com/#!/anomalies?tabs=main;0&activeTab=1&anomalies=;0(a42bab2f70f44ec8a420cc2130cc47bb)&duration=;1(1)&durationScale=;minutes(minutes)&delta=;1(1)&deltaType=;percentage(percentage)&resolution=;short(short)&score=;0(0)&state=;both(both)&direction=;both(both)&bookmark=;()&alertId=;(4fd71678-cd35-4248-ae2b-7578201cde78,33187cca-680c-4a42-a067-1d817ddb28dc)&sort=;significance(significance)&q=;()&constRange=;1h(c)&startDate=;0(0)&endDate=;0(0)",
 "triageUrl": "https://yourdomain.anodot.com/#!/r/alerts-console?ref=slack&anomalyIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85&constRange=m3&investigationModal=1&sort=updatedTime&triggerIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85",
  "startTime": "14 Nov, 2018 9:17AM (UTC)",
  "startTimeEpoch": "1542187020",
  "anomalyId": "2aefdac1-1a07-4b7b-bf84-09bf5b34f917",
  "alertGroupId": "2aefdac1-1a07-4b7b-bf84-09bf5b34f917",
  "mergedAnomalies": "[a42bab2f70f44ec8a420cc2130cc47bb]",
  "timeScale": "1m",
  "type": "Anomaly",
  "alerts": [
    {
      "title": "6-2. Automation DAL2 1542267963737",
      "metrics": [
        {
          "duration": "20m",
          "durationInSeconds": "1200",
          "startTime": "14 Nov, 2018 9:17AM (UTC)",
          "startTimeEpoch": "1542187020",
          "imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:33187cca-680c
-4a42-a067-1d817ddb28dce:f855728768f0a8d979581e8fb3dd5320s:close.png",
          "peak": "-500.0",
          "lowerPeak": "-500",
          "direction": "DOWN",
          "delta": 1000,
          "lowerPercentageDelta": 1000,
          "significance": 0,
          "name": "automation.alert.m4.1542267963737",
          "id": "automation.alert.m4.1542267963737",
          "state": "CLOSED",
          "season": "None"
        }
      ],
      "events": {
        "total": "0",
        "buckets": []
      },
      "alertId": "dc23e0ad-5561-4742-b123-af7046659d4e",
      "alertSettingsUrl": "https://yourdomain.anodot.com/#!/alerts/dc23e0ad-5561-4742-
b123-af7046659d4e",
      "description": "should generate one alert story with DAL1 contains metrics m1(up)
 and DAL2 contains metrics m4(down)",
      "severity": "critical"
    },
    {
      "title": "6-1. Automation DAL1 1542267963737",
      "metrics": [
        {
          "duration": "20m",
          "durationInSeconds": "1200",
          "startTime": "14 Nov, 2018 9:17AM (UTC)",
          "startTimeEpoch": "1542187020",
          "imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:4fd71678-cd35-4248-ae2b-7578201cde78e:14e50f7a6cd06fc2efa0b542c73dc3fcs:close.png",
          "peak": "500.0",
          "upperPeak": "500",
          "direction": "UP",
          "delta": 1000,
          "upperPercentageDelta": 1000,
          "significance": 0,
          "name": "automation.alert.m1.1542267963737",
          "id": "automation.alert.m1.1542267963737",
          "state": "CLOSED",
          "season": "None"
        }
      ],
      "events": {
        "total": "0",
        "buckets": []
      },
      "alertId": "04d7af9d-f892-4d50-8a1a-eb5297247f4f",
      "alertSettingsUrl": "https://yourdomain.anodot.com/#!/alerts/04d7af9d-f892-4d50-8a1a-eb5297247f4f",
      "description": "should generate one alert story with DAL1 contains metrics m1(up)
 and DAL2 contains metrics m4(down)",
      "severity": "critical"
    }
  ]
} 

Anomaly Alert - Extended

Anomaly Alert Extended Template:

{
"subject": "{{subject}}",
"severity": "{{severity}}",
"description": "{{description}}",
"investigationUrl": "{{appUrl}}/anomalies?tabs=main;0&activeTab=1&anomalies=;0({{alertGroupId}})&duration=;1(1)&durationScale=;minutes(minutes)&delta=;0(0)&deltaType=;percentage(percentage)&resolution=;{{rollup}}({{rollup}})&score=;0(0)&state=;both(both)&direction=;both(both)&bookmark=;()&alertId=;({{alertTriggerIds}})&sort=;significance(significance)&q=;()&constRange=;1h(c)&startDate=;0(0)&endDate=;0(0)",
"triageUrl": "{{appUrl}}/#!/r/alerts-console?ref=slack&anomalyIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85&constRange=m3&investigationModal=1&sort=updatedTime&triggerIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85",
"startTime": "{{startTime}} ({{timeZone}})",
"startTimeEpoch": "{{startTimeEpoch}}",
"anomalyId": "{{alertGroupId}}",
"alertGroupId": "{{alertGroupId}}",
"alertGroupStatus": "{{alertgGroupStatus}}"
"mergedAnomalies": "{{mergedAnomalies}}",
"timeScale": "{{timeScale}}",
"type" : "Anomaly",
"alerts": [
   {
   "title": "{{title}}",
   "alertStatus": "{{alertStatus}}",
   "metrics": [
     {
      "closeReasonPhrase": "This metric was last seen 50 minutes ago and has now timed out.",
      "duration": "{{duration}}",
      "durationInSeconds": "{{durationInSeconds}}",
      "startTime": "{{startTime}} ({{timeZone}})",
      "startTimeEpoch": "{{startTimeEpoch}}",
      "imageUrl": "{{imageUrl}}",
      "peak": "{{peak}}",
      "upperPeak": "{{upperPeak}}",
      "lowerPeak": "{{lowerPeak}}",
      "direction": "{{direction}}",
      "delta": "{{delta}}",
      "upperPercentageDelta": "{{upperPercentageDelta}}",
      "upperAbsoluteDelta": "{{upperAbsoluteDelta}}",
      "from" : "{{upperComparisonValue}}",
      "to" : "{{upperPeak}}",
      "lowerPercentageDelta": "{{lowerPercentageDelta}}",
      "lowerAbsoluteDelta": "{{lowerAbsoluteDelta}}",
      "from" : "{{lowerComparisonValue}}",
      "to" : "{{lowerPeak}}",
      "significance" : "{{score}}",
      "name": "{{name}}",
      "id": "{{id}}",
      "state": "{{state}}",
      "impactInfo": {
            "impact": "{{impact value}}",
            "currency": "{{impact currency}}",
            "effect": "{{impact direction}}"
          },
      "season": "{{season}}"
      }
   ],
   "triggereIds":"{{alertTriggerIds}}",
   "events":{
   "total":"{{totalUserEvents}}",
   "buckets":[
        {
       "date":"{{date}}",
       "total":"{{totalEvents}}",
       "topEvents":[
          {
          "title" :"{{title}}",
          "description" :"{{description}}",
          "source" :"{{source}}",
          "category" : "{{category}}",
          "startDate" :"{{startDate}}",
          "endDate" : "{{endDate}}"
          }
     ]
     }
  ]
  },
  "alertId": "{{alertConfigurationId}}",
  "alertSettingsUrl": "{{appUrl}}/alerts/{{alertConfigurationId}}",
  "description": "{{description}}",
  "severity": "{{severity}}"
  }
]
}

In the extended version, the following fields are added to the webhook payload (not necessarily at the end of the 'standard' payload, so please pay attention to the template and example on the right)

Field Description
upperAbsoluteDelta
lowerAbsoluteDelta
The upper/lower absolute delta value (the difference in the "from" and "to" values below)
from The initial delta value
to The final delta value
closeReasonPhrase Whenever an alert is closed, this field will specify the reason that alert is closed (field is per metric).
impact Business impact data. An object containing the impact, currency and effect of an anomaly. For a deeper explanation on business impact, please read here
actions An array of actions defined by the alert owner. Each element in the array has a name, URL, buttonName and type. For a deeper explanation on actions, please read here.
alertGroupStatus An inidicator on the status of the alert group - it can be either 'open' or 'close'. It will turn to 'close' after all metrics in the alert gruop return to their normal baseline.

Anomaly alert extended response

Anomaly Alert Extended Response Example:

 {
  "subject": "Alert Close: Smarttags alert Revenue daily stream per: 20365[high][bb9e7]",
  "severity": "high",
  "description": "",
  "investigationUrl": "http://yourdomain.anodot.com/#!/anomalies?tabs=main;0&activeTab=1&anomalies=;0(bb9e7e1e5cb64c468e11cdf95756c272)&duration=;1(1)&durationScale=;minutes(minutes)&delta=;0(0)&deltaType=;percentage(percentage)&resolution=;longlong(longlong)&score=;0(0)&state=;both(both)&direction=;both(both)&bookmark=;()&alertId=;(62cf1755-cc90-4994-b8e4-86e308455622)&sort=;significance(significance)&q=;()&constRange=;1h(c)&startDate=;0(0)&endDate=;0(0)",
  "triageUrl": "https://yourdomain.anodot.com/#!/r/alerts-console?ref=slack&anomalyIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85&constRange=m3&investigationModal=1&sort=updatedTime&triggerIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85",
  "startTime": "31 Aug, 2020 12:00AM (UTC)",
  "startTimeEpoch": "1598832000",
  "anomalyId": "2aefdac1-1a07-4b7b-bf84-09bf5b34f917",
  "alertGroupId": "2aefdac1-1a07-4b7b-bf84-09bf5b34f917",
  "alertGroupStatus": "OPEN",
  "mergedAnomalies": "[bb9e7e1e5cb64c468e11cdf95756b100]",
  "timeScale": "1d",
  "type": "Anomaly",
  "alerts": [
   { 
     "title": "Smarttags alert Revenue daily stream per: 20365",
     "alertStatus": "open",
     "metrics": [
    {
     "duration": "1d",
     "durationInSeconds": "86400",
     "startTime": "31 Aug, 2020 12:00AM (UTC)",
     "startTimeEpoch": "1598832000",
     "imageUrl": "",
     "peak": "17245.6",
     "upperPeak": "17245.6",
     "direction": "UP",
     "delta": 76,
     "upperPercentageDelta": 76,
     "upperAbsoluteDelta": 7442.942363620727,
     "from": 9802.65,
     "to": 17245.6,
     "significance": 66,
     "name": "what=commission_daily.agency_id=8.campaign_id=20365.channel_name=Google.currency_code=USD.ksname=KS1456.profile_id=14",
     "id": "bc.SSSKY4zhyR456.14.20365.8.Google.USD.KS1456.commission_daily",
     "state": "CLOSED",
     "impactInfo": {
            "impact": "0.2941702200631637",
            "currency": "USD",
            "effect": "bad"
      },
     "season": "None"
    }
  ],
  "triggereIds": [
  "62cf1755-cc90-4994-b8e4-86e308311425"
  ],
  "events": {
  "total": "0",
  "buckets": []
  },
  "actions": [
      {
        "name": "Run Remediation Script",
        "url": "jenkins://whatever",
        "buttonName": "Fix",
        "type": "OUTSIDE_LINK"
      },
      {
        "name": "Call 911",
        "url": "Someone please call 911",
        "buttonName": "Call 911",
        "type": "OUTSIDE_LINK"
      }
    ],
  "alertId": "7feaee91-0197-4278-a840-6f3fe832a7da",
  "alertSettingsUrl": "http://yourdomain.anodot.com/#!/alerts/7feaee91-0197-4211-a840-4fdfe832a7da",
  "description": "",
  "severity": "high"
  }
 ]
}

Static Alert

Static Alert Template:

{
"subject": "{{subject}}",
"severity": "{{severity}}",
"description": "{{description}}",
"startTime": "{{startTime}} (UTC)",
"startTimeEpoch": "{{startTimeEpoch}}",
"alertGroupId": "{{alertGroupId}}",
"triageUrl": "{{triageUrl}}",
"alertGroupStatus": "{{alertgGroupStatus}}",
"type": "{{type}}",
"alerts": [
   {
    "title": "{{title}}",
    "alertStatus": "{{alertStatus}}",
    "metrics": [
    {
        "duration": "{{duration}}",
        "durationInSeconds": "{{durationInSeconds}}",
        "startTime": "{{startTime}} (UTC)",
        "startTimeEpoch": "{{startTimeEpoch}}",
        "imageUrl": "{{imageUrl}}",
        "peak": "{{peak}}",
        "direction": "{{direction}}",
        "name": "{{name}}",
        "state": "{{state}}",
        "threshold": "{{threshold}}"
        }
    ],
   }
],
"events": { 
  "total":"{{total Events}}",
  "buckets": [
  {
    "date":"{{date}}",
    "Total":"{{total events in aggregation}}",
    "topEvents": [
      {
        "title" :"{{title}}",
        "description" :"{{description}}",
        "source" :"{{source}}",
        "category" : "{{category}}",
        "startDate" :"{{startDate}}",
        "endDate" : "{{endDate}}"
      }
    ]
  },
  ]
},
"alertId": "{{alertId}}",
"alertSettingsUrl": "{{Link to the alerts setting}}", 
"description" :"{{description}}",
"severity":"{{severity}}"
}
]
}

A static alert trigger is fired when a specified metric crosses a designated threshold. For details on Static alerts please see here.

Static alert response

Static Alert Response Example (With Multiple Metrics):

 {
  "subject": "Alert Close: Static Alert Sample 1479763487178[critical][fcc7a]",
  "severity": "critical",
  "description": "Sample Static Alert", 
  "startTime": "11/19/2016 22:27:00 (UTC)",
  "startTimeEpoch": "1479594420",
  "alertGroupId": "2aefdac1-1a07-4b7b-bf84-09bf5b34f917",
  "triageUrl": "https://app.anodot.com/#!/r/alerts-console?ref=slack&anomalyIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85&constRange=m3&investigationModal=1&sort=updatedTime&triggerIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85",
  "alertGroupStatus": "OPEN",
  "type": "static",
  "alerts": [
    {
      "title": "“Static Alert Sample 1479763487178",
      "alertStatus": "open",
      "metrics": [
        {
          "duration": "16h 42m",
          "durationInSeconds": "60120",
          "startTime": "11/19/2016 22:27:00 (UTC)",
          "startTimeEpoch": "1479594420",
          "imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:04410c3e-9364-46d2-9db5-c71777429254e:7d70fa50f1f0060f2e1176c5d207eb1b.png",
          "peak": "1000.0000",
          "direction": "UP",
          "name": "what=total_sales.country=us.device=mobile.source=db.state=ca.1448141087178",
          "state": "CLOSED",
          "threshold": 500
        }
      ],
      "events": {
        "total": "2",
        "buckets": [
          {
            "date": "1472626800",
            "total": "1",
            "topEvents": [
              {
                "title": "Sample event 1",
                "description": "Event 1",
                "source": "jenkins",
                "category": "deployments",
                "startDate": "1472626597",
                "endDate": "1472626597"
              }
            ]
          },
          {
            "date": "1472626200",
            "total": "1",
            "topEvents": [
              {
                "title": "Sample Event 2",
                "description": "Event 2",
                "source": "jenkins",
                "category": "deployments",
                "startDate": "1472625982",
                "endDate": "1472625982"
              }
            ]
          }
        ]
      },
      "alertId": "fcc7a04e-b9ac-413f-841d-8c69ba24b384",
      "alertSettingsUrl": "https://yourdomain.anodot.com/#!/alert/fcc7a04e-b9ac-413f-841d-8c69ba24b384",      
      "description": "Sample Static Alert",
      "severity": "critical"
    }
  ]
} 

No Data Alert

No Data Alert Template:

{
"subject": "{{subject}}",
"severity": "{{severity}}",
"description": "{{description}}",
"startTime": "{{startTime}} (UTC)",
"startTimeEpoch": "{{startTimeEpoch}}",
"alertGroupId": "{{alertGroupId}}",
"triageUrl": "{{triageUrl}}",
"alertGroupStatus": "{{alertgGroupStatus}}",
"type": "{{type}}",
"alerts": [
   {
    "title": "{{title}}",
    "alertStatus": "{{alertStatus}}",
    "metrics": [
    {
        "duration": "{{duration}}",
        "durationInSeconds": "{{durationInSeconds}}",
        "startTime": "{{startTime}} (UTC)",
        "startTimeEpoch": "{{startTimeEpoch}}",
        "imageUrl": "{{imageUrl}}",
        "peak": "{{peak}}",
        "direction": "{{direction}}",
        "name": "{{name}}",
        "state": "{{state}}",
        "threshold": "{{threshold}}"
        }
    ],
   }
],
"events": { 
  "total":"{{total Events}}",
  "buckets": [
  {
    "date":"{{date}}",
    "Total":"{{total events in aggregation}}",
    "topEvents": [
      {
        "title" :"{{title}}",
        "description" :"{{description}}",
        "source" :"{{source}}",
        "category" : "{{category}}",
        "startDate" :"{{startDate}}",
        "endDate" : "{{endDate}}"
      }
    ]
  },
  ]
},
"alertId": "{{alertId}}",
"alertSettingsUrl": "{{Link to the alerts setting}}", 
"description" :"{{description}}",
"severity":"{{severity}}"
}

A No Data alert trigger is fired when a specified metric ceases to send data points. For details on No Data alerts please see here.

No data alert response

No Data Alert Response Example (With Multiple Metrics):

{
"subject": "Alert Open: No Data Reported Sample No Data Alert 1479763791301[critical][576ff]",
"severity": "critical",
"description": "should generate one alert on no data",
"startTime": "11/21/2016 21:32:12 (UTC)",
"startTimeEpoch": "1479763932",
"alertGroupId": "2aefdac1-1a07-4b7b-bf84-09bf5b34f917",
"triageUrl": "https://app.anodot.com/#!/r/alerts-console?ref=slack&anomalyIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85&constRange=m3&investigationModal=1&sort=updatedTime&triggerIdInv=8dfbdcfc-537f-4e61-9fe5-e04d2a03fc85",
"alertGroupStatus": "open",
"type": "No Data",
"alerts": [
    {
    "title": "Sample No Data Alert 1479763791301",
    "alertStatus": "open",
    "metrics": [   
        {
        "lastSeen":"11/21/2016 20:50:12",
        "lastSeenEpoch":"1479761412",
        "duration": "2m",
        "durationInSeconds": "120",
        "startTime": "11/21/2016 21:32:12 (UTC)",
        "startTimeEpoch": "1479763932",
        "name": "what=total_sales.country=us.device=mobile.source=db.state=ca.1479763791301",
        "state": "OPEN"
        } 
    ],
    "alertId": "576ff33f-3a7a-4396-888f-16edc20b98ad",
    "alertSettingsUrl": "https://app.staging.anodot.com/#!/alert/576ff33f-3a7a-4396-888f-16edc20b98ad",    "description": "should generate one alert on no data",
    "severity": "critical"
    }
]
} 

Dynamic Routing Tables

End Point **/api/v2/dynamic-routing

Dynamic routing tables can be used in alerts to send alert triggers to specific email addresses according to a dimension value.

Use the dynamic routing end point to:

Authentication type: Access Token Authentication.

GET Routing Tables

Request Example:

curl -X GET 'https://app.anodot.com/api/v2/dynamic-routing' \
-H 'Authorization: Bearer ${TOKEN}' \
-H 'Content-Type: application/json'

Get the list of routing tables in the account. This request has no body

Response Fields

Response Example:

[
    {
        "id": "5faa7af2085f2bxxx1f41b99",
        "title": "dynamic routing demo 1.csv",
        "owner": "5f7033946b6a7exxxe3cf861",
        "creationTime": 1605008114,
        "editTime": null,
        "csv": "",
        "version": "1.0"
    },
    {
        "id": "5fa7ac804ef60dxxx10cac80",
        "title": "dynamic routing demo 1.csv",
        "owner": "5f917739c47f32b8cxxx44a9",
        "creationTime": 1604824192,
        "editTime": 1604902670,
        "csv": "",
        "version": "1.0"
    }
]

The response is a list of the available routing tables used in the account

Field Type Description / Example
id String ($uuid) The routing table uuid. Use this value to get information regarding a specific table.
title String The table name, this is the full name of the csv file that was used to create the table
owner String ($uuid) The id of The table owner in Anodot.
creationTime epoch Time the table was created in Anodot
editTime epoch Time the last update was done on the table in Anodot
csv String TBD
version String TBD

GET Routing table

Get a single table based on its id.

Request Arguments

Request Example:

curl -X GET 'https://app.anodot.com/api/v2/dynamic-routing/{id}/csv' \
-H 'Authorization: Bearer ${TOKEN}' \
-H 'Content-Type: multipart/form-data'

Replace {id} with the requested table id you received from the GET Routing Tables request.

Response Fields

Response Example:

[
    [ "US", "us_ae@myorg.com"],
    [ "UK", "uk_ae@myorg.com"]
]

The routing table content.

Column 1 Column 2
Dimension Value Email destination(s)

POST to upload a new table

To upload a routing table, prepare a CSV file with the required routing rules and upload it as shown in this example.
Make sure to include the ".csv" suffix in your call when you specify the file name to upload.

Request Arguments

Request Example:

curl --location --request POST 'https://app.anodot.com/api/v2/dynamic-routing' \
-H 'Authorization: Bearer ${TOKEN}' \
-H 'Content-Type: multipart/form-data' \
--form 'file=@/Users/myuser/Downloads/routing_table_sample.csv'
Argument Type Description
File Field file reference Specify the filename starting with @, and using the full path to the file location

POST to replace an existing table

To update the information in an existing routing table, first update the information in a CSV using the same name, the upload it using the original table id.
Make sure to include the ".csv" suffix in your call when you specify the file name to upload.

Request Arguments

Request Example:

curl --location --request POST 'https://app.anodot.com/api/v2/dynamic-routing/{table_id}/csv' \
-H 'Authorization: Bearer ${TOKEN}' \
-H 'Content-Type: multipart/form-data' \
--form 'File=@/Users/myuser/Downloads/routing_table_sample.csv'
Argument Type Description
table_id uuid Get the table id from the GET calls
File Field file reference Specify the filename starting with @, and using the full path to the file location

User Events

End Point prefix is /api/v2/user-events

The Event API enables you to create and edit periodic events such as deployments and holidays. Events can assist in the anomaly investigation process, by correlating them to alerts/anomalies/metrics in dashboards and alerts.

Each event has a category and a source. There is a specific set of APIs to enable to you manage all three entities.

Additional information is available in our Help center documentation

You can find more information about the event conditions in our Alert configuration documentation

Create Event

Request Example - Create a User Event

curl -X POST \
https://app.anodot.com/api/v2/user-events \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
      "event": {
        "title":"deployment started on myServer",
        "description":"my description",
        "source":"chef",
        "category":"deployments",
        "startDate": "1468326864",
        "endDate":null,
        "properties":[
          {
             "key":"service",
             "value":"myService"
          }
        ]
      }
    }'

Request Example - Create a suppress event

This example shows an "end suppress" event. Note the type and action fields

curl -X POST \
https://app.anodot.com/api/v2/user-events \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
      "event": {
        "title":"deployment started on myServer",
        "description":"my description",
        "source":"chef",
        "category":"deployments",
        "startDate": "1651140507",
        "endDate":"",
        "type":"SUPPRESS",
        "action":"END",
        "properties":[
          {
             "key":"service",
             "value":"myService"
          }
        ]
      }
    }'

Response Example

{
   "id":"b1229900-1a49-4b9e-a2e4-b9d21240793f",
   "title":"deployment started on myServer",
   "description":"my description",
   "source":"chef",
   "category":"deployments",
   "startDate":1468326864,
   "endDate":null,
   "type":"SUPPRESS",
   "action":"END",
   "properties":[
      {
         "key":"service",
         "value":"myService"
      }
   ]
}

To add more information to the event use the properties field and add additional data with key-value objects.

Request Arguments

Argument Description
Title The event's title [required]
Description A description of the event. [Optional]
Category The name of the pre-defined category that the event belongs to (e.g deployments, marketing_campaigns, holidays) [required]. If a relevant category does not exist, create one. To create a new category, see create category.
Source The pre-defined source of the request (e.g rest_api, Chef, Jenkins) [required]. If the source does not exist, add it. To add a new source, see create source.
Properties Key-value pairs, can be whatever the user wants to add as additional data except the ones that are already part of the body arguments like title, description, category and so on. E.g: severity: high, publisher: nyt, exchange: rubicon. [Optional]
StartDate The start time of the event. Needs to be in epochtime (seconds)[required]
EndDate The end time of the event. Needs to be in epochtime (seconds) [Optional]
Type (New) The user event type. Possible values:
DISPLAY - Used for Display Only
INFLUENCE - Used for influencing events
SUPPRESS - Used to suppress specific metrics from an alert. Can also be used as Display and influencing events
OFFICE_HOURS - Used to pause an alert altogether. Can also be used as Display and influencing events
This field is mandatory for SUPPRESS and OFFICE_HOURS event types. [Optional]
Action (New) Stating if the user event is the starting or ending time of the event.
Possible values: START, END. [Optional]
This field is mandatory for SUPPRESS event type.

Response Fields The response is an object similar to the request, enabling you to verify that the object was created successfully.

Edit Event

Request Example - Editing an Event

curl -X PUT \
https://app.anodot.com/api/v2/user-events \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
"event": {
    "id":"event id"
    "title": "<event title>",
    "description": "<event description>",
    "category": "<category name>",
    "source": "<source name>",
    "properties":[
     {
        "key":"<key1>",
        "value": "<value1>"
      },
      {
        "key": "<key2>",
        "value": "<value2>"
      }
    ],
    "startDate": "<epoch start date>",
    "endDate": "<epoch end date>"
  }
} 

Response Example

{
   "id":"b1229900-1a49-4b9e-a2e4-b9d21240793f",
   "title":"deployment started on myServer",
   "description":"my description",
   "source":"chef",
   "category":"deployments",
   "startDate":1468326864,
   "endDate":null,
   "properties":[
      {
         "key":"service",
         "value":"myService"
      }
   ]
}

Use this call to edit an existing event. This can be done by event with the ID and all the event details - the same as in the add event API.

Argument Description
id The event ID
Title The event's title [required]
Description A description of the event. [Optional]
Category The name of the pre-defined category that the event belongs to (e.g deployments, marketing_campaigns, holidays) [required]. If a relevant category does not exist, create one. To create a new category, see create category.
Source The pre-defined source of the request (e.g rest_api, Chef, Jenkins) [required]. If the source does not exist, add it. To add a new source, see create source.
Properties Key-value pairs, can be whatever the user wants to add as additional data except the ones that are already part of the body arguments like title, description, category and so on. E.g: severity: high, publisher: nyt, exchange: rubicon. [Optional]
StartDate The start time of the event. Needs to be in epochtime (seconds)[required]
EndDate The end time of the event. Needs to be in epochtime (seconds) [Optional]
Type (New) The user event type. Possible values:
DISPLAY - Used for Display Only
INFLUENCE - Used for influencing events
SUPPRESS - Used to suppress specific metrics from an alert. Can also be used as Display and influencing events
OFFICE_HOURS - Used to pause an alert altogether. Can also be used as Display and influencing events
This field is mandatory for SUPPRESS and OFFICE_HOURS event types. [Optional]
Action (New) Stating if the user event is the starting or ending time of the event.
Possible values: START, END.
This field is mandatory for SUPPRESS and OFFICE_HOURS events types. [Optional]

Retrieve Event by ID

Request example - Getting an Event by ID

curl -X GET \
https://app.anodot.com/api/v2/user-events/9b0cfa33-8a78-416e-84b7-1bff5628deaf \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Response Example - Event content with its id

{
   "id":"9b0cfa33-8a78-416e-84b7-1bff5628deaf",
   "title":"Independence Day",
   "description":"Happy Holiday",
   "source":"calendar",
   "category":"holidays",
   "startDate":1468307241,
   "endDate":1468307241,
   "properties":[

   ]
}

Response Example - EventID not found (HTTP Status 404)

{
    "errors": [
        {
            "index": null,
            "error": 3016,
            "description": "event with this id does not exit"
        }
    ]
}

Use this call to retrieve an existing event definition.

Argument Definition
ID The ID of the event

Retrieve Events by Search Expression

Request example - Getting events using a timestamp and an empty expression

curl -L -X POST \
'https://app.anodot.com/api/v2/user-events/execute?fromDate=1609517291' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${TOKEN}' \
--data-raw '{"filter":{"categories":[]},"aggregation":null}'

Request example - Getting events using a search sxpression

curl -X POST \
https://app.anodot.com/api/v2/user-events/execute?fromDate=1468326864 \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
{
  "filter": {
    "categories": [
      "deployment"
    ],
    "q": {
      "expression": [
        {
          "type": "property",
          "key": "host",
          "value": "anodot13",
          "isExact": true
        }
      ]
    },
    "aggregation": {
      "aggregationField": "source",
      "topEventSize": 20,
      "maxBuckets": 100,
      "resolution": "longlong"
    }
  }
}

Response Example

{
  "resolution": "long",
  "totalEvents": 91,
  "events": [
    {
      "date": 1513760272,
      "totalEvents": 1,
      "topEvent": [
        {
          "id": "20262fb3-00ba-412c-a515-aec74c4824cd",
          "title": "deployment started on myServer",
          "description": "my description",
          "category": "deployments",
          "source": "chef",
          "properties": [
            {
              "key": "service",
              "value": "myService"
            }
          ],
          "startDate": 1468326864,
          "endDate": null
        }
      ],
      "topGroups": [
        {
          "title": "deployments",
          "total": 1
        }
      ]
    }
  ]
}

Response Example - Request is in bad format (HTTP Status 400)

{
  "error": {
    "error": 3015,
    "description": "field properties must be unique"
  }
}

Use this call to retrieve events by search expression.

Argument Description
fromDate (integer) Start time for the event retrieval [Required]
toDate (integer) End time for the event retrieval.
Default value: the request activation time (current time).
order (string) Result order. Default: asc. Values: asc, desc.
size (integer) Number of results per page. Default: 10
index (integer) Page index, used for paged results.

Delete Event by ID

Request Example - Delete event by Event ID

curl -X DELETE \
https://app.anodot.com/api/v2/user-events/9b0cfa33-8a78-416e-84b7-1bff5628deaf \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this call to delete a single event by its ID.

Argument Definition
ID The ID of the event

Delete Events

Request Example - Delete multiple events using expression

curl -X DELETE \
https://app.anodot.com/api/v2/user-events/ \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{ 
   "expression": [ 
   { 
      "type": "property", 
      "key": "category", 
      "value": "deployments" 
   }, 
   { 
      "type": "property", 
      "key": "ver", 
      "value": "!*" 
   } 
   ]   
}

Request Example - Delete multiple events using an eventID array

curl -X DELETE \
https://app.anodot.com/api/v2/user-events/ \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{ 
    "ids": [
      "event_ID_1",
      "event_ID_2"
  ]  
}

Use this call to delete multiple events, located by a search expression, or by their ids.

Argument Definition
expression[] An array of search expressions to locate a single or multiple events.
Note that all properties are provided as a flat list, regardless of the event hierarchy.
Argument Definition
ids[] An array of event ids to locate a single or multiple events

Categories

End Point Prefix is /api/v2/bc/user-events/categories

A category is one of the properties of an event. Anodot provides default categories to help in event classification. These default categories are Deployments, Alerts, Holidays and Other. The default categories cannot be removed or modified, user defined categories can be added, edited and removed.

Create Event Category

Request example - Creating an event category

curl -X POST \
https://app.anodot.com/api/v2/user-events/categories \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
  "category": 
  {
    "name":"myCategory",
    "imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-anodot.png"
    }  
}'

Response example

 { 
   "id":"430f648e-f5e3-40ca-a7e5-50b773ede81b",
   "imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-anodot.png",
   "name":"myCategory",
   "owner":"user"
}

This call allows you to create a new event category.

Argument Definition
name The category name and the way it will be displayed. Name must be unique [required]
imageUrl A url to the image that will be displayed as an icon for the category [optional]. The ImageUrl must be located under a secure server - for example https://myServer/myImage.png. The recommended image size is 32px by 32px.

Response Fields The response is an object similar to the request, enabling you to verify that the object was created successfully.

Retrieve all Categories

Request Example - Get all Categories

curl -X GET \
https://app.anodot.com/api/v2/user-events/categories \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Retrieve all the categories in the account.

Parameters: None.

Response: An array of all the categories defined in the account

Response example

[
  {
    "id": "20262fb3-00ba-412c-a515-aec74c4824cd",
    "name": "deployment",
    "imageUrl": "http://www.pic.com",
    "owner": "user"
  }
]

Delete Event Category by ID

Request Example - Delete Event Category by ID

curl -X DELETE \
https://app.anodot.com/api/v2/user-events/categories/9b0cfa33-8a78-416e-84b7-1bff5628deaf \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Delete Event Category by ID

Argument Definition
Id (string) The category Id [required]

Sources

A source is one of the properties of an event.

End Point Prefix is /api/v2/bc/user-events/sources

Create event Source

Request Example - Create Event Source

curl -X POST \
https://app.anodot.com/api/v2/user-events/sources \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
  "source": {
    "name": "<source name>",
    "imageUrl": "<image url>"
    }  
}'

Response example

 { 
   "id":"430f648e-f5e3-40ca-a7e5-50b773ede81b",
   "imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-anodot.png",
   "name":"mySource",
   "owner":"user"
}

Create a new event source

Argument Definition
name The source name and the way it will be displayed. Name must be unique [required]
imageUrl A url to the image that will be displayed as an icon for the source [optional]. The ImageUrl must be located under a secure server - for example https://myServer/myImage.png. The recommended image size is 32px by 32px.

Retrieve all event Sources

Request Example - Get all event sources

curl -X GET \
https://app.anodot.com/api/v2/user-events/sources \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Retrieve all the event sources in the account.

Parameters: None.

Response: An array of all the sources defined in the account

Response example

[
  {
    "id":"0",
  "imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-anodot.png",
  "name":"anodot",
  "owner":"anodot"
  },
  {
    "id":"1",
    "imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-chef.png",
    "name":"chef",
    "owner":"anodot"
    },
    {
      "id":"2",
      "imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-jenkins.png",
      "name":"jenkins",
      "owner":"anodot"
      }
    ]

Delete event Source by ID

Request Example - Delete Event Source by ID

curl -X DELETE \
https://app.anodot.com/api/v2/user-events/sources/9b0cfa33-8a78-416e-84b7-1bff5628deaf \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Delete Event Source by ID

Argument Definition
Id (string) The source Id [required]

Tags

A tag is a property/value pair that can be dynamically added/removed to a metric or set of metrics without effecting the name of the metric.
For example: a tag can be accountManager=Joe which will be attached to the metrics related to the accounts Joe manages. If the accounts Joe manages change, the API lets you change the assignment of the tags to metrics without affecting the metric name. Tags can be used to filter and aggregate data.

Please note:

  1. If a tag already exists then the tag will be removed from metrics that previously matched the search expression. The tag will be added only to the metrics that match the current search expression.
  2. Tags MUST NOT contain the following characters:{ . SPACE}
  3. It can take up to 20 minutes until the metric tagging operation is applied to the relevant metrics.

End Point prefix is /v2/metrics/tags

Authentication type: Access Token Authentication.

Create Tags

To create a tag on a set of metrics that match a search expression. Multiple expressions can be associated to each tag which is treated an OR expression between them.

Request Arguments

Request Structure

curl -X POST \
https://app.anodot.com/api/v2/metrics/tags \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}" \
-D '{
"tag": {
    "key": "tagName",
  "value": "tagValue"
  },
  "expressions": [
    {
      "expression": [
        {
          "type": "property",
          "key": "key1",
          "value": "val1"
      },
      {
          "type": "property",
          "key": "key2",
          "value": "val2"
      }
     ]
    },
    {
      "expression": [
        {
          "type": "property",
          "key": "key1",
          "value": "val3"
        },
        {
          "type": "property",
          "key": "key2",
          "value": "val4"
        }
      ]
    }
  ]
    }'
Argument Definition
tag key tag key name
tag value tag key value
expressions Array of expressions, each expression can contain several metrics queries.
type the type of the search expression, can be of type [search] or property.
key the metric key name
value the metric key value 

In the example on the right all metrics returning from the query: ((key1 == val1) AND (key2 == val2)) OR ((key1 ==val3) AND (key2 ==val4))  will be tagged with the tag: tagName:tagValue

Example Request

curl -X POST \
https://app.anodot.com/api/v2/metrics/tags \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}" \
-d '{
   "tag":
      {
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
   "expressions":
   [
      {
         "expression":
            [
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ]
   }'

Example Response

{
   "validation":{
      "passed":true,
      "failures":[

      ]
   },
   "tags":[
      {
         "id":"8b6f6fa8-ba46-4596-8358-ebcb4727f5ee",
         "expressions":[
            {
               "expression":[
                  {
                     "type":"property",
                     "key":"what",
                     "value":"impressions"
                  },
                  {
                     "type":"property",
                     "key":"campaign_id",
                     "value":"12345678ABC"
                  }
               ]
            }
         ],
         "tag":{
            "key":"my_campaigns",
            "value":"12345678ABC"
         }
      }
   ]
}

Get Tag by ID

Returns a tag configuration based on the tag ID.

Request Arguments

Sample Request: Get Tag by ID

curl -X GET \
https://app.anodot.com/api/v2/metrics/tags/<Id>\
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}"
Argument Definition
ID The tag ID

Example Response

[
   {
      "id":"31425ce5-32c1-4cce-9075-28c1748d42a8",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470056853,
      "disabled":false
   },
   {
      "id":"8b6f6fa8-ba46-4596-8358-ebcb4727f5ee",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058877,
      "disabled":false
   },
   {
      "id":"a56259ce-38df-4f0a-87a9-157198c82275",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058253,
      "disabled":false
   },
   {
      "id":"f9c4bec4-632d-4366-b78d-65323fbc4e84",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058449,
      "disabled":false
   }
]

Get Tag by Search Expression

Returns a tag's configuration based on a search expression.

Request Arguments

Sample Request: Get Tag by Search Expression

curl -X GET \
"https://app.anodot.com/api/v2/metrics/tags \
&value-contains-string={{string}}&key-contains-string={{string}}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}"
Argument Description
value-contains-string (optional)  The string to search within the value
key-contains-string (optional) The string to search within the key

Note: The relationship is AND between the two parameters. 

Example Response

[
   {
      "id":"31425ce5-32c1-4cce-9075-28c1748d42a8",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470056853,
      "disabled":false
   },
   {
      "id":"8b6f6fa8-ba46-4596-8358-ebcb4727f5ee",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058877,
      "disabled":false
   },
   {
      "id":"a56259ce-38df-4f0a-87a9-157198c82275",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058253,
      "disabled":false
   },
   {
      "id":"f9c4bec4-632d-4366-b78d-65323fbc4e84",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058449,
      "disabled":false
   }
]

List All tags

List all tag configurations in the account sent via the tag APIs.

Sample Request: List all tags

curl -X GET \
https://app.anodot.com/api/v2/metrics/tags \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}" \

Example Responses

[
   {
      "id":"31425ce5-32c1-4cce-9075-28c1748d42a8",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470056853,
      "disabled":false
   },
   {
      "id":"8b6f6fa8-ba46-4596-8358-ebcb4727f5ee",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058877,
      "disabled":false
   },
   {
      "id":"a56259ce-38df-4f0a-87a9-157198c82275",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058253,
      "disabled":false
   },
   {
      "id":"f9c4bec4-632d-4366-b78d-65323fbc4e84",
      "expressions":[
         {
            "expression":[
               {
                  "type":"property",
                  "key":"what",
                  "value":"impressions"
               },
               {
                  "type":"property",
                  "key":"campaign_id",
                  "value":"12345678ABC"
               }
            ]
         }
      ],
      "tag":{
         "key":"my_campaigns",
         "value":"12345678ABC"
      },
      "lastModified":1470058449,
      "disabled":false
   }
]

Delete Tags

Delete a tag and remove it from all metrics.

Request Arguments

Example Request: Delete all tags

curl \
-X DELETE \
'https://app.anodot.com/api/v2/metrics/tags/31425ce5-32c1-4cce-9075-28c1748d42a8?' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}" \
Argument Definition
ID The tag ID

Response

No response body for this API

Assign Metrics to Tags

Assign one or more metrics to one or more tags.

The user will send an array of expressions that define the metrics he wants to assign the tags to.

Note: It can take up to 20 minutes until the metric tagging operation will be applied to the relevant metrics.

Important If a tag already exists then the tag will be removed from the metrics that previously matched the search expression; a tag will be added only to the metrics that match the current search expression.

Arguments

Example Request: Assign Metrics to Tags

curl \
-X POST \
'https://app.anodot.com/api/v2/metrics/tags/assign-metrics-to-tags' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}" \
-D '{
  "expressions": [
    {
      "expression": [
        {
          "type": "property",
          "key": "key1",
          "value": "val1"
        },
        {
          "type": "property",
          "key": "key2",
          "value": "val2"
        }
      ]
    }
  ],
  "tags": [
    {
      "key": "tagkey1",
      "value": "tagval1"
    },
    {
      "key": "tagkey1",
      "value": "tagval2"
    }
  ]
}'
Argument Definition
tag key tag key name
tag value tag key value
expressions Array of expressions, each expression can contain several metrics queries.
type the type of the search expression, can be of type [search] or property.
key the metric key name
value the metric key value 

Sample Response

[
    {
        "id": "7ecc44e1eab4c1a649776ebf4c6fc49b",
        "expressions": [
            {
                "expression": [
                    {
                        "type": "property",
                        "key": "pos1",
                        "value": "raanana"
                    },
                    {
                        "type": "property",
                        "key": "pos2",
                        "value": "shared"
                    }
                ]
            },
            {
                "expression": [
                    {
                        "type": "property",
                        "key": "pos2",
                        "value": "coconut"
                    },
                    {
                        "type": "property",
                        "key": "pos1",
                        "value": "netanya"
                    }
                ]
            }
        ],
        "tag": {
            "key": "service",
            "value": "a",
            "metricTagRepresentation": "#service=a"
        }
    },
    {
        "id": "548e8537d14613bf94b458afa12e921a",
        "expressions": [
            {
                "expression": [
                    {
                        "type": "property",
                        "key": "pos1",
                        "value": "raanana"
                    },
                    {
                        "type": "property",
                        "key": "pos2",
                        "value": "shared"
                    }
                ]
            }
        ],
        "tag": {
            "key": "service",
            "value": "b",
            "metricTagRepresentation": "#service=b"
        }
    }
]

Add Metrics to Tags

This method works similarly to Assign Metrics to Tags. Instead of removing metrics that were previously assigned to the requested tags, it adds the new metrics to the previous ones.

If a tag does not exist then it will create a new tag and assign the metrics to it.

Note: It can take up to 20 minutes until the metric tagging operation will be applied to the relevant metrics.

Request Arguments

Example Request: Add Metrics to Tags

curl \
-X PUT \
'https://app.anodot.com/api/v2/metrics/tags/add-metrics-to-tags' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}" \
-D '{
  "expressions": [
    {
      "expression": [
        {
          "type": "property",
          "key": "key1",
          "value": "val1"
        },
        {
          "type": "property",
          "key": "key2",
          "value": "val2"
        }
      ]
    }
  ],
  "tags": [
    {
      "key": "tagkey1",
      "value": "tagval1"
    },
    {
      "key": "tagkey1",
      "value": "tagval2"
    }
  ]
}'
Argument Definition
tag key tag key name
tag value tag key value
expressions Array of expressions, each expression can contain several metrics queries.
type the type of the search expression, can be of type [search] or property.
key the metric key name
value the metric key value 

Sample Response

[
    {
        "id": "7ecc44e1eab4c1a649776ebf4c6fc49b",
        "expressions": [
            {
                "expression": [
                    {
                        "type": "property",
                        "key": "pos1",
                        "value": "raanana"
                    },
                    {
                        "type": "property",
                        "key": "pos2",
                        "value": "shared"
                    }
                ]
            },
            {
                "expression": [
                    {
                        "type": "property",
                        "key": "pos2",
                        "value": "coconut"
                    },
                    {
                        "type": "property",
                        "key": "pos1",
                        "value": "netanya"
                    }
                ]
            }
        ],
        "tag": {
            "key": "service",
            "value": "a",
            "metricTagRepresentation": "#service=a"
        }
    },
    {
        "id": "548e8537d14613bf94b458afa12e921a",
        "expressions": [
            {
                "expression": [
                    {
                        "type": "property",
                        "key": "pos1",
                        "value": "raanana"
                    },
                    {
                        "type": "property",
                        "key": "pos2",
                        "value": "shared"
                    }
                ]
            }
        ],
        "tag": {
            "key": "service",
            "value": "b",
            "metricTagRepresentation": "#service=b"
        }
    }
]

Topology

The Topology APIs enable you to load topology data such as Customers, Geographical and Network Information, the data is then presented over Anodot map view.

You can find more information about the Network Topology Map in our - Topology documentation

The Anodot Topology Data ingestion mechanism is made up of 3 APIs.

Topology User

End Point prefix is /api/v2/topology/user

Request Example: Create the topology user

curl -X PUT \
{
 "_id": "625bcc6e4af784000fc3128d"
}

Use this API to create a topology user.

Argument Description
id customerID Get CustomerID [Required]

Topology Data Ingestion

End Point prefix is /api/v2/topology/map/load

Anodot’s topology data ingestion mechanism operates on a full data set ingestion, partial additions are not supported.

During this process, the ingested data is first validated and only then loaded to overwrite the existing data stored in the topology entities.

The topology data-load APIs consist of three APIs that load the full updated topology data set:

Load Start

Request Example: Load start

curl -X POST \
https://app.anodot.com/api/v2/topology/map/load/start \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API to start the topology data load. This API is used to mark the process initiation.

The process retrieves a new “rollupid” to be used in the data ingestion API.
A successful response ("Response 200”) includes a new “rollupid”, which is used by the ‘Bulk entities load’ API.

Bulk Entities Load

Request Example: Bulk Entities Load

curl -X PUT \
https://app.anodot.com/api/v2/topology/map/load/{rollupId} \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D '{
  "bulkSerNumber": 1,
  "numberOfRows": 7,
  "type": "SITE",
  "rows": {
    "DFWIRV01CORE001": "{"id":"DFWIRV01CORE001","parentRegionId":"DFWIRV01","name":"DFWIRV01CORE001","latitude":"32.907385","longitude":"-97.03882","customer":"DFW"}",
    "DFWIRV01ENB001": "{"id":"DFWIRV01ENB001","parentRegionId":"DFWIRV01","name":"DFWIRV01ENB001","latitude":"32.906672","longitude":"-97.036331","customer":"DFW"}",
  },
  "rollupId": "6"
}'

Response - successful iteration

Response 200 example:

{
  "bulkSize": 500,
  "entityCounts": {},
  "insertErrors": [],
  "missingIds": {},
  "validationErrors": [],
  "rollupId": 26
}

Response - with failed entity records

Response with failed validations example:

{
    "rollupId": 28,
    "bulkSize": 6,
    "validationErrors": [
        {"type": "CELL","error": "entity failed on validation","json": "{\"relatedNodeId\":\"24722\",\"vendor\":\"Ericsson\",\"domain\":\"RAN;3G\",\"name\":\"U2477\",\"band\":\"2100\",\"id\":\"U2477\",\"lac\":\"333\"}"
        }
    ],
    "insertErrors": [],
    "missingIds": {},
    "entityCounts": {}
}

Use this API to load the topology data for each entity.

Request Arguments

Argument Description
type The Entity type, taken from a predefined list: “REGION”, “SITE”, “NODE”, “CARD”, “INTERFACE”, “CELL”, “LINK”, “SERVICE”, “APPLICATION”, “LOGICALEGROUP". [required]
rollupId rollupId retrieved from the load start API. [required]
timestamp Date and time. [Optional]
bulkSerNumber The topology load is divided into bulks, with each bulk stamped with a serial number. [Optional]
numberOfRows Number of entity records in the bulk. [Optional]
rows The topology entity data according to the predefine topology entity fields. [required]

In both responses demonstrated, the PUT call was successful.

Topology entity arguments

Region entity

Request Example: Region entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 2,
  "type": "REGION",
  "rows": {
    "NYC": "{"id":"NYC","name":"NYC","customer":""}",
    "KFC-C1-NYC": "{"id":"KFC-C1-NYC","parentRegionId":"NYC","name":"KFC-C1-NYC","customer":"KFC"}",
  },
  "rollupId": "6"
}

Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
parentRegionId Y Used for region relation. Region-> Upper Region level association. In case the region level is the upper level, the field can be Null[Required]
name Y Region display Name. [Required]
type N Type of Region and Site. For example: County, City, etc. [Optional]

Site entity

Request Example: Site entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 1,
  "type": "SITE",
  "rows": {
"KFC-Site1": "{"id":"KFC-Site1","parentRegionId":"KFC-C1-NYC","name":"KFC-Site1","latitude":"30.907385","longitude":"-90.03882","customer":"KFC"}"  }
  "rollupId": "6"
}

Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
parentRegionId N The region in which the site is located in, corresponding to REGION entity “id”. [Required]
name Y Site display Name. [Required]
type N Site type, such as: RAN Site, Data Center, Central Office, Local Exchange. [Optional]
domain N Site related Domain. [Optional]
latitude N Site Latitude coordinate. [Required]
longitude N Site longitude coordinate. [Required]
address N Site address. [Optional]
zipcode N Site Zip Code. [Optional]
customer N Customer names can be used in cases of enterprise sites, mobile shared sites etc. [Optional]

Node entity

Request Example: Node entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 1,
  "type": "NODE",
  "rows": {
 "KFC-Site1-NR1": "{"id":"KFC-Site1-NR1","name":"KFC-Site1-NR1","siteId":"KFC-Site1","keyword":"Cell Site","type":"Cell Site","domain":"5G","customer":"KFC"}"}
  "rollupId": "6"
}
Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
name Y Node display name. [Required]
siteId N The site “id” in which the node is located in, corresponding to ‘SITE’ entity “id”. [Required]
keywords N The keyword defines the Node classification, and is used in the Map node visualization. Pre-defined keyword list: 'Cell Site', 'Router', 'Switch', ‘Server’. [Required]
type N Free text describing the equipment type, for example: CSR 1800. [Optional]
domain N Network Domain used by the map domain filtering. such as: 3G,4G, 5G, Mobile Core, IP, Optical, MW, etc. [Optional]
description N Free text describing the equipment. [Optional]
status N Node status, such as: Active, In Use, In Maintenance, Planned. [Optional]
vendor N Node vendor. [Optional]
ip N Node IP Address. [Optional]
customer N Customer related Node. [Optional]
relatedNodeId N Dimension ID of a related Node, for example: NodeB -> RNC relation. [Optional]

Cell entity

Request Example: Cell entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 1,
  "type": "CELL",
  "rows": {
 "KFC-Site1-NR1C1": "{"id":"KFC-Site1-NR1C1","name":"1","relatedNodeId":"KFC-Site1-NR1","azimuth":"270","domain":"5G","status":"Active"}"}
  "rollupId": "6"
}
Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
name N Cell display name. [Required]
relatedNodeId N The Cell Site Node “id”, corresponding to ‘NODE’ entity “id”. [Required]
azimuth N Cell Azimuth, used for the cell position over the map. [Required]
band N Cell band/frequency. [Optional]
domain N Network domain Used in the map domain filtering, such as: 3G,4G, 5G, Mobile Core, IP, Optical, MW, etc. [Optional]
status N Cell status, such as: Active, In Use, In Maintenance, Planned. [Optional]
vendor N Cell vendor. [Optional]
latitude N Cell Latitude coordinate. Required only in case in which the cell is located away from the site. [Optional]
longitude N Cell Longitude coordinate. Required only in case in which the cell is located away from the site. [Optional]
lac N Cell lac identification. [Optional]
rac N Cell RAC identification. [Optional]
ci N Network Domain, such as: 3G,4G, 5G, Mobile Core, IP, Optical, MW, etc.. Used by the map domain filtering. [Optional]
neighborcells N Cell status, such as: Active, In Use, In Maintenance, Planned. [Optional]
tilt N Cell tilt. [Optional]
description N Cell Latitude coordinate. Required only in case in which the cell is located away from the site. [Optional]

Card entity

Request Example: Card entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 1,
  "type": "CARD",
  "rows": {
    "RTR01/CPU01": "{"id":"RTR01/CPU01","name":"RTR01/CPU01","relatedNodeId":"RTR01","type":"CPU","status":"Active"}"}
  "rollupId": "6"
}
Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
name N Card display name. [Required]
relatedNodeId N The “id” of the parent Node, corresponding to ‘NODE’ entity “id”. [Required]
type N Free text describing the card type, for example: PIC. [Optional]
status N Card status. [Optional]
description N Free text. [Optional]

Interface entity

Request Example: Interface entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 1,
  "type": "INTERFACE",
  "rows": {
 "RTR01/ETH01": "{"id":"RTR01/ETH01","name":"RTR01/ETH01","relatedNodeId":"RTR01","type":"Ethernet","status":"Active"}"}
  "rollupId": "6"
}
Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
name N Interface display name. [Required]
relatedNodeId N The “id” of the parent Node, corresponding to ‘NODE’ entity “id”. [Required]
type N Free text describing the interface type. for example: optical. [Optional]
status N Interface status. [Optional]
description N Free text. [Optional]
ip N Interface IP Address. [Optional]
customer N Associated customer. [Optional]

Request Example: Link entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 1,
  "type": "INTERFACE",
  "rows": {
 "RTR01-RTR02-001": "{"id":"RTR01-RTR02-001"","name":"RTR01-RTR02-001","sourceNodeId":"RTR01","destNodeId":"RTR02","type":"Ethernet","status":"Active"}
  "rollupId": "6"
}
Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
name N Link display name.[Required]
sourceNodeId N The “id” of the source Node, corresponding to ‘NODE’ entity “id”. [Required]
destNodeId N The “id” of the destination Node, corresponding to ‘NODE’ entity “id”. [Required]
sourceInterfaceId N The “id” of the source Interface, corresponding to ‘INTERFACE’ entity “id”. [Optional]
destInterfaceId N The “id” of the destination Interface, corresponding to ‘INTERFACE’ entity “id”. [Optional]
type N Free text describing the interface type. for example: optical. [Optional]
status N Interface status. [Optional]
description N Free text. [Optional]
customer N Associated customer. [Optional]

Service entity

Request Example: Service entity

{
  "bulkSerNumber": 4,
  "numberOfRows": 1,
  "type": "SERVICE",
  "rows": {
 "OSFP-001": "{"id":"OSFP-001"","name":OSFP-001","type":"OSFP Ring","status":"Active","relatedEntityType":"INTERFACE","relatedEntityId":"RTR01/ETH01"}"}
  "rollupId": "6"
}
Argument Unique Description
id Y Key field. Unique identifier of the entity. The value shall match one/multiple metrics dimensions combined for uniqueness and identification. [Required]
name N Service display name.[Required]
type N Service type name. [Optional]
status N Interface status. [Optional]
relatedEntityType N Associated entity type, taken from a predefined list: REGION, SITE, NODE, CARD, INTERFACE, LINK, CELL, SERVICE. [Optional]
relatedEntityId N Dimension ID of the associated entity instance. [Optional]
description N Free text. [Optional]
customer N Associated customer. [Optional]

Load End

Requests Structure:

POST http://{{app-url}}/api/v2/topology/map/load/{rollupId}/end

Request Example: Load End

curl -X POST \
https://app.anodot.com/api/v2/topology/map/load/1/end \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"

Use this API as a markup to end the topology load process. The API initiates internal enrichment processing and integrity validation between the topology entities. As a result, the execution time for this API may take several minutes. If the Integrity validation results include a certain amount of crucial mismatched data (according to internal thresholds), the topology data load will be aborted. {rollupId} is being retrived by the Load Start

Topology Metric Mapping

Requests Structure:

PUT http://{{app-url}}/api/v2/topology/user/metric-mapping

GET http://{{app-url}}/api/v2/topology/user/metric-mapping

Request Example: Topology Metric Mapping

curl -X PUT \
curl -X PUT \
https://app.anodot.com/api/v2/topology/user/metric-mapping \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}"
-D 
  "3G_DL_data_Drop_Rate_HSDPA": [
    {
      "delimiter": "_",
      "properties": [
        "BTS_Name"
      ],
      "types": [
        "NODE"]
    }
  ],
  "3G_Download_HS_Data_Throughput_per_user_average": [
    {
      "delimiter": "_",
      "properties": [
        "BTS_Name"
      ],
      "types": [
        "NODE"]
    }
  ]
}

This API loads a metric mapping of the user by mapping between the "Entity id" to the Metric dimension. This API is not used periodically but upon changes to the user metrics.

Request Arguments

Argument Description
Measure name Measure name as it appears in Anodot’s managed metrics. [Required]
delimiter This will be used in cases where metric dimension concatenation is required in order to create a matching value between the Anodot metrics and the topology entity “Dimension ID”. The delimiter is irrelevant in cases where there's only one property in the “properties” field. In these cases, the field can be empty or include any type of character. [Required]

For example:
Interface entity dimension ID : Router1/Interface10

Anodot metric mapping :
Measure: Traffic

Dimensions:
Host Name: Router1
Interface Name: Interface10

“delimiter”: “/”,
"properties": [“Router1”, “Interface10”]
properties The metric dimension that will be used as a matching property between the Anodot metric and the topology entity “Dimension ID”. [Required]
types Topology Entity Type (REGION, SITE, NODE, CARD, INTERFACE, LINK, CELL, SERVICE, APPLICATION, LOGICAL GROUP). [Required]

Cost

APIs for the Anodot for Cost Product (f.k.a. Pileus)

End Point https://api.mypileus.io/api/v1

Cost Authentication

In order to start working with the Cost API, you need to perform two authentication steps.

Getting the Bearer Token

The following call will enable you to get an authentication token for the subsequent API calls. Please notice that the token recieved is valid for 24 hours.

You can either use basic authentication (recommended) or send the parameters in the body.

Request example: Getting an authentication token

curl --location --request POST 'https://tokenizer.mypileus.io/prod/credentials' \
--header 'Authorization: Basic eWFyaXZAYW5vZG90LmNvbTpUd2Vyay0zMA==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "coyote@acme.com",
    "password": "thisismypassword"
}'

Response example - invalid credentials.

{
    "Error": "Failed Retrieving Authentication Token"
}

Response example - token

{
   "Authorization": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",  
    "apikey": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:-1" 
}

Forming the API Key

After calling the Authentication, you will need to call the Get Users. From the users API response you will get an array of accounts (See example on the right)

Sample reponse from the users API

[
  {
    "accounts": [
        {
            "accountKey":"{{accountkey}}",
            "accountId": "1234567",
            "accountTypeId": 1,
            "accountName": "anodot",
            "cloudTypeId": 0,
            "userKey": "{{user-key}}",
            "firstProcessTime": "2020-09-22T12:00:00.000Z",
            "lastProcessTime": "2022-06-30T12:00:00.000Z",
            "divisionId": "{{divisionId}}",
            "divisionsIds": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ]
        }
  }
]

Choose the accountkey which is relevant for the subsequent API calls and the divisionID.

Then - replace the '-1' at the end of the API key you got with accountKey:divisionId

Example: if the API key you initially got is this:

c6249e30e-cf36-4957-a41a-d08fbafa5093:-1

It will now be:

c6249e30e-cf36-4957-a41a-d08fbafa5093:{{acountKey}}:{{divisionId}}

In the following calls, we refer to this new string as {{account-api-key}}

Pagination

Today, Each API call is limited to returning 5000 rows. In case you need to get more results, you can use the pagination capability of the APIs

Pagination Call Example: First Request

{ 
  "data": "[item1, item2, … , item5000]",
   "nextToken": 2 
}

Pagination Call Example: Calling with token=2

{ 
  "data": "[item5001, item5002, … , item6000]",
   "nextToken": null 
}

In order to get the full date (in case next_token is not null), you need to make the same API request with token=next_token_value until nexToken returns with a null value.

The following APIs currently support pagination:

To use pagination the user needs to add an additional parameter called token to the query parameter. You do not need to attach token for the first call. However - you will see in the response of the relevant calls a field called nextToken (see example on the right)

Users

Get List of Users

Summary: retrieve users

Request example: Getting list of users

curl --location --request GET 'https://api.mypileus.io/api/v1/users' \
--header 'apikey: {{apikey}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

The response is comprised of an array of users, according to the following table:

TBD

Code Description
200 User retrieval success
404 User not found
500 Server error

Response Example

{
    "id": 606,
    "user_key": "c6d9e30e-cf36-4957-a41a-d08fbafa5093",
    "user_name": "yariv@anodot.com",
    "user_display_name": "yariv",
    "user_type": "1",
    "registration_time": "2020-04-27T20:58:36.000Z",
    "registration_status_id": null,
    "last_login_time": null,
    "first_name": "Yariv",
    "last_name": "Zur",
    "company_name": "anodot",
    "job_title": "",
    "pricing_plan_id": null,
    "trial_days": null,
    "payment_customer_id": null,
    "payment_billing_url": null,
    "slack_webhook_url": null,
    "pricing_amount_monthly": 400,
    "pricing_amount_yearly": 3840,
    "is_active": 1,
    "is_read_only": 0,
    "db_creation_time": "2020-09-22T19:41:31.000Z",
    "db_update_time": null,
    "remaining_trial_days": null,
    "userHash": "{{user-hash}}",
    "role_id": "34o48a5a",
    "accounts": "TBD",
    "root_user": true,
    "parent_level": 0,
    "is_parent": true,
    "settings": {
        "default_account_id": null
    },
    "childs": "TBD",
}

Cost Centers

Get List of Cost Centers

Summary: retrieve list of cost centers

Request example: Getting list of coset centers

curl --location --request GET 'https://api.mypileus.io/api/v1/users/cost-centers' \
--header 'apikey: {{apikey}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

The response is comprised of an array of cost centers, according to the following table:

TBD

Code Description
200 User retrieval success
404 User not found
500 Server error

Response Example

{
    "id": 606,
    "user_key": "c6d9e30e-cf36-4957-a41a-d08fbafa5093",
    "user_name": "yariv@anodot.com",
    "user_display_name": "yariv",
    "user_type": "1",
    "registration_time": "2020-04-27T20:58:36.000Z",
    "registration_status_id": null,
    "last_login_time": null,
    "first_name": "Yariv",
    "last_name": "Zur",
    "company_name": "anodot",
    "job_title": "",
    "pricing_plan_id": null,
    "trial_days": null,
    "payment_customer_id": null,
    "payment_billing_url": null,
    "slack_webhook_url": null,
    "pricing_amount_monthly": 400,
    "pricing_amount_yearly": 3840,
    "is_active": 1,
    "is_read_only": 0,
    "db_creation_time": "2020-09-22T19:41:31.000Z",
    "db_update_time": null,
    "remaining_trial_days": null,
    "userHash": "{{user-hash}}",
    "role_id": "34o48a5a",
    "accounts": "TBD",
    "root_user": true,
    "parent_level": 0,
    "is_parent": true,
    "settings": {
        "default_account_id": null
    },
    "childs": "TBD",
}

Divisions

Get Divisions

Summary: retrieve divisions

Request Example: Get Divisions

curl --location --request GET 'https://api.mypileus.io/api/v1/divisions' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Response Example: TBD

Responses

Code Description
200 Divisions retrival success
404 Divisions not found
500 Server error

Cost & Usage

Get Cost & Usage

Summary: Retrieves cost and usage from your cloud accounts invoice

Description: The call is used to retrieve cloud invoice data grouped and filters by different values

Request Example - Getting cost and usage

curl --location --request GET 'https://api.mypileus.io/api/v1/invoices/cost-and-usage?groupby=service&startDate=2021-12-31&endDate=2022-07-01&periodGranLevel=month' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
groupBy query The group by value that will be used for the results Yes
startDate query Start date of the cost and usage data examination Yes
endDate query End date of the cost and usage data examination Yes
periodGranLevel query Granularity level of the period in the output data Yes
costType query No
isNetUnblended query No
isAmortized query No
isNetAmortized query No
wheres query conditions of type if x equals y when retrieving data No
filters query conditions of type if x in (y,z,w) when retrieving data No
excludeFilters query conditions of type if x not in (y,z,w) when retrieving data No

Response Example

[
    {
        "group_by": "undefined",
        "usage_date": "2022-05",
        "account_id": "932213950603",
        "total_cost": 36564.952178,
        "total_usage_quantity": 1096079113.54,
        "resource_name": "",
        "resource_id": ""
    },
    {
        "group_by": "undefined",
        "usage_date": "2022-06",
        "account_id": "932213950603",
        "total_cost": 41454.924133,
        "total_usage_quantity": 1247146351.53,
        "resource_name": "",
        "resource_id": ""
    },
    {
        "group_by": "undefined",
        "usage_date": "2022-07",
        "account_id": "932213950603",
        "total_cost": 75231.838587,
        "total_usage_quantity": 2346800877.42,
        "resource_name": "",
        "resource_id": ""
    },
    {
        "group_by": "undefined",
        "usage_date": "2022-08",
        "account_id": "932213950603",
        "total_cost": 11307.24461,
        "total_usage_quantity": 141920221.13,
        "resource_name": "",
        "resource_id": ""
    }
]

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Recommendations

Get Recommendations

Summary: Retrieves current live recommendations

Description: The call is used to retrieve the current live recommendations

Request Example: Getting recommendations

curl --location --request GET 'https://api.mypileus.io/api/v1/recommendations?filters[type]=ec2-idle' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
filters query Filter recommendations based on type No

Filtering recommendations can be applied to the above calls using query parameters in the following manner: filters[type]=recommendationType where recommendationType is one of the recommendation types that are listed under the "Recommendation Types" section below. You can use the Get Recommendation Types call to get the possible types.

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Response Example: Recommendation

[
    {
        "max_cpu_util": "0.8",
        "region": "us-east-1",
        "operation_system": "Linux/UNIX",
        "resource_name": "mongodb-rs1.k8s-production.anodot.com",
        "total_cost_recommended": "0",
        "resource_tags": {
            "createdBy": "AssumedRole:AROAIFFBAISDNBXFCKHYE:tcohen@anodot.com",
            "Resource_Name": "mongodb-rs1.k8s-production.anodot.com",
            "stack": "production"
        },
        "initial_creation_date": "2022-06-12",
        "resource_id": "i-0fbec9ade54277c5f",
        "linked_account_name": "Production",
        "signature": "340481513670#|#340481513670#|#ec2-idle#|#i-0fbec9ade54277c5f",
        "total_cost_current": "389.86",
        "sp_coverage": "0.0",
        "instance_type_size": "2xlarge",
        "network_out": 1,
        "recommendation_creation_time": "2022-06-30 22:34:25",
        "max_network": 10,
        "ri_coverage": "100.0",
        "network_in_statistics_usage": {
            "2022-06-08": "0.22"
        },
        "sp_savings": false,
        "instance_type_model": "r5ad",
        "starting_time": "2022-06-30 22:34:04",
        "last_process_date": "2022-06-29",
        "num_of_days": 30,
        "action": "Terminate",
        "cpu_util_statistics_usage": {
            "2022-06-08": "0.6683333333333333"
        },
        "account_id": "340481513670",
        "ri_savings": true,
        "linked_account_id": "340481513670",
        "service": "Amazon Elastic Compute Cloud",
        "network_in": 1,
        "recommendation_update_time": "2022-06-30 22:34:25",
        "uuid": "92ab0dcc-5dee-4df2-b186-4b246293b3c8",
        "potential_savings": "100.0",
        "recommendation_status_id": 0,
        "network_out_statistics_usage": {
            "2022-06-08": "1.3"
        },
        "type": "ec2-idle"
    }
]

While each recommendation has different attributes that relat to the recommendation, they all share the following common fields:

Name Description
account_id The payer account id
linked_account_id The linked account id that the recommendation is relevant to (can be the payer account id also)
linked_account_name The linked account name that the recommendation is relevant to (can be the payer account name also)
type The recommendation type (See Recommendations Types Below)
total_cost_current The corresponding monthly cost without executing the recommendation
total_cost_recommended The corresponding monthly cost after executing the recommendation
potential_savings The monthly savings percent in case the recommendation is executed
action The general type of action related to the recommendation - Modify/Terminate/Upgrade/Delete/Buy
recommendation_creation_time The time the recommendation was created
uuid The recommendation id
recommendation_status_id The recommendation status (See Recommendations Statuses Below)
recommendation_update_time The time the recommendation was updated with one of the statuses.

Recommendation Statuses

Available Recommendation Statuses are:

Get Recommendations types

Summary: Retrieves current live recommendations types

Description: The call is used to retrieve the current live recommendations types

Example:

Request Example: Getting recommendations types

curl --location --request GET 'https://api.mypileus.io/api/v1/recommendations/types' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Response Example: Recommendation Types

[
    "ebs-unattached",
    "ip-unattached",
    "ec2-idle",
    "dynamodb-idle",
    "version-upgrade",
    "rds-version-upgrade",
    "ec2-low-cpu-usage",
    "rds-ri",
    "ebs-upgrade",
    "elasticache-ri",
    "ec2-savings-plans",
    "nat-gateway-util-low",
    "ebs-outdated-snapshot",
    "rds-idle",
    "ec2-stopped-instance"
]
Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Possible Recommendation Types

Provider Service Recommendation type
AWS EC2 EC2 Reserved Instance 'ri'
Operation System 'operation-system'
OIP Unattached 'ip-unattached'
EC2 Generation Upgrade 'version-upgrade'
Idle EC2 instance 'ec2-idle'
EC2 Right Sizing 'ec2-low-cpu-usage'
EC2 Savings Plans 'ec2-savings-plans'
Stopped EC2 instance 'ec2-stopped-instance'
Unnecessary Data Transfer from EC2 instance 'ec2-udt'
RDS RDS Generation Upgrade 'rds-version-upgrade'
RDS Reserved-Instance 'rds-ri'
RDS Type Change 'rds-type-change'
Idle RDS Instance 'rds-idle'
DynamoDB Idle Dynamo DB 'dynamodb-idle'
Load Balancer Idle Load Balancer 'idle-load-balancer'
Stop S3 Versioning 's3-versioning'
Idle S3 's3-idle'
EBS Unattached EBS 'ebs-unattached'
EBS Type Change 'ebs-type-change'
Outdated EBS Snapshot 'ebs-outdated-snapshot'
EBS Upgrade 'ebs-upgrade'
Redshift Low utilization red shift cluster 'redshift-util-low'
Neptune DB Neptune DB Idle 'neptune-util-low'
Elasticsearch Elasticsearch Idle 'es-util-low'
NAT Gateway NAT Gateway Idle 'nat-gateway-util-low'
ElastiCache ElastiCache Idle 'elasticache-util-low'
DocumentDB DocumentDB Idle 'documentdb-util-low'
Kinesis Kinesis Idle 'kinesis-util-low'
Azure Disk Disk Unattached 'azure-disk-unattached'
VM Virtual Machine Reserved-Instance 'azure-vm-ri'
Idle Virtual Machine 'azure-vm-idle'
Memory Utilization Data 'azure-vm-rightsizing'
Database Datebase Reserved-Instance 'azure-db-ri'
Load Balancer Idle Load Balancer 'azure-idle-load-balancer'
Disk Disk Type Change 'azure-disk-type-change'
IP IP Unattached 'azure-ip-unattached'
Cosmos DB Cosmos DB Right Sizing 'azure-cosmos-db-right-sizing'
GCP VM Idle Virtual Machine 'gcp-vm-idle'
Virtual Machine Right Sizing 'gcp-vm-rightsizing'

Get history of recommendations

Summary: Retrieves history of recommendations

Description: The call is used to retrieve history recommendations

Request Example: Getting recommendations history

curl --location --request GET 'https://api.mypileus.io/api/v1/recommendations/history?filters[type]=ec2-idle' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
filters query Filter recommendations based on type No

Filters are the same as the live Get Recommendations call

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Get recommendation history types

Summary: Retrieves current history recommendations types

Description: The call is used to retrieve the history recommendations types

Request Example: Getting recommendations history types

curl --location --request GET 'https://api.mypileus.io/api/v1/recommendations/history/types' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Budgets

Get Budget

Summary: Retrieves budgets for given user

Description: The call is used to retrieve budgets created by api-key defined user

Request Example: Getting a budget

curl --location --request GET 'https://api.mypileus.io/api/v1/budgets' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses The response is an array of budgets defined in the account.

Response Example

[
    {
        "budgetId": "f30de497a71f45b7a5dd5e0953bc43e6",
        "budget_amounts": [],
        "end_date": "2023-06-01 00:00:00",
        "creation_time": "2022-07-03 11:48:33",
        "user_key": "ff55ffaf-42d7-402d-95c8-bdd6488392f3",
        "budget_amount_type": "fixed",
        "budget_type": "recurring",
        "flexible": 1,
        "alerts": [
            {
                "budget_percent_to_alert_from": 80,
                "alert_granularity": [
                    "daily"
                ],
                "recipients": [
                    "yariv@anodot.com"
                ],
                "when_to_alert": [
                    "forecasted"
                ]
            }
        ],
        "filters": {
            "include": {
                "linkedaccname": [
                    "Anodot Customer Success"
                ]
            },
            "exclude": {}
        },
        "account_id": "340481513670",
        "start_date": "2022-06-01 00:00:00",
        "division_id": "0",
        "budget_amount": 50000,
        "is_active": 1,
        "account_key": "649",
        "budget_name": "Customer Success",
        "is_valid": "1"
    }
]
Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Edit Budget

Summary: update budget for given user

Description: The call is used to update budget created by api-key defined user

Request Example: Update a budget

curl --location --request PUT 'https://api.mypileus.io/api/v1/budgets?budgetId={{budgetId}}' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "budgetName": "string",
  "budgetAmount": 0,
  "budgetAmounts": [
    {
      "date": "string",
      "amount": 0
    }
  ],
  "budgetAlerts": [
    {
      "alertPercent": 0,
      "alertEmail": "string",
      "whenToAlert": [
        "actualUsage"
      ],
      "alertGranularity": [
        "daily"
      ]
    }
  ],
  "includeFilters": {
    "filter_name": [
      "linkedaccid"
    ]
  },
  "excludeFilters": {
    "filter_name": [
      "linkedaccid"
    ]
  },
  "budgetType": "expiring",
  "budgetAmountType": "fixed",
  "startDate": "string",
  "endDate": "string",
  "isFlexible": true,
  "budgetId": "string"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Create Budget

Summary: create budget for given user

Description: The call is used to create budgets created by api-key defined user

curl --location --request POST 'https://api.mypileus.io/api/v1/budgets' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "budgetName": "string",
  "budgetAmount": 0,
  "budgetAmounts": [
    {
      "date": "string",
      "amount": 0
    }
  ],
  "budgetAlerts": [
    {
      "alertPercent": 0,
      "alertEmail": "string",
      "whenToAlert": [
        "actualUsage"
      ],
      "alertGranularity": [
        "daily"
      ]
    }
  ],
  "includeFilters": {
    "filter_name": [
      "linkedaccid"
    ]
  },
  "excludeFilters": {
    "filter_name": [
      "linkedaccid"
    ]
  },
  "budgetType": "expiring",
  "budgetAmountType": "fixed",
  "startDate": "string",
  "endDate": "string",
  "isFlexible": true,
  "budgetId": "string"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Delete Budget

Summary: Delette budget for given user

Description: The call is used to delete budget created by api-key defined user

Request Example: Delete a budget

curl --location --request DELETE 'https://api.mypileus.io/api/v1/budgets?budgetId={{budget-id}}' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
budgetId query The budget Id to remove Yes

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Anomaly Detection

Get Anomaly Detection Rules

Summary: Retrieves anomaly-detection rules for given user

Description: The call is used to retrieve anomaly-detection created by api-key defined user

Request example: Get anomaly detection rules

curl --location --request GET 'https://api.mypileus.io/api/v1/usage/anomaly-detections/rules' \
--header 'apikey: {{account-api-token}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Edit Anomaly Detection Rules

Summary: update anomaly-detection rule for given user

Description: The call is used to update anomaly detection rule created by api-key defined user

Request Example: Editing an Anomaly Detection Rule

curl --location --request PUT 'https://api.mypileus.io/api/v1/usage/anomaly-detections/rules' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'
--data-raw '{
  "ruleName": "string",
  "minPercentChange": 0,
  "minAmountChange": 0,
  "includeFilters": {
    "filter_name": [
      "string"
    ]
  },
  "excludeFilters": {
    "filter_name": [
      "string"
    ]
  },
  "ruleId": "string"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Code Description
200 successful delete
400 Invalid Parameters value
500 Server error

Create Anoamly Detection Rules

Summary: create anomaly-detection rule for given user

Description: The call is used to create anomaly detection rule created by api-key defined user

Request Example: Creating an anomaly detection rule

curl --location --request POST 'https://api.mypileus.io/api/v1/usage/anomaly-detections/rules' \
--header 'apikey: {{account-api-token}}' \
--header 'Authorization: {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "ruleName": "string",
  "minPercentChange": 0,
  "minAmountChange": 0,
  "includeFilters": {
    "filter_name": [
      "string"
    ]
  },
  "excludeFilters": {
    "filter_name": [
      "string"
    ]
  },
  "ruleId": "string"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Delete Anomaly Detection Rules

Summary: update anomaly detection rule for given user

Description: The call is used to delete anomaly detection rule created by api-key defined user

Request Example: Delete an anomaly detection rule

curl --location --request DELETE 'https://api.mypileus.io/api/v1/usage/anomaly-detections/rules?ruleId=sdfsd' \
--header 'apikey: {{account-api-token}}' \
--header 'Authorization: {{Bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
ruleId query The anomaly detection rule Id to remove Yes

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Kubernetes

Get Kubernetes cost

Summary: Retrieves kubernetes cost and usage from your cloud accounts invoice

Description: The call is used to retrieve kubernetes data grouped and filtered by different values

Request Example: Get Kubernetes Cost

curl --location --request GET 'https://api.mypileus.io/api/v1/kubernetes/cost-and-usage?groupBy=cluster&startDate=2022-05-01&endDate=2022-08-01&periodGranLevel=month&costUsageType=compute' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
groupBy query The group by value that will be used for the results. Possible values: Available values : cluster, region, linkedaccname, linkedaccid, namespace, node, instancetype, labels, customtags Yes
startDate query Start date of the cost and usage data examination Yes
endDate query End date of the cost and usage data examination Yes
periodGranLevel query Granularity level of the period in the output data. Available values : month, week, day Yes
costUsageType query Available valuye: Available values : compute, dataTransfer, storage Yes
usageType query Available values : CPU, Memory No
metricType query Available values : actual, requirements No
isNetUnblended query Available values : true, false No
isAmortized query Available values : true, false No
isNetAmortized query Available values : true, false No
wheres query conditions of type if x equals y when retrieving data. Available values : cluster, region, linkedaccname, linkedaccid, namespace, node, instancetype, labels, customtags No
filters query conditions of type if x in (y,z,w) when retrieving data. Available values : cluster, region, linkedaccname, linkedaccid, namespace, node, instancetype, labels, customtags No
excludeFilters query conditions of type if x not in (y,z,w) when retrieving data. Available values : cluster, region, linkedaccname, linkedaccid, namespace, node, instancetype, labels, customtags No

Responses

Response example: Getting Kubernetes Cost

{
    "data": [
        {
            "groupBy": "us-east-1:932213950603:cw-test-2",
            "usageDate": "2022-05",
            "accountId": "932213950603",
            "clusterName": "us-east-1:932213950603:cw-test-2",
            "totalCost": 61.9,
            "totalUsage": 253883145259.66
        },
        {
            "groupBy": "us-east-1:932213950603:my-cluster-name",
            "usageDate": "2022-05",
            "accountId": "932213950603",
            "clusterName": "us-east-1:932213950603:my-cluster-name",
            "totalCost": 7.74,
            "totalUsage": 31338272009.87
        }
    ],
    "nextPage": null
}
Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Get Kubernetes cost per pod

Summary: Retrieves kubernetes cost and usage from your cloud accounts invoice

Description: The call is used to retrieve kubernetes Pod cost and usage data grouped

Request Example: Getting Kubernetes cost per pod / cluster

curl --location --request GET 'https://api.mypileus.io/api/v1/kubernetes/cost-and-usage/pod?startDate=2022-05-01&endDate=2022-08-01&periodGranLevel=month&clusterName=us-east-1:932213950603:cw-test-2' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
startDate query Start date of the cost and usage data examination Yes
endDate query End date of the cost and usage data examination No
clusterName query The cluster name that the pod running on. cluster name formatting should be in following format- [CLUSTER_REGION]:[CLUSTER_ACCOUNT_ID]:[CLUSTER_NAME] for example us-east-1:123456789012:prod-cluster No
nodeName query No
podName query pod name formatting should be in following format- [POD_NAMESPACE]:[POD_NAME] for example kube-system:aws-node-k5jgh Yes

Response Example:

{
    "data": [
        {
            "groupBy": "us-east-1:932213950603:cw-test-2",
            "usageDate": "2022-05",
            "accountId": "932213950603",
            "clusterName": "us-east-1:932213950603:cw-test-2",
            "totalCost": 61.9,
            "totalUsage": 253883145259.66
        },
        {
            "groupBy": "us-east-1:932213950603:my-cluster-name",
            "usageDate": "2022-05",
            "accountId": "932213950603",
            "clusterName": "us-east-1:932213950603:my-cluster-name",
            "totalCost": 7.74,
            "totalUsage": 31338272009.87
        }
    ]
}

Responses

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Cost Events

Get Cost Events

Summary: Retrieves events for given user

Description: The call is used to retrieve events created by api-key defined user

Request Example: Get Events

curl --location --request GET 'https://api.mypileus.io/api/v1/users/events?startDate=2022-01-01&endDate=2022-08-01' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
startDate query Start date of events Yes date
endDate query Start date of events Yes date

Responses

Response Example: Events

[
    {
        "date": "2022-07-07",
        "creationTime": "2022-07-07 12:46:08",
        "createdBy": "PileusUser",
        "uuid": "eventId",
        "divisionId": "0",
        "accountKey": "649",
        "userKey": "userKey",
        "accountId": "accountID",
        "description": "Its time to get the API going!",
        "title": "The Big API Palooza"
    }
]
Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

The response is an array of events within the given time frame.

Event Structure

Field Description
account_id The payer account id
uuid The event id
creation_time Time and date when this event was created in format YYYY-MM-DD hh:mm:ss
date Date of the event in format YYYY-MM-DD
description The description of the event
title The title of the event
user_key Identifier of user, who created this event
updating_time The last time and date when this event was updated in format YYYY-MM-DD hh:mm:ss

Create Cost Event

Summary: create event for given user

Description: The call is used to create events created by api-key defined user

Request Example: Create Event

curl --location --request POST 'https://api.mypileus.io/api/v1/users/events' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "title": "The Big API Palooza II",
  "description": "Its time to get the API going!",
  "date": "2022-07-07",
  "createdBy": "Anodot User"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
title body Event title Yes String
description body Event description Yes String
date body Event date Yes date
createdBy body Name of user creating the event Yes String

Responses

Response Example - Event Creation

{
    "account_id": "{{acccountID}}",
    "uuid": "fd50e8f0-823a-456e-9df8-7e14f8df3fb7",
    "account_key": "{{accountKey}}",
    "division_id": "0",
    "user_key": "{{user-Key}}",
    "creation_time": "2022-07-07 13:00:50",
    "created_by": "Anodot User",
    "title": "The Big API Palooza II",
    "description": "Its time to get the API going!",
    "date": "2022-07-07"
}
Code Description
201 successful Creation
400 Invalid Parameters value
500 Server error

Edit Cost Event

Summary: update event for given user

Description: The call is used to update budget created by api-key defined user

Request Example - Edit an event

curl --location --request PUT 'https://api.mypileus.io/api/v1/users/events/fd50e8f0-823a-456e-9df8-7e14f8df3fb7' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "title": "The Big API Palooza III",
  "description": "Its time to get the API going!",
  "date": "2022-07-07",
  "createdBy": "Ragnar Lothbrok"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
id path The event ID to update Yes

Responses

The response will contain the updated event in the regular structure.

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Delete Cost Event

Summary: delete event for given user

Description: The call is used to delete event created by api-key defined user

Request Example: Delete event

curl --location --request DELETE 'https://api.mypileus.io/api/v1/users/events/fd50e8f0-823a-456e-9df8-7e14f8df3fb7' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
id path The event ID to remove Yes

Responses

Code Description
200 successful deletion
400 Invalid Parameters value
500 Server error

MSP Customers

Get MSP Customers

Summary: Retrieves list of customers for an MSP

Description: The call is used to retrieve list of customers for an MSP

Request Example: Get MSP Customers

curl --location --request GET 'https://api.mypileus.io/api/v1/msp/customers' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
startDate query Start date of events Yes date
endDate query Start date of events Yes date

Responses

Response Example: Events

[
    {
        "date": "2022-07-07",
        "creationTime": "2022-07-07 12:46:08",
        "createdBy": "PileusUser",
        "uuid": "eventId",
        "divisionId": "0",
        "accountKey": "649",
        "userKey": "userKey",
        "accountId": "accountID",
        "description": "Its time to get the API going!",
        "title": "The Big API Palooza"
    }
]
Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

The response is an array of events within the given time frame.

Event Structure

Field Description
account_id The payer account id
uuid The event id
creation_time Time and date when this event was created in format YYYY-MM-DD hh:mm:ss
date Date of the event in format YYYY-MM-DD
description The description of the event
title The title of the event
user_key Identifier of user, who created this event
updating_time The last time and date when this event was updated in format YYYY-MM-DD hh:mm:ss

Create MSP Customer

Summary: Create MSP customer

Description: The call is used to create a new customer for an MSP

Request Example: Create MSP Customer

curl --location --request POST 'https://api.mypileus.io/api/v1/msp/customers' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "customerName",
    "linkedAccountsIds": [“19923818823”, “342134123”],
    "code": "customerCode"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
title body Event title Yes String
description body Event description Yes String
date body Event date Yes date
createdBy body Name of user creating the event Yes String

Responses

Response Example - Event Creation

{
    "account_id": "{{acccountID}}",
    "uuid": "fd50e8f0-823a-456e-9df8-7e14f8df3fb7",
    "account_key": "{{accountKey}}",
    "division_id": "0",
    "user_key": "{{user-Key}}",
    "creation_time": "2022-07-07 13:00:50",
    "created_by": "Anodot User",
    "title": "The Big API Palooza II",
    "description": "Its time to get the API going!",
    "date": "2022-07-07"
}
Code Description
201 successful Creation
400 Invalid Parameters value
500 Server error

Edit MSP Customer

Summary: Update an MSP customer

Description: The call is used to update an MSP customer

Request Example - Edit an MSP customer

curl --location --request PUT 'https://api.mypileus.io/api/v1/msp/customers/fd50e8f0-823a-456e-9df8-7e14f8df3fb7' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "customerName",
    "linkedAccountsIds": [“19923818823”, “342134123”],
    "code": "customerCode"
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
id path The customer ID to update Yes

Responses

The response will contain the updated customer in the regular structure.

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Delete MSP Customers

Summary: delete an MSP customer

Description: The call is used to delete an MSP customer

Request Example: Delete MSP Customer

curl --location --request DELETE 'https://api.mypileus.io/api/v1/msp/customers/fd50e8f0-823a-456e-9df8-7e14f8df3fb7' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
id path The customer Id to remove Yes

Responses

Code Description
200 successful deletion
400 Invalid Parameters value
500 Server error

MSP Billing Rules

Get MSP Billing Rules

Summary: Retrieves list of MSP Billing Rules

Description: The call is used to retrieve list of billing rules for an MSP

Request Example: Get MSP Billing Relues

curl --location --request GET 'https://api.mypileus.io/api/v1/msp/billing-rules' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{bearer-token}}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes

Responses

Response Example: Get MSP Billing Rules

[
   {
       "id": "2eee54d8",
       "name": "test1",
       "accountId": "932213950603",
       "creationDate": "2022-07-07",
       "frequency": "one time",
       "customers": "ALL",
       "effectiveMonth": "2022-06",
       "marginType": "custom-service-calc-cost",
       "margin": "20",
       "disableMinimumFee": false,
       "excludeAwsMarketplace": true,
       "customService": "Custom Service Name",
       "regions": [
           "af-south-1"
       ],
       "excludeService": true,
       "usageTypes": "ALL",
       "usageTypeOperator": "IS",
       "cloudFrontRegions": [],
       "services": [
           "Amazon Athena",
           "Amazon CloudFront",
           "Amazon Detective"
       ]
   }
]
Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

The response is an array of rules for the MSP.

Event Structure

Field Description
account_id The payer account id
uuid The event id
creation_time Time and date when this event was created in format YYYY-MM-DD hh:mm:ss
date Date of the event in format YYYY-MM-DD
description The description of the event
title The title of the event
user_key Identifier of user, who created this event
updating_time The last time and date when this event was updated in format YYYY-MM-DD hh:mm:ss

Create MSP Billing Rules

Summary: Create an MSP Billing Rule

Description: The call is used to create a new billing rule for an MSP

Request Example: Create MSP Billing Rule

curl --location --request POST 'https://api.mypileus.io/api/v1/msp/billing-rules' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-Token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "frequency": "recurring",
   "name": "Billing Rule 1",
   "linkedAccounts": "ALL",
   "startMonth": "2022-06",
   "endMonth": "2022-07",
   "marginType": "calc-cost",
   "margin": -50,
   "excludeAwsMarketplace": false,
   "regions": "ALL",
   "disableMinimumFee": false,
   "excludeService": false,
   "usageTypes": "ALL",
   "usageTypeOperator": "IS",
   "cloudFrontRegions": [],
   "services": ["AWS Premium Support"]
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
title body Event title Yes String
description body Event description Yes String
date body Event date Yes date
createdBy body Name of user creating the event Yes String

Responses

Response Example - TBD

Code Description
201 successful Creation
400 Invalid Parameters value
500 Server error

Edit MSP Billing Rules

Summary: Update an MSP Billing Rule

Description: The call is used to update an existing MSP Billing Rule

Request Example - Edit an MSP Billing Rule

curl --location --request PUT 'https://api.mypileus.io/api/v1/msp/billing-rules/23454' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "frequency": "recurring",
   "name": "Billing Rule 1",
   "linkedAccounts": "ALL",
   "startMonth": "2022-06",
   "endMonth": "2022-07",
   "marginType": "calc-cost",
   "margin": -50,
   "excludeAwsMarketplace": false,
   "regions": "ALL",
   "disableMinimumFee": false,
   "excludeService": false,
   "usageTypes": "ALL",
   "usageTypeOperator": "IS",
   "cloudFrontRegions": [],
   "services": ["AWS Premium Support"]
}'

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
id path The customer ID to update Yes

Responses

The response will contain the updated customer in the regular structure.

Code Description
200 successful retrieval
400 Invalid Parameters value
500 Server error

Delete MSP Billing Rules

Summary: delete an MSP Billing Rule

Description: The call is used to delete an MSP Billing Rule

Request Example: Delete MSP Billing rule

curl --location --request DELETE 'https://api.mypileus.io/api/v1/msp/billing-rules/234254' \
--header 'apikey: {{account-api-key}}' \
--header 'Authorization: {{Bearer-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''

Parameters

Name Located in Description Required Type
Authorization header Yes
apikey header Yes
id path The customer Id to remove Yes

Responses

Code Description
200 successful deletion
400 Invalid Parameters value
500 Server error