Loading TOC...

MarkLogic 10 Product Documentation
HEAD /v1/graphs

Summary

Returns the same headers as an equivalent GET on the /graphs service.

URL Parameters
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.
graph? Specify the URI of a named graph. You cannot use this parameter with the default parameter.
default? Indicates the request should act on the default graph. This parameter accepts no value. You cannot use this parameter with the graph parameter.
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.
Request Headers
Accept* The expected MIME type of the response.
Response Headers
Content-Type The MIME type of the data that would be returned by a GET request.

Response

Upon success, MarkLogic Server returns status 200 (OK) and the same headers that are returned by an equivalent GET on the /documents service.

Required Privileges

This operation requires the rest-reader role, or the following privilege:

http://marklogic.com/xdmp/privileges/rest-reader

Usage Notes

Use this method to determine what headers an equivalent GET will return. For details on usage, refer to GET /v1/graphs. This interface implements the HEAD method of the W3C Graph Store HTTP Protocol; for details, see http://www.w3.org/TR/sparql11-http-rdf-update/.

NOTE: The collection lexicon must be enabled on your database when using this method. You can check the configuration from the Admin Interface.

Example

$ curl --anyauth --user user:password -i -X HEAD -H "Accept: text/turtle" \
    http://localhost:8000/v1/graphs?graph=/my/named/graph

HTTP/1.1 200 OK
Content-type: text/turtle; charset=UTF-8
Server: MarkLogic
Connection: Keep-Alive
Keep-Alive: timeout=5
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.