Hi Abdul, I suspect what you want to do is POST to http://<Controller-IP>:8181/restconf/config/l3vpn:vpn-instances/
or you could PUT to http://<Controller-IP>:8181/restconf/config/l3vpn:vpn-instances/l3vpn:vpn-instance/testVpn1 vpn-instance is a list. You always need to give a list key when specifying a list in a URL. The key here is most likely the vpn-instance-name (I can’t be 100% sure as I don’t have the YANG model for l3vpn). Giles > On 28 Jan 2018, at 12:25, Abdul Malik <ajabbar2...@namal.edu.pk> wrote: > > Hello all, > > I am the newest member of the ODL and I am facing some problems while using > its REST APIs. I am trying to create a VPN instance in ODL using postman and > I am always getting an error with status code 404. The REST API that I am > using to create a VPN instance and JSON Object that I send with it are given > below. > > POST Request: > http://<Controller-IP>:8181/restconf/config/l3vpn:vpn-instances/l3vpn:vpn-instance/ > > JSON Data: > { > "vpn-instance": [ > { > "description": "Test VPN Instance 1", > "vpn-instance-name": "testVpn1", > "ipv4-family": { > "route-distinguisher": "4000:1", > "export-route-policy": "4000:1,5000:1", > "import-route-policy": "4000:1,5000:1" > } > } > ] > } > > Response error (status: 404 Not Found) is: > > { > "errors": { > "error": [ > { > "error-type": "protocol", > "error-tag": "data-missing", > "error-message": "Missing key for list \"vpn-instance\"." > } > ] > } > } > _______________________________________________ > controller-dev mailing list > controller-dev@lists.opendaylight.org > https://lists.opendaylight.org/mailman/listinfo/controller-dev
_______________________________________________ controller-dev mailing list controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev