gobj_list_nodes()

gobj_list_nodes()#

Retrieves a list of nodes from a specified topic in the given hgobj. The function allows filtering and additional options to refine the query.

Prototype

json_t *gobj_list_nodes(
    hgobj gobj,
    const char *topic_name,
    json_t *jn_filter,
    json_t *jn_options,
    hgobj src
);

Parameters

Key

Type

Description

gobj

hgobj

The hgobj instance from which to retrieve the nodes.

topic_name

const char *

The name of the topic from which nodes will be listed.

jn_filter

json_t *

A JSON object containing filter criteria to apply to the node list. Owned by the caller.

jn_options

json_t *

A JSON object specifying additional options such as ‘include-instances’ and fkey/hook options. Owned by the caller.

src

hgobj

The source hgobj making the request.


Return Value

Returns a JSON object containing the list of nodes that match the specified criteria. The caller must free the returned JSON object.

Notes

If gobj is NULL or destroyed, an error is logged and NULL is returned. If the mt_list_nodes method is not defined in the gclass, 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