Returns details of sessions that belong to a certain user. The username must match that of the username as specified via userDetails in the getCommands call. This can be used to retrieve form sessions saved via the "save button" field type, and to display those sessions on the website for them to continue.
Parameters
Name | Type | Description |
---|---|---|
username | String, required | The name of the user to retrieve sessions for |
type | String, optional | The form session type, either "standard" or "longlived". Saved form sessions are "longlived" |
contextVars | String (comma separated list), optional | A list of context variables to return |
Example Request
{
"id": 1,
"method": "getFormSessionsByUsername",
"params": {
"username": "ANONYMOUS",
"type": "standard",
"contextVars": "SUBSITEID,CURRENTARTICLEID"
}
}
Example Response
{
"result": {
"result": {
"sessions": [{
"formId": 7525,
"redirectPageURL": null,
"handlerURL": "http://localhost:8080/apiserver/formsservice/http/processsubmission",
"expires": "2019-06-11T14:30:17Z",
"contextVars": {
"CURRENTARTICLEID": 1,
"SUBSITEID": 1
},
"created": "2019-06-11T13:30:17Z",
"definitionPublishedDate": "2019-06-10T13:30:17Z",
"sessionId": "23bd26f1-472a-430d-be43-43a4c6c1cab5",
"type": "standard",
"nonce": "58ed8c51-e7d8-4feb-b572-b87b76bbd193",
"userId": 1,
"pageSessionId": "581f76ab-1ff5-4227-ae12-1d8767eb4a74",
"pageURL": "http://localhost:8080/?formid=7525",
"updated": "2019-06-11T13:30:17Z",
"username": "ANONYMOUS",
"errorPageURL": "http://localhost:8080/?errorMessage=%24%5B%5BerrorMessage%5D%5D"
}]
}
},
"id": 1,
"jsonrpc": "2.0"
}