cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
171
Views
15
Helpful
2
Replies
Highlighted
Beginner

multiple key list query RESTCONF

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
Highlighted
Cisco Employee

Re: multiple key list query RESTCONF

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
Highlighted
Cisco Employee

Re: multiple key list query RESTCONF

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.
Highlighted
Cisco Employee

Re: multiple key list query RESTCONF

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