Service Level Agreement Limits API
General notes
Enumerators
SlaLimitTimePeriodEnum:
This enumerator value is used in field time_period.
| Name | Type | Value |
|---|---|---|
WEEKLY | int | 1 |
MONTHLY | int | 2 |
ContactTypeEnum:
This enumerator value is used in field contact_type.
| Name | Type | Value |
|---|---|---|
EMAIL | int | 1 |
Embeddable fields
Content
SLA collection:
Single SLA:
Clients collection
SLA Limits Collection
GET /api/v0/service-level-agreement-limits
This method needs permission
accessonservice-level-agreement-limits.
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | id, project_id, time_limit_in_hours, time_period, contact_type, contact, deactivated_until_next_period, created_at, updated_at |
| Filters | id:enum, project_id:int, time_limit_in_hours:int, time_period:enum, contact_type: enum, contact: string, deactivated_until_next_period: bool, created_at: date, updated_at: date |
| Embedded | - |
GET /api/v0/service-level-agreement-limits HTTP/1.1
Content-Type: application/json
Response
200 OK
GET /api/v0/service-level-agreement-limits HTTP/1.1
Content-Type: application/json
{
"items": [
{
"id": 1,
"project_id": 1,
"time_limit_in_hours": 20,
"time_period": 2,
"contact_type": 1,
"contact": "pech@simplo.cz",
"categories": [
"A",
"B"
],
"deactivated_until_next_period": false,
"created_at": "2025-02-10T09:49:38+0100",
"updated_at": "2025-02-10T09:49:38+0100",
"_links": [
{
"href": "/api/v0/service-level-agreement-limits/1",
"rel": "self",
"type": "GET"
}
]
}
]
}
Create SLA Limit
CREATE /api/v0/service-level-agreement-limits
This method needs permission
createonservice-level-agreement-limits.
Method for creating SLA Limit.
Request
| Param | Type | Description | Requirements |
|---|---|---|---|
project_id | int | Project ID | Required. Has to be int. Must reference a valid project. |
time_limit_in_hours | int | Limit in hours | Required. Has to be int. |
time_period | int | Time period for time limit | Required. Has to be value from SlaLimitTimePeriodEnum. |
contact_type | int | Contact type | Required. has to be value from ContactTypeEnum. |
contact | string | Contact itself (email) | Required. Has to be string. |
deactivated_until_next_period | bool | Flags whether the limit has been deactivated for current period. | Present. Default: false. |
categories | array | Categories which do belong under this limit. | Required. Each category must be of type string. |
POST /api/v0/service-level-agreement-limits HTTP/1.1
Content-Type: application/json
{
"project_id": 1,
"time_limit_in_hours": 20,
"time_period": 2,
"contact_type": 1,
"contact": "pech@simplo.cz",
"deactivated_until_next_period": false,
"categories": ["A", "B"]
}
Response
200 OK
Created.
{
"id": 3,
"project_id": 1,
"time_limit_in_hours": 20,
"time_period": 2,
"contact_type": 1,
"contact": "pech@simplo.cz",
"categories": [
"A",
"B"
],
"deactivated_until_next_period": true,
"created_at": "2025-02-10T10:51:43+0100",
"updated_at": "2025-02-10T10:51:43+0100",
"_links": [
{
"href": "/api/v0/service-level-agreement-limits/3",
"rel": "self",
"type": "GET"
}
]
}
401 UNAUTHENTICATED
Validation error occurred.
422 UNPROCESSABLE ENTITY
Validation error occurred.
Single SLA Limit
SLA detail
GET /api/v0/service-level-agreement-limits/{sla_limit_id}
This method needs permission
readonservice-level-agreement-limits.
Request
| Index behaviour | Definition |
|---|---|
| Embedded | - |
Request
GET /api/v0/service-level-agreement-limits/3 HTTP/1.1
Content-Type: application/json
Response
200 OK
{
"id": 3,
"project_id": 1,
"time_limit_in_hours": 20,
"time_period": 2,
"contact_type": 1,
"contact": "pech@simplo.cz",
"categories": [
"A",
"B"
],
"deactivated_until_next_period": true,
"created_at": "2025-02-10T10:51:43+0100",
"updated_at": "2025-02-10T10:51:43+0100",
"_links": [
{
"href": "/api/v0/service-level-agreement-limits/3",
"rel": "self",
"type": "GET"
}
]
}
401 UNAUTHORIZED
Unauthorized.
404 NOT FOUND
SLA Limit was not found.
GET /api/v0/service-level-agreement-limits/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
PUT/PATCH /api/v0/service-level-agreement-limits/{sla_limit_id}
This method needs permission
updateonservice-level-agreement-limits.
Method for updating SLA data.
Request
| Param | Type | Description | Requirements |
|---|---|---|---|
project_id | int | Project ID | Sometimes. Has to be int. Must reference a valid project. |
time_limit_in_hours | int | Limit in hours | Sometimes. Has to be int. |
time_period | int | Time period for time limit | Sometimes. Has to be value from SlaLimitTimePeriodEnum. |
contact_type | int | Contact type | Sometimes. has to be value from ContactTypeEnum. |
contact | string | Contact itself (email) | Sometimes. Has to be string. |
deactivated_until_next_period | bool | Flags whether the limit has been deactivated for current period. | Sometimes. Default: false. |
categories | array | Categories which do belong under this limit. | Sometimes. Each category must be of type string. |
For PATCH method any field can be omitted.
PATCH /api/v0/service-level-agreement-limits/3 HTTP/1.1
Content-Type: application/json
{
"contact": "bzatek@simplo.cz",
"deactivated_until_next_period": true,
}
Response
200 OK
Successfully updated.
404 NOT FOUND
SLA with this ID not found.
422 UNPROCESSABLE ENTITY
Validation error occurred.
Delete SLA Limit
DELETE /api/v0/service-level-agreement-limits/{sla_limit_id}
This method needs permission
deleteonservice-level-agreement-limits.
Method for deleting SLA.
DELETE /api/v0/service-level-agreement-limits/1 HTTP/1.1
Content-Type: application/json
Response
204 NO CONTENT
Successfully deleted.
404 NOT FOUND
SLA with this ID not found.