gobj_list_resource()

gobj_list_resource()#

gobj_list_resource() retrieves a list of resources from the specified hgobj object, applying optional filtering and additional options.

Prototype

json_t *gobj_list_resource(
    hgobj gobj,
    const char *resource,
    json_t *jn_filter,  // owned
    json_t *jn_options  // owned
);

Parameters

Key

Type

Description

gobj

hgobj

The hgobj instance from which to retrieve the resource list.

resource

const char *

The name of the resource to be listed.

jn_filter

json_t *

A JSON object containing filtering criteria. Owned by the caller.

jn_options

json_t *

A JSON object containing additional options for listing resources. Owned by the caller.


Return Value

Returns a JSON object containing the list of resources. The caller is responsible for managing the returned JSON object.

Notes

If the gobj does not implement mt_list_resource, an error is logged and NULL is returned.

Prototype

// Not applicable in JS

Prototype

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