- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.9k
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
NetBox Edition
NetBox Community
NetBox Version
v4.3.0 and never
Python Version
3.12
Steps to Reproduce
- 
Create virtual machine (in exapmple used vm.id=361). 
- 
Create service/application service for VM - POST is working fine ("parent_object_type": "string",) 
curl -X 'POST' \
  'https://demo.netbox.dev/api/ipam/services/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-CSRFTOKEN: <X-CSRFTOKEN> \
  -d '{
  "parent_object_type": "virtualization.virtualmachine",
  "parent_object_id": 361,
  "name": "web_tcp_https",
  "protocol": "tcp",
  "ports": [
    443
  ],
  "ipaddresses": [
  ],
  "description": "web_tcp_https",
  "comments": "web_tcp_https",
  "tags": [
  ],
  "custom_fields": {
  }
}'
- Try to get query this service using parent_object_idandparent_object_type
curl -X 'GET' \
    'https://demo.netbox.dev/api/ipam/services/?parent_object_type=virtualization.virtualmachine&parent_object_id=361' \
    -H "Authorization: Token <Token>" \
    -H 'X-CSRFTOKEN: <CSRFTOKEN>'
Expected Behavior
PATH:           IPAM/SERVICES:
Method:         GET
Object:         parent_object_type
Data type:      integer -> string
Observed Behavior
Response is:
{"parent_object_type":["Select a valid choice. That choice is not one of the available choices."]}
or more detailed:
Please correct the following validation errors and try again. 
For 'parent_object_type': Value must be an integer.
Metadata
Metadata
Assignees
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application