Attempting to add Service Profile results in "object does not exist"

I created a Network-Server through the API. To verify that it was created, I looked up the existing servers and got this response:
“totalCount”: “1”,
“result”: [
“id”: “1”,
“name”: “local”,
“server”: “localhost:8000”,
“createdAt”: “2020-07-21T05:08:10.577827Z”,
“updatedAt”: “2020-07-21T05:08:10.577827Z”
This is the server I added. When I attempt to add a Service Profile on this server using the following:
curl -X POST --header ‘Content-Type: application/json’ --header ‘Accept: application/json’ --header ‘Grpc-Metadata-Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTU5NTM5MzM0NCwiaWQiOjEsImlzcyI6ImNoaXJwc3RhY2stYXBwbGljYXRpb24tc2VydmVyIiwibmJmIjoxNTk1MzA2OTQ0LCJzdWIiOiJ1c2VyIiwidXNlcm5hbWUiOiJhZG1pbiJ9.SBh9CTtaecCkuf2Fa3CAiRG63TXk_fctJUqHJzCwZ8Q’ -d ‘{ \
“serviceProfile”: { \
“addGWMetaData”: true, \
“devStatusReqFreq”: 0, \
“drMin”: 0, \
“drMax”: 0, \
“name”: “local_gateway”, \
“networkServerID”: “1”, \
“nwkGeoLoc”: false \
} \
}’ ‘

Which results in this:
“error”: “object does not exist”,
“code”: 5,
“message”: “object does not exist”,
“details”: []

I do not understand what I am doing wrong. What object does not exist?

I should mention that adding a service profile through the web-interface works just fine. I need to automate this process though so using the web-interface is not a solution.

Are you sure that the networkServerID is correct? Please note that the web-interface is using exactly the same API :slight_smile: Using the web-inspecting of your browser might give you a hint what request is made when creating the service-profile using the UI.