Content/node create service
POST /api/ezp/v2/content/node/create creates an object below a node and publishes it. Version 2 only. The user needs content/create for the class below that node; a personal API key needs the scope publish.
Parameters (form fields)
- parentNodeID: the node to create below (required);
- classIdentifier: the class, for example folder (required);
- languageLocale: the language, for example eng-US (required);
- the attributes by their identifiers, for example name.
curl -s -H "Authorization: Bearer $EXP_API_KEY" https://www.example.com/api/ezp/v2/content/node/create \
-d parentNodeID=<parent node id> -d classIdentifier=folder -d languageLocale=eng-US -d name='From a script'
# {"message":"Created","objectId":<object id>,"nodeId":<node id>}
A missing parameter answers 400 with the reason, a refused policy 403. To remove it again: curl -s -X DELETE ... /api/ezp/v2/content/node/delete/<node id>.
Contributors
- Graham Brookins Updated Maintainer
Comments
Add a comment