cand create event with core_calendar_submit_create_update_form

cand create event with core_calendar_submit_create_update_form

by Francesco Venturini -
Number of replies: 0

Hi everyibe
Here it is the fully request on postman:
POST
https://mymoodleurl/webservice/rest/server.php?wstoken=XXXXXXXXX&moodlewsrestformat=json&wsfunction=core_calendar_submit_create_update_form
Payload1
{
    "index": 0,
    "methodname": "core_calendar_submit_create_update_form",
    "args": {
        "formdata": "id=0&_qf__core_calendar_local_event_forms_update=1&mform_showmore_id_general=1&name=testgroupevent&eventtype=group&description=testgroupevent"
    }
}
Other attempts
I've removed the parameters about groups
I've tries "site" eventtype that is my desiderata
I've removed all the payload except formdata, since the method name is inside the query string
Payload
{                 "formdata": "id=0&_qf__core_calendar_local_event_forms_update=1&mform_showmore_id_general=1&name=testgroupevent&eventtype=group&description=testgroupevent"
}
I've set "id=", or "id=0", and removed since it's a create
Unfortunately I alwayse receive the same error
{
    "exception": "invalid_parameter_exception",
    "errorcode": "invalidparameter",
    "message": "Invalid parameter value detected"
}

What are my mistakes?

Average of ratings: -