06-04-2024 02:04 PM
Hello, I'm trying to create service instance using a curl found here https://www.postman.com/ciscodevnet/workspace/cisco-devnet-s-public-workspace/request/3224967-a8af0219-3bca-440e-abc9-99c7765ba606
and this is my curl
curl --location --globoff --request PATCH 'http://170.20.100.200:8080/restconf/data/itential-demo-port-turn-up:port-turn-up/' \
--header 'Content-Type: application/yang-data+json' \
--header 'Authorization: Basic xxxxxxxxxx' \
--header 'Accept: application/yang-data+json' \
--data '{
"itential-demo-port-turn-up:port-turn-up": [
{
"device": "BIGIP_F5"
}
]
}'
here is the service point along with the inputs.
When I run the curl, i get the error below and I'm not sure what I'm doing wrong because the URI seems to be correct
{
"errors": {
"error": [
{
"error-message": "uri keypath not found",
"error-tag": "invalid-value",
"error-type": "application"
}
]
}
}
I clicked on the existing service model and here is the path I see. Am I using the wrong path?
06-05-2024 04:12 AM
No expert here, try to authenticate using the gcloud auth print-access-token command to get an access token, and then use that token in the Authorization header. See if that comes back with anything
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
06-11-2024 06:00 AM
Hi @logans1597 ,
Were you able to fix your NSO api call?
Based on the keypath you shared, it appears that your yang service list has a composite key: device, interface-type, and interface-id. Without examining the specific YANG file, this is a general assumption... but if your service list indeed uses these keys, you need to add them all to your payload.
BR,
Kratz
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide