SLA Categories API
General notes
Enumerators
ServiceLevelAgreementCategoryNotificationTypeEnum:
This enumerator value is used in fields notification_type.
| Name | Type | Value´ |
|---|---|---|
NO_NOTIFICATION | int | 1 |
SMS | int | 2 |
EMAIL | int | 3 |
SLACK | int | 4 |
Embeddable fields
| Name | Type | Description |
|---|
Content
SLA Categories collection:
Single SLA Category:
Clients collection
SLA Categories Index
GET /api/v0/service-level-agreement-categories
This method needs permission
accessonservice-level-agreement-categories.
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | id, name, description, notification_type, created_at, updated_at |
| Filters | id:enum, name:string, name: string, notification_type:enum, created_at: date, updated_at: date |
| Embedded | - |
GET /api/v0/service-level-agreement-categories HTTP/1.1
Content-Type: application/json
Response
200 OK
GET /api/v0/service-level-agreement-categories HTTP/1.1
Content-Type: application/json
{
"items": [
{
"id": 5,
"name": "A",
"notification_type": "1",
"created_at": "2024-01-03T12:38:50+0100",
"updated_at": "2024-01-03T12:38:50+0100",
"_links": [
{
"href": "/api/v0/service-level-agreement-categories/5",
"rel": "self",
"type": "GET"
}
]
},
{
"id": 6,
"name": "B",
"notification_type": "1",
"created_at": "2024-01-03T12:38:50+0100",
"updated_at": "2024-01-03T12:38:50+0100",
"_links": [
{
"href": "/api/v0/service-level-agreement-categories/6",
"rel": "self",
"type": "GET"
}
]
}
]
}
Create SLA Category
CREATE /api/v0/service-level-agreement-categories
This method needs permission
createonservice-level-agreement-categories.
Method for creating SLA Category data.
Request
| Param | Type | Description | Requirements |
|---|---|---|---|
name | string | Name | Required. Has to be string. Max 100 chars. |
description | string | Description | Nullable. Has to be string. |
notification_type | int | Type of notification (SMS, mail, etc...) | Required. Has to be int. Max 1 digit. Must be a value from ServiceLevelAgreementCategoryNotificationTypeEnum. |
POST /api/v0/service-level-agreement-categories HTTP/1.1
Content-Type: application/json
{
"name": "D",
"description": "Incident type D vyjadřuje závažné poruchy systému.",
"notification_type": 1
}
Response
200 OK
POST /api/v0/service-level-agreement-categories/8 HTTP/1.1
Content-Type: application/json
{
"id": 8,
"name": "D",
"description": "Incident type D vyjadřuje závažné poruchy systému.",
"notification_type": "1",
"created_at": "2024-01-11T10:33:23+0100",
"updated_at": "2024-01-11T10:33:23+0100",
"_links": [
{
"href": "/api/v0/service-level-agreement-categories/8",
"rel": "self",
"type": "GET"
}
]
}
422 UNPROCESSABLE ENTITY
Validation error occurred.
Single SLA Category
SLA Category detail
GET /api/v0/service-level-agreement-categories/{sla_id}
This method needs permission
readonservice-level-agreement-categories.
Request
| Index behaviour | Definition |
|---|---|
| Embedded | - |
Request
GET /api/v0/service-level-agreement-categories/7 HTTP/1.1
Content-Type: application/json
Response
200 OK
GET /api/v0/service-level-agreement-categories/7 HTTP/1.1
Content-Type: application/json
{
"id": 7,
"name": "D",
"description": "Incident type D vyjadřuje závažné poruchy systému.",
"notification_type": "1",
"created_at": "2024-01-11T10:33:02+0100",
"updated_at": "2024-01-11T10:33:02+0100",
"_links": [
{
"href": "/api/v0/service-level-agreement-categories/7",
"rel": "self",
"type": "GET"
}
]
}
404 NOT FOUND
SLA was not found.
GET /api/v0/service-level-agreement-categories/2 HTTP/1.1
Content-Type: application/json
Status-Code: 404
{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}
Update SLA Category
PUT/PATCH /api/v0/service-level-agreement-categories/{sla_id}
This method needs permission
updateonservice-level-agreement-categories.
Method for updating SLA category data.
Request
| Param | Type | Description | Requirements |
|---|---|---|---|
name | string | Name | Sometimes. Has to be string. Max 100 chars. |
description | string | Description | Nullable. Has to be string. |
notification_type | int | Type of notification (SMS, mail, etc...) | Sometimes. Has to be int. Max 1 digit. Must be a value from ServiceLevelAgreementCategoryNotificationTypeEnum. |
For PATCH method any field can be omitted.
PATCH /api/v0/service-level-agreement-categories/8 HTTP/1.1
Content-Type: application/json
{
"description": "Incident typu D vyjadřuje mírné poruchy systému."
}
Response
200 OK
Successfully updated.
404 NOT FOUND
SLA Category with this ID not found.
422 UNPROCESSABLE ENTITY
Validation error occurred.
Delete SLA Category
DELETE /api/v0/service-level-agreement-categories/{sla_id}
This method needs permission
deleteonservice-level-agreement-categories.
Method for deleting SLA category.
DELETE /api/v0/service-level-agreement-categories/8 HTTP/1.1
Content-Type: application/json
Response
204 NO CONTENT
Successfully deleted.
404 NOT FOUND
SLA with this ID not found.