You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: Documents: How to get document metadata only?

Head is used to retrieve document metadata from a database.


JsonDocumentMetadata Head(string key);
key string key of a document to get metadata for
Return Value
JsonDocumentMetadata Metadata information for document with given key.


JsonDocumentMetadata metadata = store.DatabaseCommands.Head("employees/1"); // null if does not exist