3.4.5.6.1.3 Processing Details

The server MUST fail the request with a status code of 400 for the following conditions.

  • If there are no entries in ChangeBatchList.

  • If the x-ecs-continue token is not present and LastSentToken is not empty.

  • If the x-ecs-continue token is present and LastSentToken is empty.

  • If the x-ecs-continue token is present and not equal to LastSentToken or LastReceivedToken.

If the x-ecs-continue token is not present, the server MUST return the first batch from Session.ChangeBatchList. The server MUST generate a token that points to the second batch. The server MUST additionally set x-ecs-continue in the response and LastSentToken to the newly generated token.

If Session.SessionType is 0x04, ChangeBatch.Metadata in the response body contains the entire list of SyncIds available on the server.

If the x-ecs-continue token is present and x-ecs-continue is equal to LastSentToken or LastReceivedToken, the server MUST search for the corresponding batch in Session.ChangeBatchList.

If no entry is found, the server MUST fail the request with the status code of 400. Otherwise, the server MUST return the corresponding batch, indicated by x-ecs-continue, from the Session.ChangeBatchList.

If the corresponding batch that is indicated by x-ecs-continue is not the last batch in Session.ChangeBatchList, the server MUST generate a new token that points to the next batch in Session.ChangeBatchList. Otherwise, the server MUST generate a token that does not point to any batch in Session.ChangeBatchList.

The server MUST set LastReceivedToken to x-ecs-continue. The server MUST also set x-ecs-continue in the response and LastSentToken to the newly generated token.