gobj_build_authzs_doc()

gobj_build_authzs_doc()#

gobj_build_authzs_doc() generates a JSON object describing the authorization levels available for a given service or globally.

Prototype

json_t *gobj_build_authzs_doc(
    hgobj      gobj,
    const char *cmd,
    json_t     *kw
);

Parameters

Key

Type

Description

gobj

hgobj

The GObj instance from which to retrieve authorization levels.

cmd

const char *

The command name, currently unused in the function.

kw

json_t *

A JSON object containing optional parameters: ‘authz’ to filter by authorization level and ‘service’ to specify a particular service.


Return Value

A JSON object containing the authorization levels for the specified service or globally. If a specific authorization level is requested and not found, an error message is returned as a JSON string.

Notes

If ‘service’ is provided in kw, the function retrieves the authorization levels for that service. If ‘authz’ is specified, it filters the results to include only the requested authorization level.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples