cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
159
Views
0
Helpful
3
Replies
Highlighted
Cisco Employee

GET a list instance via RESTCONF API

When I tried to get one leaf instance via RESTCONF, the response is like this:

http://{{ip}}:{{port}}/restconf/data/china169-qos-service:qos/qos=1111/device=1.1.1.1/qos-acl/acl=test-acl/

 

{
"china169-qos-service:acl": {
"acl-name": "test-acl",
"acl-number": 200,
"acl-rule": [
{
"rule-index": 10,
"action": "permit",
"protocol-name": 4,
"source": {
"source-ip": "3.3.3.3",
"source-wild-mask": "0.0.0.0",
"source-port": 1234
},
"destination": {
"destination-ip": "4.4.4.4",
"destination-wild-mask": "0.0.0.0",
"destination-port": 4321
}
}
]
}
}
 
As you can see, acl is a list, but the response is an object.
But in RFC8040, look like it should return a list, like:
 
How can I get the response like RFC8040?
 
  Without query parameter:

      GET /restconf/data/example:interfaces/interface=eth1 HTTP/1.1
      Host: example.com
      Accept: application/yang-data+json

   The server might respond as follows:

      HTTP/1.1 200 OK
      Date: Thu, 26 Jan 2017 20:56:30 GMT
      Server: example-server
      Content-Type: application/yang-data+json

      {
        "example:interface" : [
          {
            "name" : "eth1",
            "status" : "up"
          }
        ]
      }

3 REPLIES 3
Cisco Employee

Re: GET a list instance via RESTCONF API

We are aware of this issue and have an internal ticket open that we are working on.
Cisco Employee

Re: GET a list instance via RESTCONF API

Thanks for your reply.

 

Do you guys have a release plan that when will this issue can be fixed cause we have to give the customer a reply.

Cisco Employee

Re: GET a list instance via RESTCONF API

You need to raise a support case for such inquiries.