What is supposed to go in the _revisions arg for a put request to the sync gateway public API


I’m trying to upload a document to our servers through the sync gateway public rest API, and keep getting the error “bad _revisions”. I know that the _revisions property is required for requests that have the new_edits query param set to false, but I can’t figure out what is supposed to go in the property, and there doesn’t seem to by any documentation on that requirement (I’ve spent a fair amount of time looking for something).

I’m creating a full revision in my client side code, and so my understanding is I can’t set the new_edits field to true.

I’ve tried extrapolating from the example in the docs and sending up a map with property “start” set to 1, because that’s the prefix of the first rev on the document, and then including each ID returned by “getRevisionHistory()” clientside, but that hasn’t worked. Anything else I try is going to be poking around in the dark.

I feel like I’m missing something obvious…


Did you try the interactive API explorer:


This should help you build a valid request.

Yea, my problem is just what to put into the _revisions property, which the request builder doesn’t help with - it just populates the body with the example, which doesn’t give any additional information.

All I’m looking for is an explanation of what that property (which goes in the body) is supposed to be

Sorry! I just totally missed the toggle between example value and model. It’s all working fine now.