Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This parameter is only allowed for GET methods on api, datastore, and data resources. A 400 Bad Request error is returned if used for other methods or resource types.


Fields example

http://localhost:8282/rests/data/network-topology:network-topology/topology=topology-netconf/node=PNFDemo/yang-ext:mount/turing-machine:turing-machine/transition-function?fields=transition-function/delta/output/state

Depth

The "depth" parameter is used to specify the number of nest levels returned in a response for a GET method. The first nest-level consists of the requested data node itself. Any child nodes which are contained within a parent node have a depth value that is 1 greater than its parent.

...

JSON Viewer
width400
height350
{
    "turing-machine:turing-machine": {
        "transition-function": {
            "delta": [
                {
                    "output": {
                        "state": 1
                    }
                },
                {
                    "output": {
                        "state": 3
                    }
                },
                {},
                {
                    "output": {
                        "state": 4
                    }
                },
                {},
                {
                    "output": {
                        "state": 2
                    }
                },
                {}
            ]
        }
    }
}


http://localhost:8282/rests/data/network-topology:network-topology/topology=topology-netconf/node=PNFDemo/yang-ext:mount/turing-machine:turing-machine/transition-function?fields=delta/output/state;symbol


JSON Viewer
width400
height350
{
    "turing-machine:transition-function": {
        "delta": [
            {
                "output": {
                    "state": 1,
                    "symbol": "1"
                }
            },
            {
                "output": {
                    "state": 3,
                    "symbol": "0"
                }
            },
            {},
            {
                "output": {
                    "state": 4
                }
            },
            {},
            {
                "output": {
                    "state": 2
                }
            },
            {}
        ]
    }
}


rests Interface Depth Examples

...