3.1.4.1 ProcessQuery
During this operation, the protocol server receives a message and extracts the XML request message that contains a CSOM action list, processes that CSOM action list, and then responds with JSON text that contains the results of processing the CSOM action list.
The protocol server endpoint for this operation is formed by appending "/_vti_bin/client.svc/ProcessQuery" to the URL of the website, for example "http://www.example.com/Repository/_vti_bin/client.svc/ProcessQuery".
The protocol client sends a ProcessQueryIn (section 3.1.4.1.1.1) message, and the protocol server responds with a ProcessQueryOut(section 3.1.4.1.1.2) message, as follows:
The protocol client sends a ProcessQueryIn request message that contains a CSOM action list and a CSOM Object path list. The CSOM action list contains the CSOM actions to be executed by the protocol server. The CSOM Object path list contains the CSOM Object paths that the protocol server can use to obtain the CSOM Object or CSOM Object type on which a CSOM action is to be performed.
The protocol server receives the ProcessQueryIn request message and processes the CSOM action list.
After the protocol server finishes processing the CSOM action list, it responds to the protocol client with a ProcessQueryOut response message. If no unhandled errors occur during processing, the response contains a CSOM action response structure that contains the processing results for the CSOM action list. Otherwise, the response contains a CSOM error that provides details about the unhandled error.
The protocol server processes a CSOM action list as follows:
The CSOM action response structure is initially empty.
If all of the CSOM actions in the CSOM action list have been processed, the protocol server MUST stop processing the CSOM action list.
If one or more of the CSOM actions in the CSOM action list have not been processed, the protocol server MUST execute the first unprocessed CSOM action in the CSOM action list.
If the CSOM action is executed successfully, the CSOM action is considered processed, and the result of the CSOM action execution MUST be appended to the CSOM action response structure when the CSOM action has result. The protocol server then repeats steps 2 and 3.
If an unhandled exception occurs when executing the CSOM action, the protocol server MUST stop processing the CSOM action list.
The operation ends when the protocol server stops processing the CSOM action list.
If no unhandled exceptions occur while processing the CSOM action list, the protocol server MUST respond with JSON output data in the form of a CSOM action response structure. If an unhandled exception occurs while processing the CSOM action list, the protocol server MUST respond with JSON output data in the form of a CSOM error that provides details about the unhandled error.