<https://www.w3.org/TR/sparql11-http-rdf-update/>
        <http://purl.org/dc/terms/title>
                "SPARQL 1.1 Graph Store HTTP Protocol" .

<https://docs.linkeddatahub.com/reference/http-api/#content>
        a       <https://w3id.org/atomgraph/linkeddatahub#XHTML>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <p class=\"lead\">Learn how to read and write RDF data from/to LinkedDataHub applications over HTTP</p>\n    <p>LinkedDataHub implements a uniform, generic RESTful Linked Data API as defined by the\n        <a href=\"https://www.w3.org/TR/sparql11-http-rdf-update/\" target=\"_blank\">SPARQL 1.1 Graph Store Protocol</a>. It adds a few <a href=\"#graph-names\">conventions</a> and <a href=\"#constraints\">constraints</a>\n        on top of it however.</p>\n    <div>\n        <h2 id=\"auth\">Authentication</h2>\n        <p>LinkedDataHub UI supports 2 authentication methods:</p>\n        <ul>\n            <li><a href=\"https://dvcs.w3.org/hg/WebID/raw-file/tip/spec/tls-respec.html\" target=\"_blank\">WebID-TLS</a> using TLS client certificates</li>\n            <li><a href=\"https://developers.google.com/identity/protocols/oauth2/openid-connect\" target=\"_blank\">OpenID Connect using Google</a></li>\n        </ul>\n        <p>See how those authentication methods can be <a href=\"../configuration/\">configured</a> or how to <a href=\"../../get-started/get-an-account/\">get an account</a> on LinkedDataHub.</p>\n        <div class=\"alert alert-info\">\n            <p>HTTP API access using <a href=\"../command-line-interface/\">CLI scripts</a> or curl currently does not support the OIDC method.</p>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"acl\">Access control</h2>\n        <p>All HTTP access to <a href=\"#documents\">documents</a> is subject to <a href=\"../administration/acl/\">access\n            control</a>. Requesting a document with insufficient access rights will result in <code>403 Forbidden</code> response. That  means either:</p>\n        <ul>\n            <li>the user is not authenticated and public access to the document is not allowed</li>\n            <li>the user is authenticated but the associated agent does not have an authorization to <a href=\"../data-model/documents/#manage\">perform the action</a> on the\n                requested document</li>\n        </ul>\n    </div>\n    <div>\n        <h2 id=\"documents\">Managing documents</h2>\n        <p>Every document is also a <a href=\"../dataset/#structure\">named graph</a> in the application's RDF dataset. LinkedDataHub supports the SPARQL Graph Store Protocol's <a href=\"https://www.w3.org/TR/sparql11-http-rdf-update/#direct-graph-identification\" target=\"_blank\">direct graph identification</a> as the HTTP CRUD protocol for managing document data.</p>\n        <div class=\"alert alert-info\">\n            <p>GSP <a href=\"https://www.w3.org/TR/sparql11-http-rdf-update/#indirect-graph-identification\" target=\"_blank\">indirect graph identification</a> is not supported starting with LinkedDataHub version 5.x.</p>\n        </div>\n        <p>The API also supports the <code>PATCH</code> HTTP method which is <a href=\"https://www.w3.org/TR/sparql11-http-rdf-update/#http-patch\">optional in GSP</a>. It accepts graph-scoped SPARQL updates that will modify the requested document. Only the <code>INSERT/WHERE</code> and <code>DELETE WHERE</code> forms are supported; <code>GRAPH</code> patterns are not allowed.</p>\n        <p>Trailing slashes in document URIs are enforced using <code>308 Permanent Redirect</code> responses.</p>\n        <table class=\"table\">\n            <thead>\n                <tr>\n                    <th>Method</th>\n                    <th>Description</th>\n                    <th>Success</th>\n                    <th>Failure</th>\n                    <th>Reason</th>\n                </tr>\n            </thead>\n            <tbody>\n                <tr>\n                    <th rowspan=\"2\"><code id=\"ld-get\">GET</code></th>\n                    <td rowspan=\"2\">Returns the data of a document</td>\n                    <td rowspan=\"2\"><code>200 OK</code></td>\n                    <td><code>404 Not Found</code></td>\n                    <td>Document with request URI not found</td>\n                </tr>\n                <tr>\n                    <td><code>406 Not Acceptable</code></td>\n                    <td><a href=\"#con-neg\">Media type</a> not supported</td>\n                </tr>\n                <tr>\n                    <th rowspan=\"5\"><code id=\"ld-post\">POST</code></th>\n                    <td rowspan=\"5\">Appends data to a named graph</td>\n                    <td rowspan=\"5\"><code>204 No Content</code></td>\n                    <td><code>400 Bad Request</code></td>\n                    <td><a href=\"#con-neg\">RDF syntax error</a></td>\n                </tr>\n                <tr>\n                    <td><code>404 Not Found</code></td>\n                    <td>Document with request URI not found</td>\n                </tr>\n                <tr>\n                    <td><code>413 Payload Too Large</code></td>\n                    <td>Request body too large</td>\n                </tr>\n                <tr>\n                    <td><code>415 Unsupported Media Type</code></td>\n                    <td><a href=\"#con-neg\">Media type</a> not supported</td>\n                </tr>\n                <tr>\n                    <td><code>422 Unprocessable Entity</code></td>\n                    <td><a href=\"../administration/ontologies/#constraints\">Constraint</a> violation</td>\n                </tr>\n                <tr>\n                    <th rowspan=\"5\"><code id=\"ld-put\">PUT</code></th>\n                    <td rowspan=\"5\">Upserts a document</td>\n                    <td rowspan=\"5\"><code>200 OK</code> <code>201 Created</code> <code>308 Permanent Redirect</code></td>\n                    <td rowspan=\"2\"><code>400 Bad Request</code></td>\n                    <td><a href=\"#con-neg\">RDF syntax error</a></td>\n                </tr>\n                <tr>\n                    <td>Malformed document URI</td>\n                </tr>\n                <tr>\n                    <td><code>413 Payload Too Large</code></td>\n                    <td>Request body too large</td>\n                </tr>\n                <tr>\n                    <td><code>415 Unsupported Media Type</code></td>\n                    <td><a href=\"#con-neg\">Media type</a> not supported</td>\n                </tr>\n                <tr>\n                    <td><code>422 Unprocessable Entity</code></td>\n                    <td><a href=\"../administration/ontologies/#constraints\">Constraint</a> violation</td>\n                </tr>\n                <tr>\n                    <th rowspan=\"3\"><code id=\"ld-delete\">DELETE</code></th>\n                    <td rowspan=\"3\">Removes the requested document</td>\n                    <td rowspan=\"3\"><code>204 No Content</code></td>\n                    <td><code>404 Not Found</code></td>\n                    <td>Document with request URI not found</td>\n                </tr>\n                <tr>\n                    <td><code>405 Method Not Allowed</code></td>\n                    <td>Deleting root, owner, or secretary documents is not allowed</td>\n                </tr>\n                <tr>\n                    <th rowspan=\"2\"><code id=\"ld-patch\">PATCH</code></th>\n                    <td rowspan=\"2\">Modifies a document using SPARQL Update</td>\n                    <td rowspan=\"2\"><code>204 No Content</code></td>\n                    <td><code>422 Unprocessable Entity</code></td>\n                    <td>SPARQL update string violates syntax constraints</td>\n                </tr>\n            </tbody>\n        </table>\n        <div>\n            <h3 id=\"document-metadata\">Document metadata</h3>\n            <p>Unlike earlier versions, LinkedDataHub 5.x manages the <a href=\"../data-model/documents/#hierarchy\">document hierarchy</a> automatically.</p>\n            <p>By default, LinkedDataHub treats an RDF document as an item by giving it the <code>dh:Item</code> type and attaching it to the parent container using <code>sioc:has_container</code>. If the client wants to create a container instead, it has to explicitly add the <code>dh:Container</code> type on the document resource; the new container will be attached to its parent using <code>sioc:has_container</code>. In either case, the URI of the new document's will be relative to its parent's.</p>\n            <p>LinkedDataHub will also manage additional document metadata, such as its owner and creation/modification timestamps.</p>\n            <p>For example, this HTTP request to create a new container (Turtle syntax):</p>\n            <pre><code>PUT /namedgraph/new-container/ HTTP/1.1\nHost: linkeddatahub.com\nContent-Type: text/turtle\n\n@prefix dh:     &lt;https://www.w3.org/ns/ldt/document-hierarchy#&gt; .\n@prefix dct:    &lt;http://purl.org/dc/terms/&gt; .\n\n&lt;&gt; a dh:Container ;\n    dct:title \"New container\" .</code></pre>\n            <p>will produce the following document triples:</p>\n            <pre><code>@prefix dh:     &lt;https://www.w3.org/ns/ldt/document-hierarchy#&gt; .\n@prefix dct:    &lt;http://purl.org/dc/terms/&gt; .\n@prefix xsd:    &lt;http://www.w3.org/2001/XMLSchema#&gt; .\n@prefix sioc:   &lt;http://rdfs.org/sioc/ns#&gt; .\n@prefix acl:    &lt;http://www.w3.org/ns/auth/acl#&gt; .\n\n&lt;https://linkeddatahub.com/namedgraph/new-container/&gt;\n    a dh:Container ;\n    dct:created \"2025-03-31T21:46:21.984Z\"^^xsd:dateTime ;\n    dct:creator &lt;https://linkeddatahub.com/namedgraph/admin/acl/agents/fda0009e-191b-4f07-838c-5daf2a74b35f/#this&gt; ;\n    dct:title \"New container\" ;\n    sioc:has_parent &lt;https://linkeddatahub.com/namedgraph/&gt; ;\n    acl:owner &lt;https://linkeddatahub.com/namedgraph/admin/acl/agents/fda0009e-191b-4f07-838c-5daf2a74b35f/#this&gt; .</code></pre>     \n        <p>The HTTP request to produce a new item can be empty:</p>\n            <pre><code>PUT /namedgraph/new-container/ HTTP/1.1\nHost: linkeddatahub.com\nContent-Type: text/turtle</code></pre>\n            <p>It will create an item document with the following triples:</p>\n            <pre><code>@prefix dh:    &lt;https://www.w3.org/ns/ldt/document-hierarchy#&gt; .\n@prefix dct:    &lt;http://purl.org/dc/terms/&gt; .\n@prefix xsd:    &lt;http://www.w3.org/2001/XMLSchema#&gt; .\n@prefix sioc:   &lt;http://rdfs.org/sioc/ns#&gt; .\n@prefix acl:    &lt;http://www.w3.org/ns/auth/acl#&gt; .\n\n&lt;https://linkeddatahub.com/namedgraph/new-item/&gt;\n    a dh:Item ;\n    dct:created \"2025-03-31T20:45:42.802Z\"^^xsd:dateTime ;\n    dct:creator &lt;https://linkeddatahub.com/acl/agents/d47e1f9b-c8d0-4546-840f-5d9fbb479da2/#id9d3814f2-53bc-42e9-b1ab-46cbc9a94263&gt; ;\n    sioc:has_container &lt;https://linkeddatahub.com/namedgraph/&gt; ;\n    acl:owner &lt;https://linkeddatahub.com/admin/acl/agents/d47e1f9b-c8d0-4546-840f-5d9fbb479da2/#id9d3814f2-53bc-42e9-b1ab-46cbc9a94263&gt; .</code></pre>\n        </div>\n        <div>\n            <h3 id=\"constraints\">Built-in constraints</h3>\n            <p>LinkedDataHub has a few built-in constraints that are not found in the standard Graph Store Protocol:</p>\n            <ul>\n                <li>It's not possible to delete the root document (returns <code>405 Method Not Allowed</code>)</li>\n                <li>It's not possible to modify or delete the documents of the owner agent and the secretary agent (returns <code>405 Method Not Allowed</code>)</li>\n                <li>A document can only be created with a URL relative to an existing container (i.e. resolving <samp>..</samp> against the new document's URL must identify an existing container)</li>\n            </ul>\n            <p>The built-in constraints are similar to, but separate from the <a href=\"../administration/ontologies/#constraints\">ontology constraints</a>.</p>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"sparql\">Executing SPARQL</h2>\n        <p>Every LinkedDataHub application provides a SPARQL endpoint on <code>sparql</code> path (relative to the application's base URI). It supports the\n            <a href=\"https://www.w3.org/TR/sparql11-protocol/\" target=\"_blank\">SPARQL 1.1 Protocol</a> and serves as a proxy for the backend endpoint of the\n            application.</p>\n    </div>\n    <div>\n        <h2 id=\"system-endpoints\">System endpoints</h2>\n        <p></p>\n        <h3>Admin and end-user apps</h3>\n        <dl>\n            <dt><samp>add</samp></dt>\n            <dd>Reads data from the specified URL location or uploaded file into the specified named graph</dd>\n            <dt><samp>ns</samp></dt>\n            <dd>In-memory namespace ontology as well as its SPARQL endpoint</dd>\n            <dt><samp>transform</samp></dt>\n            <dd>Reads data from the specified URL location or uploaded file, transforms it using the specified <code>CONSTRUCT</code> query, and stores the result into the specified named graph</dd>\n        </dl>\n        <h3>Admin app only</h3>\n        <dl>\n            <dt><samp>admin/access</samp></dt>\n            <dd>Access metadata (for the authenticated agent)</dd>\n            <dt><samp>admin/access/request</samp></dt>\n            <dd>Access request (for the authenticated agent)</dd>\n            <dt><samp>admin/sign%20up</samp></dt>\n            <dd>WebID-TLS agent signup</dd>\n            <dt><samp>oauth2/login/google</samp></dt>\n            <dd>OpenID Connect with Google login</dd>\n            <dt><samp>oauth2/login/orcid</samp></dt>\n            <dd>OpenID Connect with ORCID login</dd>\n            <dt><samp>oauth2/authorize/google</samp></dt>\n            <dd>OpenID Connect with Google callback</dd>\n            <dt><samp>oauth2/authorize/orcid</samp></dt>\n            <dd>OpenID Connect with ORCID callback</dd>\n            <dt><samp>admin/clear</samp></dt>\n            <dd>Clears the specified ontology from memory cache and reloads it from the admin SPARQL endpoint</dd>\n            <dt><samp>packages/install</samp></dt>\n            <dd>Installs a package. Requires owner/admin authentication</dd>\n            <dt><samp>packages/uninstall</samp></dt>\n            <dd>Uninstalls a package. Requires owner/admin authentication</dd>\n        </dl>\n    </div>\n    <div>\n        <h2 id=\"ld-proxy\">Linked Data proxy</h2>\n        <p>LinkedDataHub works as a <dfn>Linked Data proxy</dfn> (from the end-user perspective, as a <dfn>Linked Data browser</dfn>) when a URL is provided using the <code>uri</code> query parameter.\n            All HTTP methods are supported.</p>\n        <p>If the URL dereferences successfully as RDF, LinkedDataHub forwards its response body (re-serializing it to enable content negotiation).\n            During a write request, the request body is forwarded to the provided URL.</p>\n        <p>The proxy only accepts external (non-relative to the current application's base URI) URLs; local URLs have to be dereferenced directly.</p>\n    </div>\n    <div>\n        <h2 id=\"con-neg\">Content negotiation</h2>\n        <p>LinkedDataHub implements <a href=\"https://tools.ietf.org/html/rfc7231#section-3.4.1\" target=\"_blank\">proactive conneg</a> based on the request <code>Accept</code>\n            header value.  The following RDF media types are supported (for requests as well as responses, unless indicated otherwise):</p>\n        <ul>\n            <li><a href=\"https://www.w3.org/TR/turtle/\" target=\"_blank\">Turtle</a> <code>text/turtle</code></li>\n            <li><a href=\"https://www.w3.org/TR/n-triples/\" target=\"_blank\">N-Triples</a> <code>application/n-triples</code></li>\n            <li><a href=\"https://www.w3.org/TR/rdf-syntax-grammar/\" target=\"_blank\">RDF/XML</a> <code>application/rdf+xml</code></li>\n            <li><a href=\"https://www.w3.org/TR/json-ld/\" target=\"_blank\">JSON-LD</a> <code>application/ld+json</code></li>\n            <li><a href=\"https://atomgraph.github.io/RDF-POST/\" target=\"_blank\">RDF/POST</a> <code>application/x-www-form-urlencoded</code> (for requests only)</li>\n        </ul>\n    </div>\n    <div>\n        <h2 id=\"errors\">Error responses</h2>\n        <p>LinkedDataHub provides machine-readable error responses in the requested RDF format. An example of <code>403 Forbidden</code>:</p>\n        <pre><code>@prefix xsd:  &lt;http://www.w3.org/2001/XMLSchema#&gt; .\n@prefix http: &lt;http://www.w3.org/2011/http#&gt; .\n@prefix sc:   &lt;http://www.w3.org/2011/http-statusCodes#&gt; .\n@prefix dct:  &lt;http://purl.org/dc/terms/&gt; .\n\n[ a http:Response ;\n    dct:title \"Access not authorized\" ;\n    http:reasonPhrase \"Forbidden\" ;\n    http:sc sc:Forbidden ;\n    http:statusCodeValue \"403\"^^xsd:long\n] .</code></pre>\n    </div>\n    <div>\n        <h2 id=\"caching\">Caching</h2>\n        <p><code>GET</code> and <code>HEAD</code> RDF responses from the backend triplestores (<em>not LinkedDataHub responses</em>) are cached automatically by LinkedDataHub using <a href=\"https://varnish-cache.org\" target=\"_blank\">Varnish</a>\n            as HTTP proxy cache. You can check the age of the response by inspecting the <code>Age</code> response header (the value is in seconds).</p>\n        <p>LinkedDataHub sends <code>ETag</code> response headers that are derived as hashes of the requested document's RDF content. Every serialization format (HTML, RDF/XML, Turtle etc.) gets a distinct <code>ETag</code> value.</p>\n        <p>Caching of LinkedDataHub responses can be enabled on the nginx HTTP proxy server by uncommenting the <code>add_header Cache-Control</code> directives in the <samp>platform/nginx.conf.template</samp> file.\n            Caching of <samp>/uploads/</samp> and <samp>/static/</samp> namespaces is enabled by default (since version 4.0.4).</p>\n    </div>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>;
        <http://www.w3.org/2000/01/rdf-schema#seeAlso>
                <https://www.w3.org/TR/sparql11-http-rdf-update/> .

<https://docs.linkeddatahub.com/reference/http-api/>
        a       <https://www.w3.org/ns/ldt/document-hierarchy#Item>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://docs.linkeddatahub.com/reference/http-api/#content>;
        <http://purl.org/dc/terms/created>
                "2026-06-16T20:33:52.018Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/creator>
                <https://admin.linkeddatahub.com/acl/agents/0ab4a0f7-1ab0-4d0c-8efc-63a79a2e9a10/#this>;
        <http://purl.org/dc/terms/description>
                "Learn how to access and manage RDF data over generic HTTP API";
        <http://purl.org/dc/terms/title>
                "HTTP API";
        <http://rdfs.org/sioc/ns#has_container>
                <https://docs.linkeddatahub.com/reference/>;
        <http://www.w3.org/ns/auth/acl#owner>
                <https://admin.linkeddatahub.com/acl/agents/0ab4a0f7-1ab0-4d0c-8efc-63a79a2e9a10/#this> .
