Toggle menu

processJSONRPCSubmission

Emulates the behaviour of the /formsservice/http/processsubmission endpoint, allowing form submissions to be conducted via JSONRPC for private forms. A DATABASE save action is performed regardless of whether one exists on the page or not, and the id of the saved object is returned as updatedObjectId.

This method is for use within iCM for article extra forms only.

Parameters

NameTypeDescription
pageSessionIdUUID (str enc.), requiredThe pageSessionId, as submitted with the form
sessionIdUUID (str enc.), requiredThe formSessionId, as submitted with the form
nonceUUID (str enc.), requiredThe nonce, as submitted with the form
formDataMap, requiredForm data in the format of: { "fieldName" : "val1,val2" }
objectIdLong, optionalId of the iCM object containing form data to load, likely saved by a DATABASESAVE action
-or-  
objectLabelString, optionalLabel of the iCM object containing form data to load
objectTypeString, optionalType of the iCM object containing form data to load

Example Request 

{
    "id": 20,
    "jsonrpc": "2.0",
    "method": "processJSONRPCSubmission",
    "params": {
        "objectId": 221,
        "nonce": "58843236-171d-4b5c-820a-4ba64fcb0d87",
        "sessionId": "e7899179-5b1f-4434-97c2-261c58deead0",
        "pageSessionId": "0f7ce3a6-2719-49f9-9497-a22cb3041b98",
        "formData": {
            "EXTRAFORM2_FORM_": "1",
            "EXTRAFORM2_SESSIONDATA": "",
            "EXTRAFORM2_NONCE": "58843236-171d-4b5c-820a-4ba64fcb0d87",
            "EXTRAFORM2_SESSIONID": "e7899179-5b1f-4434-97c2-261c58deead0",
            "EXTRAFORM2_PAGESESSIONID": "0f7ce3a6-2719-49f9-9497-a22cb3041b98",
            "EXTRAFORM2_FIELD1": "A",
            "EXTRAFORM2_FIELD2": "Yes",
            "EXTRAFORM2_FIELD3": "Hidden",
            "EXTRAFORM2_FIELD4": "15/06/2015"
        }
    }
}

Example Response

{
    "id": 20,
    "jsonrpc": "2.0",
    "result": {
        "result": {
            "nonce": "58843236-171d-4b5c-820a-4ba64fcb0d87",
            "sessionId": "e7899179-5b1f-4434-97c2-261c58deead0",
            "pageSessionId": "0f7ce3a6-2719-49f9-9497-a22cb3041b98",
            "actionResults": {
                "previousPageName": "",
                "results": {},
                "currentPageInstance": "1",
                "previousPageInstance": "",
                "currentPageName": "PAGE1"
            },
            "updatedObjectId": 221
        }
    }
}

Last modified on June 27, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon