POST user/{userId}/progress

Related

Attempt to set a key-value into the progress store. If the server has a newer version of the same key (based on the included timestamp), it will refuse the request and include a copy of its data in the response. The client will then, ostensibly, decide which version to keep. Repeating the call in its PUT form will suffice to override the server's version.

Example

POST /api/v1/user/66a5db1f-2785-498d-9068-e24ddbba03f2/progress HTTP/1.1
Authorization: Bearer ...
Content-Type: application/json

{
  "key": "adventure",
  "value": { "foo": "bar" },
  "timestamp": 1554760000
}
----------------------------------------
HTTP/1.1 204 No Content
ETag: W/"a-bAsFyilMr4Ra1hIU5PyoyFRunpI"

Security

Authentication is required, and access is restricted to the user.

URL Parameters

NameDescriptionValue
userIdthe ID of the user as a GUID with dashesstring

Request Body

NameDescriptionValue
keythe key of the progress data to storestring
valuethe data to store at this keyobject
timestampthe timestamp this data was written locally, to use as the basis for merging versions against the server; a Unix timestamp in secondsnumber

Response

Successful responses are in one of two forms: if the provided value did not conflict with the server version, code 204 is returned. Otherwise, code 409 is returned with a response body reflecting the server's version for that key. Error responses are standard.

Response Body

NONE if the update is accepted, otherwise the response is of type RefusalResponse.

RefusalResponse

NameDescriptionValue
keythe key of the progress datastring
valuethe data currently stored by the server at this keyobject
timestampthe timestamp the server's data was written; a Unix timestamp in secondsnumber