Rest-API_IPmanaged_client

Hi, i can successfully create a Device via the API with the following json:

{
  "position": "cn=computers,ou=sxx,dc=edu,dc=xx,dc=de",
  "properties": {
    "name": "s15",
    "description": "Promethean Board R102",
    "mac": [
      "6c:xx:xx:xx:xx:xx",
      "e4:xx:xx:xx:xx:xx"
    ],
    "network": "cn=xxService-NET,cn=networks,ou=sxx,dc=edu,dc=xxx,dc=de"
  }
}

As soon as i want to give also an ip-address the code does not work any more.
What i’am doing wrong here?

Thanks in Advance
Oliver

{
  "position": "cn=computers,ou=sxx,dc=edu,dc=xx,dc=de",
  "properties": {
    "name": "s15",
    "description": "Promethean Board R102",
    "mac": [
      "6c:xx:xx:xx:xx:xx",
      "e4:xx:xx:xx:xx:xx"
    ],
    "ip": [
      "10.30.4.17"
    ],
    "network": "cn=xxService-NET,cn=networks,ou=sxx,dc=edu,dc=xxx,dc=de"
  }
}

LOG:

“error”: {“code”: 422, “title”: “Unprocessable Entity”, “message”: “1 error(s) occurred:\nRequest argument “ip” The property ip has an invalid value: dhcpEntryZone: This is not a valid MAC address (valid examples are 86:f5:d1:f5:6b:3e, 86-f5-d1-f5-6b-3e, 86f5d1f56b3e, 86f5.d1f5.6b3e).\n”, “error”: {“body”: {“ip”: “The property ip has an invalid value: dhcpEntryZone: This is not a valid MAC address (valid examples are 86:f5:d1:f5:6b:3e, 86-f5-d1-f5-6b-3e, 86f5d1f56b3e, 86f5.d1f5.6b3e).”}}}, “_embedded”: {“udm:error”: [{“location”: [“body”, “ip”], “message”: “The property ip has an invalid value: dhcpEntryZone: This is not a valid MAC address (valid examples are 86:f5:d1:f5:6b:3e, 86-f5-d1-f5-6b-3e, 86f5d1f56b3e, 86f5.d1f5.6b3e).”, “type”: “value_error”}]}, “_links”: {“self”: [{“title”: “HTTP-Error 422: Unprocessable Entity”

…answering myself :wink:

The network part was the issue!
Without this part everything works as expected.

Mastodon