Werk #15218: time_period: response schemas updated to align with other endpoints.
Component | REST API |
Title | time_period: response schemas updated to align with other endpoints. |
Date | Feb 8, 2023 |
Checkmk Edition | Checkmk Raw (CRE) |
Checkmk Version | 2.2.0b1 2.1.0p21 |
Level | Trivial Change |
Class | Bug Fix |
Compatibility | Compatible - no manual interaction needed |
This werk introduces a fix for the time period collection and object respsonse schemas.
For example, the previous collection response looked like this
{
"links": [
{
"domainType": "link",
"rel": "self",
"href": "http://localhost/heute/check_mk/api/1.0/domain-types/time_period/collections/all",
"method": "GET",
"type": "application/json"
}
],
"id": "timeperiod",
"domainType": "time_period",
"value": [
{
"domainType": "dict",
"title": "tp1"
},
]
}
It now looks like this
{
"links": [
{
"domainType": "link",
"rel": "self",
"href": "http://localhost/heute/check_mk/api/1.0/domain-types/time_period/collections/all",
"method": "GET",
"type": "application/json"
}
],
"id": "time_period",
"domainType": "time_period",
"value": [
{
"links": [
{
"domainType": "link",
"rel": "self",
"href": "http://localhost/heute/check_mk/api/1.0/objects/time_period/time_period_1",
"method": "GET",
"type": "application/json"
},
{
"domainType": "link",
"rel": "urn:org.restfulobjects:rels/update",
"href": "http://localhost/heute/check_mk/api/1.0/objects/time_period/time_period_1",
"method": "PUT",
"type": "application/json"
},
{
"domainType": "link",
"rel": "urn:org.restfulobjects:rels/delete",
"href": "http://localhost/heute/check_mk/api/1.0/objects/time_period/time_period_1",
"method": "DELETE",
"type": "application/json"
}
],
"domainType": "time_period",
"id": "time_period_1",
"title": "tp1",
"members": {},
"extensions": {
"alias": "tp1",
"active_time_ranges": [
{
"day": "monday",
"time_ranges": [
{
"start": "12:00",
"end": "15:00"
}
]
}
],
"exceptions": [],
"exclude": []
}
},
],
"extensions": {}
}