---
updatedAt: 2025-02-19T22:14:33.000Z
agentTools:
  projectIndex: https://changelog-dzt-kg.readme.io/llms.txt
---

# SPARQL 1.1 Read

The endpoint supports most SPARQL 1.1. Mime-Types for the supported SELECT, CONSTRUCT and ASK queries (see [SPARQL1.1 Protocol 2.1.6](https://www.w3.org/TR/sparql11-protocol/)).

SELECT Queries
- application/sparql-results+json [SPARQL Query Results JSON Format	](https://www.w3.org/TR/rdf-sparql-json-res/)
- application/sparql-results+xml - [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/)
- application/x-binary-rdf-results-table - binary RDF results table format

CONSTRUCT Queries
- application/ld+json [JSON-LD](https://json-ld.org/)
- application/rdf+xml - [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/)
- text/plain - [N-Triples](https://www.w3.org/TR/rdf-testcases/#ntriples)
- text/turtle - [Turtle](https://www.dajobe.org/2004/01/turtle/)
- text/rdf+n3 - [N3](https://www.w3.org/DesignIssues/Notation3.html)
- application/trix - [TriX](https://swdev.nokia.com/trix/TriX.html)
- application/x-trig - [TriG](https://www4.wiwiss.fu-berlin.de/bizer/TriG/Spec/)
- application/x-binary-rdf - [Sesame Binary](https://rivuli-development.com/2011/11/binary-rdf-in-sesame/)

ASK Queries
- application/sparql-results+json - [SPARQL Query Results JSON Format	](https://www.w3.org/TR/rdf-sparql-json-res/)
-	application/sparql-results+xml - [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/)
- text/boolean

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Things Service - KG Platform",
    "version": "1.0.0",
    "description": "# General Information\nThe KG Platform API provides a set of services for\n- knowledge management (Create, Update, Delete and Status)\n- knowledge access (Read and Query)\n- graph management (export and delete)\n\nThe Geo Enrichment and Geo Linking Service are currently available as beta status in the pre-production environment\n",
    "termsOfService": "https://onlim.com/en/terms-conditions/",
    "contact": {
      "email": "office@onlim.com",
      "url": "https://onlim.com/en/contact/"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "x-logo": {
      "url": "https://onlim.com/wp-content/uploads/2017/11/logo-header.png"
    }
  },
  "servers": [
    {
      "url": "https://proxy.opendatagermany.io/api/ts/"
    }
  ],
  "tags": [
    {
      "name": "SPARQL",
      "x-displayName": "SPARQL1.1",
      "description": "A SPARQL 1.1 endpoint for ASK, SELECT and CONSTRUCT Queries"
    }
  ],
  "paths": {
    "/v1/kg/sparql": {
      "post": {
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "tags": [
          "SPARQL"
        ],
        "summary": "SPARQL 1.1 Read\n",
        "operationId": "executeSPARQLPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/x-api-key_required"
          },
          {
            "$ref": "#/components/parameters/x-datasource"
          },
          {
            "$ref": "#/components/parameters/x-publisher"
          },
          {
            "in": "header",
            "name": "Accept",
            "description": "the mime type - see [SPARQL1.1 Protocol 2.1.6](https://www.w3.org/TR/sparql11-protocol/)\n",
            "schema": {
              "type": "string"
            },
            "required": true,
            "examples": {
              "sparqlresultsjson": {
                "value": "application/sparql-results+json"
              },
              "jsonld": {
                "value": "application/ld+json"
              },
              "turtle": {
                "value": "text/turtle"
              }
            }
          }
        ],
        "description": "The endpoint supports most SPARQL 1.1. Mime-Types for the supported SELECT, CONSTRUCT and ASK queries (see [SPARQL1.1 Protocol 2.1.6](https://www.w3.org/TR/sparql11-protocol/)).\n\nSELECT Queries\n- application/sparql-results+json [SPARQL Query Results JSON Format\t](https://www.w3.org/TR/rdf-sparql-json-res/)\n- application/sparql-results+xml - [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/)\n- application/x-binary-rdf-results-table - binary RDF results table format\n\nCONSTRUCT Queries\n- application/ld+json [JSON-LD](https://json-ld.org/)\n- application/rdf+xml - [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/)\n- text/plain - [N-Triples](https://www.w3.org/TR/rdf-testcases/#ntriples)\n- text/turtle - [Turtle](https://www.dajobe.org/2004/01/turtle/)\n- text/rdf+n3 - [N3](https://www.w3.org/DesignIssues/Notation3.html)\n- application/trix - [TriX](https://swdev.nokia.com/trix/TriX.html)\n- application/x-trig - [TriG](https://www4.wiwiss.fu-berlin.de/bizer/TriG/Spec/)\n- application/x-binary-rdf - [Sesame Binary](https://rivuli-development.com/2011/11/binary-rdf-in-sesame/)\n\nASK Queries\n- application/sparql-results+json - [SPARQL Query Results JSON Format\t](https://www.w3.org/TR/rdf-sparql-json-res/)\n-\tapplication/sparql-results+xml - [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/)\n- text/boolean\n",
        "requestBody": {
          "required": true,
          "content": {
            "text/plain": {
              "schema": {
                "type": "string",
                "example": "SELECT *\nWHERE{\n  ?s ?p ?o.\n}LIMIT 1\n"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientError"
                }
              }
            }
          },
          "404": {
            "description": "No Query data found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientError"
                }
              }
            }
          },
          "406": {
            "description": "Accept Mime-type is not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "x-api-key_required": {
        "in": "header",
        "name": "X-API-KEY",
        "description": "the api key for authentication and authorization",
        "schema": {
          "type": "string"
        },
        "required": true,
        "x-public": true
      },
      "x-datasource": {
        "in": "header",
        "name": "X-DATASOURCE",
        "description": "the datasource of the graph",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "x-publisher": {
        "in": "header",
        "name": "X-PUBLISHER",
        "description": "the publisher of the graph",
        "schema": {
          "type": "string"
        },
        "required": false
      }
    },
    "schemas": {
      "ClientError": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "timestamp": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "ServerError": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "timestamp": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Knowledge management",
      "description": "Only data import is implemented",
      "tags": [
        "Import",
        "Import Status",
        "Update Thing",
        "Delete Things"
      ]
    },
    {
      "name": "Knowledge access",
      "description": "Read and query data",
      "tags": [
        "Get Thing",
        "Get Meta",
        "Get Ontology",
        "Get representative super type",
        "Saved Queries",
        "SPARQL",
        "Search Things",
        "Search Things V2"
      ]
    },
    {
      "name": "Named graphs",
      "description": "Managing named graphs",
      "tags": [
        "Named Graphs"
      ]
    },
    {
      "name": "Geo Enrichment Service (BETA Status)",
      "description": "(BETA Status)",
      "tags": [
        "Geo Enrichment Config",
        "Geo Enrichment Job"
      ]
    },
    {
      "name": "Geo Linking Service (BETA Status)",
      "description": "(BETA Status)",
      "tags": [
        "Geo Linking Config",
        "Geo Linking Job"
      ]
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```