Domanda

I have an instance of Raven Db at localhost:8081. I made sure to change raven's config file to allow anonymous access. I created a database named AT. Inside AT I have a collection named Admins. Inside of Admins I have two documents. I'm trying to retrieve some data via Rest using RestClient. I try to hit the db using:

http://localhost:8081/docs/admins/7cb95e9a (last bit is the id of the document I want).

and

http://localhost:8081/docs/at/admins/7cb95e9a.

With both I receive a 404. I'm not sure what I'm missing here. Can someone point me in the right direction?

È stato utile?

Soluzione

The URL has the following format:
http://localhost:8081/databases/{{database-name}}/docs/{{document-id}}.

Collection is a virtual thing. get a document only by its ID, there no nothing on collection here. The document ID can be anything you set, but if you let RavenDB to generate it, it will probably be admins/1.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top