### Endpoint: `/api/oneboard/`
**Method**: GET
**Description**: Fetch noteboard details for a specific customer based on the given ID.
#### Parameters
| Parameter | Type | Required | Description | Example Value |
|-----------|--------|----------|---------------------------------------|---------------|
| format | string | No | Specifies the response format | json |
| customer | integer| Yes | The ID of the customer | 54 |
| limit | integer| No | The number of results to fetch per page | 10 |
| orderBy | string | No | The field by which results are sorted | time_from |
| page | integer| No | The page number for pagination | 1 |
| total | integer| No | Total count of items | 100 |
| wanted | string | No | Filter based on the status of noteboards (active, archive, scheduled, overdue) | active |
#### Headers
| Header | Type | Required | Description | Example Value |
|----------------|--------|----------|----------------------------------|---------------------|
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Example Response
{
"data": [
{
"id": 59653,
"customer": {
"id": 54,
"name": "UBuy",
... CUSTOMER DETAILS ...
},
"host": "%HostTest%",
"service": "%ServiceTest%",
... NOTE DETAILS ...
"user": {
"username": "username",
... USER DETAILS ...
},
}
],
}
---
### Endpoint: `/api/oneboard/`
**Method**: POST
**Description**: Create a new noteboard entry.
#### 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 <token> |
### Example Payload
{
"customer": CUSTOMER_ID,
"category": CATEGORY_ID,
"status": STATUS_NUM,
"host": "HOST",
"service": "SERVICE",
"time_from": "TIME_FROM_VALUE",
"time_to": "TIME_TO_VALUE",
"description": "DESCRIPTION"
}
**NOTES**:
1. If you enter a date that has passed the request isn't going to be added to the note-board although no error is returned.
2. In host and service values, we use the symbol % to start and end the value we want.
For example: "%CPU%" will include all the field containing "CPU" for this tenant. Leaving it empty between the symbols will include all the field `"%%"`, in other words it's ANY alert in this tenant
### Example Response
Expanded details of the **Attention/Discard**
---
### Endpoint: `/api/oneboard/{id}/`
**Method**: GET
**Description**: Retrieve details of a specific noteboard entry by ID.
#### Parameters
| Parameter | Type | Required | Description | Example Value |
|-----------|---------|----------|------------------------------------|---------------|
| id | integer | Yes | Unique identifier for the noteboard entry | 123 |
#### Headers
| Header | Type | Required | Description | Example Value |
|----------------|--------|----------|----------------------------------|---------------------|
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Example Response
{
"journal": [
{
"input": {
... NOTE DETAILS ...
},
"method": "create",
"username": "username"
}
]
}
---
### Endpoint: `/api/oneboard/{id}/`
**Method**: PUT
**Description**: Update an existing noteboard entry by ID.
#### Parameters
| Parameter | Type | Required | Description | Example Value |
|-----------|---------|----------|------------------------------------|---------------|
| id | integer | Yes | Unique identifier for the noteboard entry | 123 |
#### Headers
| Header | Type | Required | Description | Example Value |
|----------------|--------|----------|----------------------------------|---------------------|
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Request Payload
{
"customer": "{customer_id}",
"category": 1,
"status": 1,
"host": "%host%",
"service": "%service%",
"time_from": "2024-11-09 12:09:00",
"time_to": "2024-12-30 13:09:00",
"description": "description",
"downtime": false
}
### Example Response
The details of the request (payload)
---
### Endpoint: `/api/oneboard/{id}/`
**Method**: DELETE
**Description**: Delete a specific noteboard entry by ID.
#### Parameters
| Parameter | Type | Required | Description | Example Value |
|-----------|---------|----------|------------------------------------|---------------|
| id | integer | Yes | Unique identifier for the noteboard entry | 123 |
#### Headers
| Header | Type | Required | Description | Example Value |
|----------------|--------|----------|----------------------------------|---------------------|
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Example Response
`1`
`This response means that the request has succeeded`
---
### Endpoint:`/api/oneboard/{id}/unactivate/`
**Method**: POST
**Description**: Unactivate a specific noteboard entry by ID.
#### Parameters
| Parameter | Type | Required | Description | Example Value |
|-----------|---------|----------|------------------------------------|---------------|
| id | integer | Yes | Unique identifier for the noteboard entry | 123 |
#### Headers
| Header | Type | Required | Description | Example Value |
|----------------|--------|----------|----------------------------------|---------------------|
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
**Note:** The payload here is empty payload: `{}`
### Example Response
`200`
`This response means that the request has succeeded`
---
### Endpoint: `/api/oneboard/host_services/?customer={id}`
**Method**: GET
**Description**: Retrieve all the hosts and services for a specific customer by ID.
#### Parameters
| Parameter | Type | Required | Description | Example Value |
|-----------|---------|----------|------------------------------------|---------------|
| customer | integer | Yes | Unique identifier for the customer | 54 |
#### Headers
| Header | Type | Required | Description | Example Value |
|----------------|--------|----------|----------------------------------|---------------------|
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Example Response
{
"hosts": [
... HOSTS DETAILS ...
],
"services": [
... SERVICES DETAILS ...
]
}
---
### Endpoint: `/api/oneboard/test/?format=json&customer={id}&host=%25%25&service=%25%25`
**Method**: GET
**Description**: Validates the host selection during noteboard creation.
#### Parameters
| Parameter | Type | Required | Description | Example Value |
|-----------|---------|----------|------------------------------------|---------------|
| customer | integer | Yes | Unique identifier for the customer | 54 |
| host | string | Yes | Include the host value | %test% |
| service | string | Yes | Include the service value | %% |
#### Headers
| Header | Type | Required | Description | Example Value |
|----------------|--------|----------|----------------------------------|---------------------|
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
#### Example Response
{
"total": 1,
"alerts": [
{
... ALERTS DETAILS ...
}
],
"query": "\n SELECT a.id, b.subject\n FROM alert2 a \n INNER JOIN raw b ON a.raw_id = b.id\n WHERE b.host LIKE '%%%%%%%%' AND b.service LIKE '%%%%%%%%' AND a.customer_id = 54 AND a.time > NOW() - INTERVAL 1 MONTH\n GROUP BY b.subject\n "
}
---