I am currently working on syncing documents using Sync Gateway and Postman, but I am encountering an issue with setting up the keyspace correctly. I have followed the documentation available at Public REST API | Couchbase Docs.
The structure of my data is as follows:
Bucket name: traq
Scope: master
Collection: project
According to the documentation, I tried using the following URL to sync documents with a specific keyspace: http://localhost:4984/traq.master.user/
However, when attempting to use this URL, I receive the following error message:
{
“error”: “not_found”,
“reason”: “keyspace traq.master.user not found”
}
I have verified that the “traq” bucket, “master” scope, and “user” collection do exist in my Couchbase Server. The documents are syncing with the default scope successfully, but I am unable to sync them with the specified keyspace.
Unfortunately, the documentation does not provide any examples or clear guidance on how to resolve this issue, making it quite confusing for me to troubleshoot.
If anyone has experience with Sync Gateway and could shed some light on what might be causing this problem or provide a step-by-step guide on how to set up the keyspace correctly, I would greatly appreciate your assistance.
What do you have in your Sync Gateway configuration? The first component of the URL keyspace path is the Sync Gateway database name, and not necessarily the bucket name (unless you’ve named them the same). Alternatively, how did you set up the Sync Gateway database (with the admin API).
/main-content._default.content/ since you’re defining the content collection inside the _default scope on the main-content database inside your config.
For the same configuration posted above, I have been using ws://localhost:4984/main-content and it is not working. I have tried ws://localhost:4984 and ws://localhost:4984/main-content._default.content as well but no luck.
If you have any other inputs for that issue, i would appreciate that.
@bbrks By not working, I mean that pull replication fails to fetch any documents from the custom collection. I have a log file which cannot be attached here because it goes above the limit of characters. Can I DM/email you?
I am basically stuck in this for 3 days now. So, any guidance is super appreciated.