Skip to main content

Service Level Agreement Limits API

General notes

Enumerators

SlaLimitTimePeriodEnum:

This enumerator value is used in field time_period.

NameTypeValue
WEEKLYint1
MONTHLYint2

ContactTypeEnum:

This enumerator value is used in field contact_type.

NameTypeValue
EMAILint1

Embeddable fields


Content

SLA collection:

Single SLA:

Clients collection

SLA Limits Collection

GET /api/v0/service-level-agreement-limits

This method needs permission access on service-level-agreement-limits.

Request

Index behaviourDefinition
Paginated by defaultNo
Sortingid, project_id, time_limit_in_hours, time_period, contact_type, contact, deactivated_until_next_period, created_at, updated_at
Filtersid: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 create on service-level-agreement-limits.

Method for creating SLA Limit.

Request

ParamTypeDescriptionRequirements
project_idintProject IDRequired. Has to be int. Must reference a valid project.
time_limit_in_hoursintLimit in hoursRequired. Has to be int.
time_periodintTime period for time limitRequired. Has to be value from SlaLimitTimePeriodEnum.
contact_typeintContact typeRequired. has to be value from ContactTypeEnum.
contactstringContact itself (email)Required. Has to be string.
deactivated_until_next_periodboolFlags whether the limit has been deactivated for current period.Present. Default: false.
categoriesarrayCategories 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 read on service-level-agreement-limits.

Request

Index behaviourDefinition
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 update on service-level-agreement-limits.

Method for updating SLA data.

Request

ParamTypeDescriptionRequirements
project_idintProject IDSometimes. Has to be int. Must reference a valid project.
time_limit_in_hoursintLimit in hoursSometimes. Has to be int.
time_periodintTime period for time limitSometimes. Has to be value from SlaLimitTimePeriodEnum.
contact_typeintContact typeSometimes. has to be value from ContactTypeEnum.
contactstringContact itself (email)Sometimes. Has to be string.
deactivated_until_next_periodboolFlags whether the limit has been deactivated for current period.Sometimes. Default: false.
categoriesarrayCategories 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 delete on service-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.