Foundation API POST resquest "primary_nic" returns "Unprocessable Entity"

  • 17 January 2024
  • 1 reply


I need to use the API to select the primary NIC that Foundation will use to discover nodes. When I try the request :

GET https://[fvm_ip]:8000/foundation/primary_nic

I get the following result :

"primary_nic": 2

That is expected. But when I send the same request using POST, which is valid according the documentation, I now get :

"error": {
"details": [
"'nic' is a required property"
"message": "Unprocessable Entity",
"session_id": null

My understanding is that the request should be used with a parameter or a body specifying the new primary NIC. But The documentation does not state anything about it. So I tried to pass in “nic”:1 as a parameter and as a body, but still the same error.

Is it a bug ? Is the documentation missing some explanations ?


Source : Foundation –


Best answer by K_vin 14 February 2024, 15:54

View original

This topic has been closed for comments

1 reply

It turns out the body of this request is of type “Form-data”. Maybe it should be made clear on the documentation.

Anyway problem solved.