Werk #15435: password: return better responses for GET collection

Komponente REST API
Titel password: return better responses for GET collection
Datum 08.03.2023
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen
Checkmk versions & editions
2.3.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p25 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

Previously when calling the password GET collection endpoint, the value attribute would only contain the following information for each password

{
    "domainType": "dict",
    "title": "Kubernetes login"
}

It now contains links + the expected password information.

{
    'domainType': 'password',
    'extensions': {
        'comment': 'comment1\n',
        'documentation_url': '',
        'owned_by': None,
        'shared': ['all']
        },
    'id': 'password_1',
    'links': [
        {
            'domainType': 'link',
            'href': 'http://localhost/heute/check_mk/api/1.0/objects/password/password_1',
            'method': 'GET',
            'rel': 'self',
            'type': 'application/json'
        },
        {
            'domainType': 'link',
            'href': 'http://localhost/heute/check_mk/api/1.0/objects/password/password_1',
            'method': 'PUT',
            'rel': 'urn:org.restfulobjects:rels/update',
            'type': 'application/json'
        },
        {
            'domainType': 'link',
            'href': 'http://localhost/heute/check_mk/api/1.0/objects/password/password_1',
            'method': 'DELETE',
            'rel': 'urn:org.restfulobjects:rels/delete',
            'type': 'application/json'}
    ],
    'members': {
        'title': {
            'format': 'string',
            'id': 'title',
            'links': [
                {
                    'domainType': 'link',
                    'href': 'http://localhost/heute/check_mk/api/1.0/objects/password/password_1/properties/title',
                    'method': 'GET',
                    'rel': 'self',
                    'type': 'application/json'}
            ],
            'memberType': 'property',
            'title': None,
            'value': 'pw1'
        }
    },
    'title': 'pw1'
}

Zur Liste aller Werks