Returns the same headers as an equivalent GET (content/metadata fetch)
on the /documents
service. For example, you can use the
returned content length to determine the end boundary for iterating over
sub-binaries.
URL Parameters | |
---|---|
category* |
The category of data for which to generate headers. Category
can be specified multiple times to request any combination of content
and metadata. Valid categories: content (default),
metadata , metadata-values ,
collections , permissions ,
properties , and quality .
Use metadata to request all categories except content.
|
database? | Perform this operation on the named content database instead of the default content database associated with the REST API instance. Using an alternative database requires the "eval-in" privilege; for details, see Security Requirements in the REST Application Developer's Guide. |
format? |
The format of metadata returned by the request, either
xml or json . The format parameter applies
only to metadata and overrides any format specified in the Accept
header.
|
txid? |
The transaction identifier of the multi-statement transaction in
which to service this request. Use the /transactions
service to create and manage multi-statement transactions.
|
uri | The URI of a document in the database. |
Response Headers | |
---|---|
Content-Type | The MIME type of the content that would be returned by a GET. |
Etag | An opaque version identifier for the requested document, suitable for subsequent use in an If-None-Match or If-Match header. This header is only available when content versioning is enabled. For details, see Client-Side Cache Management Using Content Versioning in the REST Application Developer's Guide. |
Upon success, MarkLogic Server returns status 200 (OK) and the same headers that are returned by an equivalent GET on the /documents service.
curl --anyauth --user user:password -X HEAD -i \ -H "Accept: multipart/mixed; boundary=picket-fence" \ 'http://localhost:8000/v1/documents?uri=/shakespeare/plays/a_and_c.xml&category=metadata&category=content&format=json' ==> The headers that would be returned by a GET request to the same URL. Server: MarkLogic Content-Type: text/plain; charset=UTF-8 Connection: close HTTP/1.1 200 OK Content-type: multipart/mixed; boundary=picket-fence Server: MarkLogic Connection: close
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.