2

We have Raven deployed on a server and our .NET code can work with it just fine.

When remoted onto the box, I would like to be able to make HTTP calls to Raven through an HTTP client.

I can see in Raven studio that I have a document in a collection called 'Locations' with the ID of 'locations/1'. Raven is running on port 9999, so in my HTTP client (Postman for Chrome) I'm entering the following GET request:

http://localhost:9999/docs/locations/1

However, I always get 404.

If I malform the URL (e.g. by changing the 'docs' segment to 'documents') I get a response from Raven telling me it doesn't know what to do with the request, so I must be on the right lines. Raven just appears to be telling me the document isn't there, when I know it is.

Can anyone offer some insight?

David
  • 15,750
  • 22
  • 90
  • 150

1 Answers1

9

That URL would address the system database. I assume you are using a named database.

Try http://localhost:9999/databases/{DbName}/docs/locations/1

David Boike
  • 18,545
  • 7
  • 59
  • 94
  • You are spot on - I worked it out eventually. I am very frustrated about this because Raven's own documentation on the HTTP API doesn't mention this - it uses a URL like the one I was trying originally. – David Jun 11 '14 at 08:26