Kalendář
TIP
Kalendáře jsou součástí výpočtu SLA v Zammadu.
Výpis
Požadované oprávnění: admin.calendar
Odeslaný požadavek GET: /api/v1/calendars
Details
json
// HTTP-Code 200 OK
[
{
"id": 2,
"name": "Test calendar",
"timezone": "Europe/Berlin",
"business_hours": {
"mon": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"tue": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"wed": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"thu": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"fri": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"sat": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
},
"sun": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
}
},
"default": false,
"ical_url": "",
"public_holidays": {
"2021-11-10": {
"active": true,
"summary": "Feast day 1"
},
"2021-11-11": {
"active": true,
"summary": "Feast day 2"
}
},
"last_log": null,
"last_sync": "2021-11-10T13:14:20.835Z",
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2021-11-10T13:14:20.835Z",
"updated_at": "2021-11-10T13:14:20.835Z"
}
]Zobrazení
Požadované oprávnění: admin.calendar
Odeslaný požadavek GET: /api/v1/calendars/{id}
Details
json
// HTTP-Code 200 OK
{
"id": 2,
"name": "Test calendar",
"timezone": "Europe/Berlin",
"business_hours": {
"mon": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"tue": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"wed": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"thu": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"fri": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"sat": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
},
"sun": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
}
},
"default": false,
"ical_url": "",
"public_holidays": {
"2021-11-10": {
"active": true,
"summary": "Feast day 1"
},
"2021-11-11": {
"active": true,
"summary": "Feast day 2"
}
},
"last_log": null,
"last_sync": "2021-11-10T13:14:20.835Z",
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2021-11-10T13:14:20.835Z",
"updated_at": "2021-11-10T13:14:20.835Z"
}Vytvoření
Požadované oprávnění: admin.calendar
Odeslaný požadavek POST: /api/v1/calendars
Details
json
{
"name": "Test calendar",
"timezone": "Europe/Berlin",
"business_hours": {
"mon": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"tue": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"wed": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"thu": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"fri": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"sat": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
},
"sun": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
}
},
"ical_url": "",
"public_holidays": {
"2021-11-10": {
"active": true,
"summary": "Feast day 1"
},
"2021-11-11": {
"active": true,
"summary": "Feast day 2"
}
},
"note": "",
"id": "c-1"
}Aktualizace
Požadované oprávnění: admin.calendar
Odeslaný požadavek PUT: /api/v1/calendars/{id}
Details
json
{
"name": "Test calendar Update",
"timezone": "Europe/Berlin",
"default": false,
"business_hours": {
"mon": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"tue": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"wed": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"thu": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"fri": {
"active": true,
"timeframes": [
[
"09:00",
"17:00"
]
]
},
"sat": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
},
"sun": {
"active": false,
"timeframes": [
[
"10:00",
"14:00"
]
]
}
},
"ical_url": "",
"public_holidays": {
"2021-11-10": {
"active": true,
"summary": "Feast day 1"
},
"2021-11-11": {
"active": true,
"summary": "Feast day 2"
}
},
"note": "",
"id": 2
}Smazání
Požadované oprávnění: admin.calendar
Odeslaný požadavek DELETE: /api/v1/calendars/{id}
DANGER
Jde o trvalé odstranění:
Odstranění konfigurací kalendářů nelze vrátit zpět.
Kalendáře s odkazy v konfiguracích SLA nelze odstranit přes API – signalizuje to "error": "Can't delete, object has references.". Nejde o chybu.
Details
json
// HTTP-Code 200 OK
{}