cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1106
Views
10
Helpful
1
Replies

Addressing Service Instance Via Nortbound RESTCONF API

AJ Cruz
Level 3
Level 3

I am trying to figure out how to create a service instance via the Northbound NSO API. Before I get into that I need to figure out how to even address/locate the service instance in the API.

In the Postman NSO collections I see this for "Get List of Service Instances for a Service":

GET {{PROTOCOL}}://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data/svi_verify_example:svi_verify_example

 

My service is dc-builder:dc-builder and augments ncs:services

When I log into the NSO GUI and go to Service Manager, in the select servicepoint dropdown I see:

ncs:services/dc-builder:dc-builder

 

I created a service instance via CLI and tried

GET {{PROTOCOL}}://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data/ncs:services/dc-builder:dc-builder

and

GET {{PROTOCOL}}://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data/dc-builder:dc-builder

 

but I always get:

{
    "ietf-restconf:errors": {
        "error": [
            {
                "error-type": "application",
                "error-tag": "invalid-value",
                "error-message": "uri keypath not found"
            }
        ]
    }
}

Any ideas what I'm doing wrong?

Thanks!

1 Accepted Solution

Accepted Solutions

AJ Cruz
Level 3
Level 3

Been struggling with this the past two days, I knew as soon as I posted it I'd figure it out.

On a hunch I did:

GET {{PROTOCOL}}://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data

and dumped everything.

In the results I saw:

"tailf-ncs:services"

 

So I did:

GET {{PROTOCOL}}://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data/tailf-ncs:services/dc-builder:dc-builder

That worked.

View solution in original post

1 Reply 1

AJ Cruz
Level 3
Level 3

Been struggling with this the past two days, I knew as soon as I posted it I'd figure it out.

On a hunch I did:

GET {{PROTOCOL}}://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data

and dumped everything.

In the results I saw:

"tailf-ncs:services"

 

So I did:

GET {{PROTOCOL}}://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data/tailf-ncs:services/dc-builder:dc-builder

That worked.