I was told by my team that a document that other documents are referencing is missing. I have the document saved in a backup and I'm trying to add it to the database through the Sync Gateway using curl.
curl -vXPUT -H'Content-Type:application/json' -d"@mydocument" "http://128.0.0.1:4985/mydatabase/aa987654-3210-4567-89cc-cba121212121"
I am getting the following response:
{"error":"conflict","reason":"Document revision conflict"}
However, if I try to get the document using that id:
curl -vXGET "http://128.0.0.1:4985/mydatabase/aa987654-3210-4567-89cc-cba121212121"
I get the response:
{"error":"not_found","reason":"missing"}
I've also tried;
curl -vXGET "http://128.0.0.1:4985/mydatabase/aa987654-3210-4567-89cc-cba121212121?revs=true&open_revs=all"
It comes back with the same response.
I also tried logging into the Couchbase server and querying the database directly:
select * from mydatabase use keys "aa987654-3210-4567-89cc-cba121212121"
It came back with a result size of 0.
"results": [],
"metrics": {
"elapsedTime": "1.523366ms",
"executionTime": "1.442059ms",
"resultCount": 0,
"resultSize": 0
}
}
I'm not sure what to do as it says there is no document by that id, but if I try to add it, it says there's a conflict. What can I do to resolve this?
Thanks