Creating nodes with cURL that have multiple tags and a content moderation transition I've enabled the rest restui serialization hal and basic_auth modules and enabled and configured the Content resource like this:



I'm able to create nodes with:

X_CSRF_TOKEN=$(curl http://d8.local.org/session/token)
curl --include \
--request POST \
--user test:"test" \
--header 'Content-type: application/hal+json' \
--header "X-CSRF-Token: $X_CSRF_TOKEN" \
--insecure \
--data-binary '{"_links":{"type": 
{"href":"http://d8.local.org/rest/type/node/article"}},
"title":[{"value":"Test"}],
"body":[{"value":"Body text."}],
"field_tags":[{"target_id":1}],
"type":[{"target_id":"article"}]}' \
http://d8.local.org/entity/node?_format=hal_json


How do I add multiple terms to field_tags? Every combination I try, like 

"field_tags":[{"target_id":1,2,3}], 


returns a 400 Bad Request

Also, how do I add a content moderation transition to the new node?
You need to map target_id =&gt; [id] as key/value pairs:

"field_tags":[{"target_id":"1"},{"target_id":"2"},{"target_id":"3"}]