Skip to main content

SLA Categories API

General notes

Enumerators

ServiceLevelAgreementCategoryNotificationTypeEnum:

This enumerator value is used in fields notification_type.

NameTypeValue´
NO_NOTIFICATIONint1
SMSint2
EMAILint3
SLACKint4

Embeddable fields

NameTypeDescription

Content

SLA Categories collection:

Single SLA Category:

Clients collection

SLA Categories Index

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

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

Request

Index behaviourDefinition
Paginated by defaultNo
Sortingid, name, description, notification_type, created_at, updated_at
Filtersid: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 create on service-level-agreement-categories.

Method for creating SLA Category data.

Request

ParamTypeDescriptionRequirements
namestringNameRequired. Has to be string. Max 100 chars.
descriptionstringDescriptionNullable. Has to be string.
notification_typeintType 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 read on service-level-agreement-categories.

Request

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

Method for updating SLA category data.

Request

ParamTypeDescriptionRequirements
namestringNameSometimes. Has to be string. Max 100 chars.
descriptionstringDescriptionNullable. Has to be string.
notification_typeintType 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 delete on service-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.