Rest API - Create Object - Error


#1

Hi there.
I’m writing a script for bulk importing objects onto my Pimcore setup using the Rest API. Now, retrieving objects from Pimcore using the API works smoothly. But when trying to create objects using API, I get the following failure message that isn’t helping me much. Any help will be great, thanks for your time.

{“success”:false,“msg”:“exception ‘Zend_Json_Exception’ with message ‘Decoding failed: Syntax error’ in /opt/bitnami/apps/pimcore/htdocs/vendor/zendframework/zendframework1/library/Zend/Json.php:97\nStack trace:\n#0 /opt/bitnami/apps/pimcore/htdocs/pimcore/modules/webservice/controllers/RestController.php(260): Zend_Json::decode(‘data=%7B%27path…’)\n#1 /opt/bitnami/apps/pimcore/htdocs/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): Webservice_RestController->objectAction()\n#2 /opt/bitnami/apps/pimcore/htdocs/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘objectAction’)\n#3 /opt/bitnami/apps/pimcore/htdocs/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))\n#4 /opt/bitnami/apps/pimcore/htdocs/pimcore/lib/Pimcore.php(152): Zend_Controller_Front->dispatch(NULL, NULL)\n#5 /opt/bitnami/apps/pimcore/htdocs/pimcore/lib/Pimcore.php(125): Pimcore::runDispatcher(Object(Zend_Controller_Front), false, NULL, NULL)\n#6 /opt/bitnami/apps/pimcore/htdocs/index.php(18): Pimcore::run()\n#7 {main}”}