I'm trying to do a POST to create content on my site, but I get an Access Denied for creating field: changed even though I am an administrator role. When I remove the "changed" field in the JSON I get the Website encountered an unexpected error error. I assume my JSON format is incorrect. I got it from doing a GET on one of the published nodes, and just removed the nid and uuid values in the JSON.
Or is there a better way to get the proper format I need to create content or am I including too many fields in the JSON?
curl -u xxxxxx:yyyyyy -X POST \
-H "Content-Type: application/json" \
-d '{
"vid": [{"value": 349}],
"langcode": [{"value": "en"}],
"type": [{"target_id": "chats", "target_type": "node_type", "target_uuid": "1332c2f2-ecce-49fd-bff4-4bf37dd24f7b"}],
"status": [{"value": true}],
"uid": [{"target_id": 1, "target_type": "user", "target_uuid": "0e0c2c1d-ed85-4152-bbd6-3821005b07fd", "url": "\/user\/1"}],
"title": [{"value": "tessssst"}],
"created": [{"value": "2023-03-15T17:36:47+00:00", "format": "Y-m-d\\TH:i:sP"}],
"changed": [{"value": "2023-05-09T19:40:40+00:00", "format": "Y-m-d\\TH:i:sP"}],
"promote": [{"value": false}],
"sticky": [{"value": false}],
"default_langcode": [{"value": true}],
"revision_translation_affected": [{"value": true}],
"path": [{"alias": null, "pid": null, "langcode": "en"}],
"publish_on": [],
"unpublish_on": [],
"body": [{"value": "<p>this is a test!<\/p>", "format": "full_html", "processed": "<p>this is a test!<\/p>", "summary": ""}],
"field_chat_parent": [],
"field_page": [{"value": 2}]
}' \
https://xxxx.yyy/node?_format=json