REST requests are URL-based. In order to get or put any document in RavenDB, we will basically create a request and use a RavenDB target structure. Then we will specify what type of entity it is and the document ID or the data to be sent to the server within the URL. To create the RavenDB REST request, we will make a request to a specific URL that will look like:
url
: This represents the URL where RavenDB is running.port
: This is the TCP port number, by default the port number is8080
.databaseName
: This is the name of the database where the documents are stored.target
: This represents the target structure in RavenDB we want to deal with. This might be thedocs
structure, theindexes
structure, thequeries
structure, and so on.RequestData
: This represents the data resources for the request. It might be the document ID on which the action is performed (create, retrieve, update, or delete) or all other data needed to perform the action.