cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1254
Views
15
Helpful
2
Replies

multiple key list query RESTCONF

Gastonper
Level 1
Level 1

Hi, I have a list with multiple keys in my model, like this:

 

List list1 {
    key "key1, key2, key3"
   ...
}

I want to know how to make a query in restconf to get all list instance with key1= "A" and key2="B" (for any key3)

 

Something like this:

 

curl GET http://ip:port/restconf/data/services/.../list1=A,B

 

But i get a uri keypath not found error

 

RESTCONF RFC says this:

All of the components in the "key" statement MUST be encoded. Partial instance identifiers are not supported.

So, maybe is not possible.

 

1 Accepted Solution

Accepted Solutions

It's not possible to do such queries with RESTCONF by default.
The NSO Query API is the way to go for such queries.

View solution in original post

2 Replies 2

vleijon
Cisco Employee
Cisco Employee
I don’t know a way of doing it directly in RESTCONF (there might be one).

But, it will be possible using the NSO Query API, there are some earlier post on that that might be helpful, that allows you to make more advanced queries too.

It's not possible to do such queries with RESTCONF by default.
The NSO Query API is the way to go for such queries.