Cannot Run App Due to A Persistent API Error (CE0342) in Mendix 8.18.13
0
Hello, I'm building a REST API in Mendix Studio Pro 8.18.13 to deactivate a user. The API uses a POST request with a JSON body ({"username":"johndoe"}). I have configured the microflow, entities, and services, but I cannot get the application to run due to a set of persistent errors. Here is the error I keep seeing: Error CE0342: "Can't use this import mapping, because it takes an object as a parameter..." Here's what I have done so far: Created a POSTDeactivation microflow. Created a users_deactivation published REST service. Created a DeactivateUserRequest entity. Created a JSON_DeactivateUserRequest document with a sample JSON snippet. Created an Import_API_DeactivateUserRequest mapping. Configured the REST service to use the DeactivateUserRequest as a body parameter. Assigned a security role to both the microflow and the REST service. I have also tried to link the import mapping to the JSON structure using the Select elements... button. Even after all these steps, the error won't go away. How do I correctly configure the microflow, REST service, and import mapping so my application can run? Am I missing a crucial step in the Mendix 8 workflow? Thank you for your help!
asked
Iman
1 answers
0
It looks like your mapping expects an object. Open the mapping and remove the parameter (top left). Instead, configure the mapping to create a new object. Also see the documentation and the first screenshot in there. You can leave the parameter area empty.