Versions Compared

Key

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

...

POST /dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes

Description

Get a node given an anchor for the given dataspace (return just one level with just xpath references to its children)

Request Body

{

    "xpath" : "/dataspace/anchors/nodes//module[@xmlns="urn:ietf:params:xml:ns:yang:yin:1"]/container[@name="bookstore"]@name"

}

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired
anchor-nameThe name of the anchorpathstringrequired


200 – OK – Everything is working

Example Response

Code Block
		list books {
		    key title;

			leaf title {
				type string;
			}
			leaf lang {
				type string;
			}
			leaf-list authors {
				type string;
			}
			leaf pub_year {
				type year;
			}
			leaf price {
				type uint64;
			}
		}



POST /dataspaces/{dataspace-id}/nodes

Description

Get a node (under any anchor) given a Xpath expression for the given dataspace

Get all the relevant nodes given a schema node identifier for the given dataspace

Request Body

{

    "xpath" : "/dataspace/anchor/nodes/module[@xmlns="urn:ietf:params:xml:ns:yang:yin:1"]/container[@name="bookstore"]@name"

}

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired


200 – OK – Everything is working

Example Response

Code Block
	list categories {

		key name;

		leaf name {
			type string;
		}

		list books {
		    key title;

			leaf title {
				type string;
			}
			leaf lang {
				type string;
			}
			leaf-list authors {
				type string;
			}
			leaf pub_year {
				type year;
			}
			leaf price {
				type uint64;
			}
		}
	}



Payload Data Structures


Schema definitions

...