## Endpoint: `/api/tasks/`
**Method**: GET
**Description**: Fetch the list of all proactive tasks.
### Parameters
| Parameter | Type | Required | Description | Example Value |
| --------- | ------- | -------- | ---------------------------------- | ------------- |
| customer | integer | No | Unique identifier for the customer | 99 |
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Response
{
"data": [
{
"id": <Proactiveid>,
"name": "<ProactiveName",
"customer": "<CustomerName>",
... PROACTIVE DETAILS ...
}
]
}
---
## Endpoint: `/api/tasks/`
**Method**: POST
**Description**: Activate when saving new proactive settings.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|None|-|-|No parameters required|-|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Request Body
{
"name": "{TaskName}",
"service": "{Service}",
"todo_list": "{id}",
"sla": 3,
"host": "ProActive",
"severity": "{Severity}",
"customer": "{Customerid}",
"schedule": "{\"minute\":\"MM\",\"hour\":\"H1,H2,H3,H4\",\"day-of-week\":\"D1,D2,D3\"}",
"last_run": null,
"schedule_type": "weekly",
"active": true
}
### Example Response
`The details of the task are plotted. Which is the payload`
---
## Endpoint: `/api/tasks/{id}/`
**Method**: GET
**Description**: Retrieve details of a specific proactive task by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the proactive task|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Response
`The details of the task are plotted. Which is the payload`
---
## Endpoint: `/api/tasks/{id}/`
**Method**: PUT
**Description**: Update details of a specific proactive task by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the proactive task|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Request Body
{
"name": "{TaskName}",
"service": "{Service}",
"todo_list": "{id}",
"sla": 3,
"host": "ProActive",
"severity": "{Severity}",
"customer": "{Customerid}",
"schedule": "{\"minute\":\"MM\",\"hour\":\"H1,H2,H3,H4\",\"day-of-week\":\"D1,D2,D3\"}",
"last_run": null,
"schedule_type": "weekly",
"active": true
}
### Example Response
`The details of the task are plotted. Which is the payload`
---
## Endpoint: `/api/tasks/{id}/`
**Method**: DELETE
**Description**: Delete a specific proactive task by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the proactive task|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Response
`1`
`This response means that the request has succeeded`
---
## Endpoint: `/api/tasks/{id}/get_task_data/`
**Method**: GET
**Description**: Return all the relevant data for the proactive task by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the proactive task|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Response
{
"id": <Taskid>,
"last_run": "2017-01-29T08:59:34.381449Z",
"active": true,
... PROACTIVE DETAILS ...
}
---
## Endpoint: `/api/webhook/`
**Method**: POST
**Description**: Create a new webhook.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|None|-|-|No parameters required|-|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Request Body
{
"headers": "[[\"Authorization\",\"Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"]]",
"customer": {Customerid},
"name": "test",
"use_credentials": false,
"method": 2,
"content_type": 1,
"url": "{URL}",
"payload": "{\n\"host\": \"test\",\n\"service\": \"test\"\n}",
"username": null,
"password": null,
"token": null
}
### Example Response
`The details of the task are plotted. Which is the payload`
---
## Endpoint: `/api/webhook/mass_deactivate/
**Method**: PATCH
**Description**: Delete a specific webhook by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the webhook|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Payload
{
"ids": [WEBHOOK_ID]
}
### Example Response
`1`
This response means that the request succeeded
---
## Endpoint: `/api/kpi/
**Method**: GET
**Description**: Retrieve all the webhook details.
### Parameters
| Parameter | Type | Required | Description | Example Value |
| ----------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| customer | integer | Yes | Unique identifier for the customer | 99 |
| pagination | string | No | Encoded JSON string for pagination | {"start_id":null,"hasMore":false,"total":0} |
| request_key | string | Yes | request key is unique identifier that can have any number generated in frontend. Choose random number for request key | 1735555758030 |
| searched | string | No | Encoded JSON string for search filters | {"general":""} |
| sorting | string | No | Specifies the sorting field | -status |
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Response
{
"count": 1,
"results": [
{
... SMARTRULE DETAILS ...
}
}
---
## Endpoint: `/api/kpi/`
**Method**: POST
**Description**: Create a new Smart Rule.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|None|-|-|No parameters required|-|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Request Body
{
"params":{
"customer_id":CUSTOMER_ID,
"description":"Test",
"name":"Test",
"sla_warning":null,
"sla_critical":null,
"sla_downtime":null,
"pivot":null,
"rules":
[{"search_query":"{\"host\":[\"TESSTTTT\",\"contains\"]}","name":"R1","warning":0,"critical":1}],
"group_ids":[],
"template_ids":[],
"search_query":"[0]",
"todo_list_warning_id":null,
"todo_list_critical_id":null,
"todo_list_downtime_id":null,
"dashboards":[],
"use_info_for_alert":true,
"alert_name":"Test",
"alert_description":"Test"
}
}
### Example Response
{
id=ID_NUMBER
}
Returns ID of the new created KPI
---
## Endpoint: `/api/kpi/{id}/`
**Method**: GET
**Description**: Retrieve details of a specific Smart Rule by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the Smart Rule|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Request
### Request Body
None
### Example Response
```json
{
"id": 12345,
"name": "Smart Rule Name",
"description": "Smart Rule Details",
"status": "active"
}
```
---
## Endpoint: `/api/kpi/{id}/`
**Method**: PATCH
**Description**: Update details of a specific Smart Rule by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the Smart Rule|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Request Payload
{
"params": {
"customer_id": "54",
"description": "testDec123",
"name": "testDec123",
"sla_warning": null,
"sla_critical": null,
"sla_downtime": null,
"pivot": null,
"rules": [
{
"search_query": "{\"host\":[\"testDec\",\"contains\"]}",
"name": "R1Dec",
"warning": 2,
"critical": 4
}
],
"group_ids": [],
"template_ids": [],
"search_query": "[0,\"or\",1]",
"todo_list_warning_id": null,
"todo_list_critical_id": null,
"todo_list_downtime_id": null,
"dashboards": [],
"use_info_for_alert": true,
"alert_name": "testDecDec",
"alert_description": "testDec2"
}
}
### Example Response
`1`
This response means that the request succeeded
---
## Endpoint: `/api/kpi/{id}/`
**Method**: DELETE
**Description**: Delete a specific Smart Rule by ID.
### Parameters
|Parameter|Type|Required|Description|Example Value|
|---|---|---|---|---|
|id|string|Yes|Unique identifier for the Smart Rule|12345|
### Headers
|Header|Type|Required|Description|Example Value|
|---|---|---|---|---|
|Authorization|string|Yes|Bearer token for authentication|Bearer|
### Example Response
{
"error": null
}
This response means that the request succeeded
---