Skip to main content

Service Level Agreements API

General notes

Enumerators

ServiceLevelAgreementTimeTypeEnum:

This enumerator value is used in fields reaction_time_type and resolution_time_type.

NameTypeValue
ONLY_WEEKDAYSint1
CLASSIC_HOURSint2

Embeddable fields

NameTypeDescription
sla_categoryServiceLevelAgreementCategoryServiceLevelAgreementCategory.

Content

SLA collection:

Single SLA:

Clients collection

SLA Index

GET /api/v0/service-level-agreements

This method needs permission access on service-level-agreements.

Request

Index behaviourDefinition
Paginated by defaultNo
Sortingid, project_id, reaction_time, reaction_time_type, resolution_time, resolution_time_type, sla_category_id, created_at, updated_at
Filtersid:enum, project_id:string, reaction_time:int, reaction_time_type:enum, resolution_time: int, resolution_time_type: enum, sla_category_id: enum, created_at: date, updated_at: date
Embedded-
GET /api/v0/service-level-agreements HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/clients HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 10,
"project_id": 1,
"reaction_time": 2,
"reaction_time_type": "2",
"resolution_time": 2,
"resolution_time_type": "2",
"sla_category_id": 5,
"created_at": "2024-01-03T12:39:16+0100",
"updated_at": "2024-01-03T12:39:16+0100",
"_links": [
{
"href": "/api/v0/service-level-agreements/10",
"rel": "self",
"type": "GET"
}
]
}
]
}

Create SLA

CREATE /api/v0/service-level-agreements

This method needs permission create on service-level-agreements.

Method for creating SLA data.

Request

ParamTypeDescriptionRequirements
project_idintProject IDRequired. Has to be int. Must be unique pair with sla_category_id.
sla_category_idintService Level Agreement Category IDRequired. Has to be int. Must be unique pair with project_id.
reaction_timeintReaction time in hoursNullable. Has to be int.
reaction_time_typeintTime type (work hours, classic hours)Nullable. Max length is 1. Must be a value from ServiceLevelAgreementTimeTypeEnum.
resolution_timeintResolution time in hoursNullable. Has to be int.
resolution_time_typeintTime type (work hours, classic hours)Nullable. Max length is 1. Must be a value from ServiceLevelAgreementTimeTypeEnum.
POST /api/v0/service-level-agreements HTTP/1.1
Content-Type: application/json

{
"id": 10,
"project_id": 1,
"reaction_time": 2,
"reaction_time_type": 2,
"resolution_time": 2,
"resolution_time_type": 2,
"sla_category_id": 6
}

Response

200 OK

Created.

422 UNPROCESSABLE ENTITY

Validation error occurred.



Single SLA

SLA detail

GET /api/v0/service-level-agreements/{sla_id}

This method needs permission read on service-level-agreements.

Request

Index behaviourDefinition
Embedded-

Request

GET /api/v0/service-level-agreements/10 HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/service-level-agreements/10 HTTP/1.1
Content-Type: application/json

{
"id": 10,
"project_id": 1,
"reaction_time": 2,
"reaction_time_type": "2",
"resolution_time": 2,
"resolution_time_type": "2",
"sla_category_id": 5,
"created_at": "2024-01-03T12:39:16+0100",
"updated_at": "2024-01-03T12:39:16+0100",
"_links": [
{
"href": "/api/v0/service-level-agreements/10",
"rel": "self",
"type": "GET"
}
]
}

404 NOT FOUND

SLA was not found.

GET /api/v0/service-level-agreements/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-agreements/{sla_id}

This method needs permission update on service-level-agreements.

Method for updating SLA data.

Request

ParamTypeDescriptionRequirements
project_idintProject IDSometimes. Has to be int. Must be unique pair with sla_category_id.
sla_category_idintService Level Agreement Category IDSometimes. Has to be int. Must be unique pair with project_id.
reaction_timeintReaction time in hoursNullable. Has to be int.
reaction_time_typeintTime type (work hours, classic hours)Nullable. Max length is 1. Must be a value from ServiceLevelAgreementTimeTypeEnum.
resolution_timeintResolution time in hoursNullable. Has to be int.
resolution_time_typeintTime type (work hours, classic hours)Nullable. Max length is 1. Must be a value from ServiceLevelAgreementTimeTypeEnum.

For PATCH method any field can be omitted.

PATCH /api/v0/service-level-agreements/1 HTTP/1.1
Content-Type: application/json

{
"reaction_time_type": 1,
"reaction_time": 2
}

Response

200 OK

Successfully updated.

404 NOT FOUND

SLA with this ID not found.

422 UNPROCESSABLE ENTITY

Validation error occurred.


Delete SLA

DELETE /api/v0/service-level-agreements/{sla_id}

This method needs permission delete on service-level-agreements.

Method for deleting SLA.

DELETE /api/v0/service-level-agreements/1 HTTP/1.1
Content-Type: application/json

Response

204 NO CONTENT

Successfully deleted.

404 NOT FOUND

SLA with this ID not found.