Star

linkKener APIs

Kener also gives APIs to push data and create incident. Before you use kener apis you will have to set an authorization token called API_TOKEN. This also has to be set as an environment variable.

1linkexport API_TOKEN=some-token-set-by-you

Additonally you can set IP whitelisting by setting another environment token called API_IP or API_IP_REGEX. If you set both API_IP and API_IP_REGEX, API_IP will be given preference. Read more here


linkUpdate Status - API

Static Badge

The update status API can be used to manually update the state of a monitor from a remote server.

linkRequest Body

ParameterDescription
statusRequired Can be only UP/DOWN/DEGRADED
latencyRequired In Seconds. Leave 0 if not required
timestampInSecondsOptional Timestamp in UTC seconds. Defaults to now. Should between 90 Days and now
tagRequired Monitor Tag set in monitors.yaml
1linkcurl --request POST \

2link --url http://your-kener.host/api/status \

3link --header 'Authorization: Bearer some-token-set-by-you' \

4link --header 'Content-Type: application/json' \

5link --data '{

6link "status": "DOWN",

7link "latency": 1213,

8link "timestampInSeconds": 1702405860,

9link "tag": "google-search"

10link}'

linkResponse

1link{

2link "status": 200,

3link "message": "success at 1702405860"

4link}

This will update the status of the monitor with tag google-search to DOWN at UTC 1702405860


linkGet Status - API

Static Badge

Use this API to get the status of a monitor.

linkRequest

Replace google-search with your monitor tag in query param

1linkcurl --request GET \

2link --url 'http://your-kener.host/api/status?tag=google-search' \

3link --header 'Authorization: Bearer some-token-set-by-you'

linkResponse

1link{

2link "status": "UP",

3link "uptime": "9.0026",

4link "lastUpdatedAt": 1706447160

5link}


linkCreate an Incident - API

Static Badge

Can be use to create an incident from a remote server

linkRequest Body

ParameterDescription
startDatetimeOptional When did the incident start in UTC second
endDatetimeOptional When did the incident end in UTC seconds
titleRequired Title of the incident
bodyOptional Body of the incident
tagsRequired Array of String, Monitor Tags of the incident
impactOptional Can be only DOWN/DEGRADED
isMaintenanceOptional Boolean if incident is a maintenance
isIdentifiedOptional Incident identified
isResolvedOptional Incident resolved
1linkcurl --request POST \

2link --url http://your-kener.host/api/incident \

3link --header 'Authorization: Bearer some-token-set-by-you' \

4link --header 'Content-Type: application/json' \

5link --data '{

6link "startDatetime": 1702405740,

7link "endDatetime": 1702405920,

8link "title": "Outage in Mumbai",

9link "body": "Login cluster is down in mumbai region",

10link "tags": ["google-search"],

11link "impact": "DOWN",

12link "isMaintenance": false,

13link "isIdentified": true,

14link "isResolved": false

15link}'

linkResponse

1link{

2link "createdAt": 1703940450,

3link "closedAt": null,

4link "title": "Outage in Mumbai",

5link "tags": ["google-search"],

6link "incidentNumber": 12,

7link "startDatetime": 1702405740,

8link "endDatetime": 1702405920,

9link "body": "Login cluster is down in mumbai region",

10link "impact": "DOWN",

11link "isMaintenance": false,

12link "isIdentified": true,

13link "isResolved": false

14link}


linkUpdate an Incident - API

Static Badge

Can be use to update an incident from a remote server. It will clear values if not passed

linkRequest Param

linkRequest Body

ParameterDescription
startDatetimeOptional When did the incident start in UTC second
endDatetimeOptional When did the incident end in UTC seconds
titleRequired Title of the incident
bodyOptional Body of the incident
tagsRequired Array of String, Monitor Tags of the incident
impactOptional Can be only DOWN/DEGRADED
isMaintenanceOptional Boolean if incident is a maintenance
isIdentifiedOptional Incident identified
isResolvedOptional Incident resolved
1linkcurl --request PATCH \

2link --url http://your-kener.host/api/incident/{incidentNumber} \

3link --header 'Authorization: Bearer some-token-set-by-you' \

4link --header 'Content-Type: application/json' \

5link --data '{

6link "startDatetime": 1702405740,

7link "endDatetime": 1702405920,

8link "title": "Outage in Mumbai",

9link "body": "Login cluster is down in mumbai region",

10link "tags": ["google-search"],

11link "impact": "DOWN",

12link "isMaintenance": false,

13link "isIdentified": true,

14link "isResolved": false

15link}'

linkResponse

1link{

2link "createdAt": 1703940450,

3link "closedAt": null,

4link "title": "Outage in Mumbai",

5link "tags": ["google-search"],

6link "incidentNumber": 12,

7link "startDatetime": 1702405740,

8link "endDatetime": 1702405920,

9link "body": "Login cluster is down in mumbai region",

10link "impact": "DOWN",

11link "isMaintenance": false,

12link "isIdentified": true,

13link "isResolved": false

14link}


linkGet an Incident - API

Static Badge

Use incidentNumber to fetch an incident

linkRequest Body

1linkcurl --request GET \

2link --url http://your-kener.host/api/incident/{incidentNumber} \

3link --header 'Authorization: Bearer some-token-set-by-you' \

linkResponse

1link{

2link "createdAt": 1703940450,

3link "closedAt": null,

4link "title": "Outage in Mumbai",

5link "tags": ["google-search"],

6link "incidentNumber": 12,

7link "startDatetime": 1702405740,

8link "endDatetime": 1702405920,

9link "body": "Login cluster is down in mumbai region",

10link "impact": "DOWN",

11link "isMaintenance": false,

12link "isIdentified": true,

13link "isResolved": false

14link}


linkAdd Comment - API

Static Badge

Add comments for incident using incidentNumber

linkRequest

1linkcurl --request POST \

2link --url http://your-kener.host/api/incident/{incidentNumber}/comment \

3link --header 'Authorization: Bearer some-token-set-by-you' \

4link --header 'Content-Type: application/json' \

5link --data '{

6link "body": "comment 1"

7link}'

linkResponse

1link{

2link "commentID": 1873376745,

3link "body": "comment 1",

4link "createdAt": 1704123938

5link}


linkGet Comments - API

Static Badge

Use this API to fetch all the comments for an incident

linkRequest

1linkcurl --request GET \

2link --url http://your-kener.host/api/incident/{incidentNumber}/comment \

3link --header 'Authorization: Bearer some-token-set-by-you' \

linkResponse

1link[

2link {

3link "commentID": 1873372042,

4link "body": "comment 1",

5link "createdAt": 1704123116

6link },

7link {

8link "commentID": 1873372169,

9link "body": "comment 2",

10link "createdAt": 1704123139

11link }

12link]


linkUpdate Incident Status - API

Static Badge

Use this to API to update the status of an ongoing incident.

linkRequest Body

ParameterDescription
isIdentifiedOptional Boolean, set it when incident has been identified
isResolvedOptional Boolean, set it when incident has been resolved
endDatetimeOptional When did the incident end in UTC seconds

linkRequest

1linkcurl --request POST \

2link --url http://your-kener.host/api/incident/{incidentNumber}/status \

3link --header 'Authorization: Bearer some-token-set-by-you' \

4link --header 'Content-Type: application/json' \

5link --data '{

6link "isIdentified": true,

7link "isResolved": false

8link "endDatetime": 1702405920

9link}'

linkResponse

1link{

2link "createdAt": 1703940450,

3link "closedAt": null,

4link "title": "Outage in Mumbai",

5link "tags": ["google-search"],

6link "incidentNumber": 12,

7link "startDatetime": 1702405740,

8link "endDatetime": 1702405920,

9link "body": "Login cluster is down in mumbai region",

10link "impact": "DOWN",

11link "isMaintenance": false,

12link "isIdentified": true,

13link "isResolved": false

14link}


linkSearch Incidents - API

Static Badge

Use this to API to search incidents.

linkRequest Body

ParameterDescription
stateOptional open or closed. Default is open
tagsOptional Comma separated monitor tags, example: earth,google-seach
pageOptional Page number, starts with 1, defaults to 1
per_pageOptional Page size, defaults to 10, max is 100
created_after_utcOptional timestamp in UTC seconds when the incident was created after. Example: 1702405920
created_before_utcOptional timestamp in UTC seconds when the incident was created before . Example: 1702405920
title_likeOptional search incidents with title

linkRequest

Search incidents that are closed and title contains hello incident

1linkcurl --request POST \

2link --url http://your-kener.host/api/incident?state=closed&title_like=Hello%20Incident \

3link --header 'Authorization: Bearer some-token-set-by-you' \

4link --header 'Content-Type: application/json' \

5link --data '{

6link "isIdentified": true,

7link "isResolved": false

8link "endDatetime": 1702405920

9link}'

linkResponse

1link[

2link {

3link "createdAt": 1703940450,

4link "closedAt": null,

5link "title": "Outage in Mumbai - Hello Incident",

6link "tags": ["google-search"],

7link "incidentNumber": 12,

8link "startDatetime": 1702405740,

9link "endDatetime": 1702405920,

10link "body": "Login cluster is down in mumbai region",

11link "impact": "DOWN",

12link "isMaintenance": false,

13link "isIdentified": true,

14link "isResolved": false

15link }

16link]

Kener APIsUpdate Status - APIRequest BodyResponseGet Status - APIRequestResponseCreate an Incident - APIRequest BodyResponseUpdate an Incident - APIRequest ParamRequest BodyResponseGet an Incident - APIRequest BodyResponseAdd Comment - APIRequestResponseGet Comments - APIRequestResponseUpdate Incident Status - APIRequest BodyRequestResponseSearch Incidents - APIRequest BodyRequestResponse

Home Quick Start How it works Environment Variables Deployment Github Setup Customize Site Internationalization Monitors Monitor Examples Incident Management Kener APIs Status Badges Showcase