Hey Blake,
Is this still the recommended way to send an array to the API? I’m trying to create a web hook and I’m not able to send the web_hook_event_type_ids array parameter.
I’ve tried it with CURL (as multipart/form-data)
curl -X POST "https://MYSITE.com/admin/api/web_hooks" \
-H "Api-Key: KEY" \
-H "Api-Username: USER" \
-F "payload_url=https://MYOTHERSITE.com" \
-F "content_type=1" \
-F "wildcard_web_hook=false" \
-F "verify_certificate=true" \
-F "active=true" \
-F "web_hook_event_type_ids[]=2"
# I get
{"errors":["param is missing or the value is empty: web_hook"]}%
And with httpie (as application/json):
http POST https://MYSITE.com/admin/api/web_hooks \
Api-Key:KEY \
Api-Username:USER \
payload_url=https://MYOTHERSITE.com \
content_type=1 \
wildcard_web_hook:=false \
verify_certificate:=true \
active:=true \
web_hook_event_type_ids:='[2]'
# I get
{
"errors": [
"Web hook event types can't be blank"
]
}