You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to DigitalOcean API creating firewall section (https://developers.digitalocean.com/documentation/v2/#create-a-new-firewall) sources attribute of InboundRule should be a single object. Providing an array results in an error response as given in title. To be sure I tested following bodies using Postman:
{ "name": "test", "inbound_rules": [ { "protocol": "tcp", "ports": "22", "sources": [ { "addresses": [ "18.0.0.0/8" ] } ] } ] }
Response: { "id": "unprocessable_entity", "message": "You specified an invalid type for one of the sources.", "request_id": "" }
According to DigitalOcean API creating firewall section (https://developers.digitalocean.com/documentation/v2/#create-a-new-firewall)
sources
attribute ofInboundRule
should be a single object. Providing an array results in an error response as given in title. To be sure I tested following bodies using Postman:{ "name": "test", "inbound_rules": [ { "protocol": "tcp", "ports": "22", "sources": [ { "addresses": [ "18.0.0.0/8" ] } ] } ] }
Response:
{ "id": "unprocessable_entity", "message": "You specified an invalid type for one of the sources.", "request_id": "" }
Single object request:
{ "name": "test", "inbound_rules": [ { "protocol": "tcp", "ports": "22", "sources": { "addresses": [ "18.0.0.0/8" ] } } ] }
Response: successfully created firewall
The text was updated successfully, but these errors were encountered: