Closed
Description
Deployment Type
Self-hosted
NetBox Version
v4.0.0
Python Version
3.10
Steps to Reproduce
- Create a tenant named "Test Tenant". Make a note of the tenant's id (in my case it's 7)
- Create a site using REST API
curl -s -X POST \
-H "Authorization: Token 0123456789abcdef0123456789abcdef01234567" \
-H "Content-Type: application/json" \
http://localhost:32768/api/dcim/sites/ \
--data '{"name": "Test site 1", "slug": "test-site-1", "tenant": 7}' | jq '.'
Expected Behavior
The site is created in and tenant is set to Test tenant.
Observed Behavior
{
"tenant": {
"non_field_errors": [
"Invalid data. Expected a dictionary, but got int."
]
}
}
The same API calls work as expected in NetBox 3.7.