Stardog Queries API

Operations relating to queries running on the server

Operations 10

GET /admin/queries List queries #
GET /admin/queries/stored/{name} Get stored query #
POST /admin/queries/stored/{name} Rename stored query #
DELETE /admin/queries/stored/{name} Delete stored query #
GET /admin/queries/stored List stored queries #
PUT /admin/queries/stored Update stored query #
POST /admin/queries/stored Add stored query #
DELETE /admin/queries/stored Delete all stored queries #
GET /admin/queries/{name} Get query #
DELETE /admin/queries/{name} Kill query #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stardog-queries-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stardog-queries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stardog HTTP Queries API
  description: '# Overview

    Stardog supports the standard SPARQL Protocol HTTP bindings, as well as additional functionality via HTTP.'
  contact:
    url: https://stardog.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: 12.0.3
  x-logo:
    url: https://d33wubrfki0l68.cloudfront.net/66e9dcff51317cfc11b9f3d4ce2917a11ba81681/543c1/img/stardog-logo-optimized.svg
servers:
- url: http://localhost:5820
tags:
- name: Queries
  description: Operations relating to queries running on the server
paths:
  /admin/queries:
    get:
      tags:
      - Queries
      summary: List queries
      description: Get a list of all running queries
      operationId: listQueries
      responses:
        '200':
          $ref: '#/components/responses/QUERY_LIST'
  /admin/queries/stored/{name}:
    get:
      tags:
      - Queries
      summary: Get stored query
      operationId: getStoredQuery
      parameters:
      - $ref: '#/components/parameters/name_stored_query'
      responses:
        '200':
          $ref: '#/components/responses/STORED_QUERIES'
        '404':
          $ref: '#/components/responses/NAME_STORED_QUERY_404'
    post:
      tags:
      - Queries
      summary: Rename stored query
      operationId: renameStoredQuery
      parameters:
      - $ref: '#/components/parameters/name_stored_query'
      - name: move
        in: query
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GENERIC_NAME'
        required: true
      responses:
        '204':
          description: Query renamed
        '404':
          $ref: '#/components/responses/NAME_STORED_QUERY_404'
    delete:
      tags:
      - Queries
      summary: Delete stored query
      operationId: deleteStoredQuery
      parameters:
      - $ref: '#/components/parameters/name_stored_query'
      responses:
        '204':
          description: Query deleted
        '404':
          $ref: '#/components/responses/NAME_STORED_QUERY_404'
  /admin/queries/stored:
    get:
      tags:
      - Queries
      summary: List stored queries
      operationId: listStoredQueries
      parameters:
      - $ref: '#/components/parameters/name_db'
      responses:
        '200':
          $ref: '#/components/responses/STORED_QUERIES'
    put:
      tags:
      - Queries
      summary: Update stored query
      description: Add stored query, overwriting if a query with that name already exists
      operationId: updateStoredQuery
      requestBody:
        $ref: '#/components/requestBodies/STORED_QUERY'
      responses:
        '204':
          description: Stored query updated
        '400':
          $ref: '#/components/responses/MALFORMED_REQUEST_400'
    post:
      tags:
      - Queries
      summary: Add stored query
      operationId: addStoredQuery
      parameters:
      - $ref: '#/components/parameters/STORED_QUERY_ID'
      requestBody:
        $ref: '#/components/requestBodies/STORED_QUERY'
      responses:
        '204':
          description: Stored query added
        '400':
          $ref: '#/components/responses/MALFORMED_REQUEST_400'
        '422':
          description: Stored query already exists
    delete:
      tags:
      - Queries
      summary: Delete all stored queries
      operationId: clearAllStoredQueries
      responses:
        '204':
          description: All stored queries deleted
  /admin/queries/{name}:
    get:
      tags:
      - Queries
      summary: Get query
      description: Get details of a specific query
      operationId: getQuery
      parameters:
      - $ref: '#/components/parameters/name_query'
      - name: plan
        in: query
        schema:
          type: string
      - name: verbose
        in: query
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/PROCESS'
        '404':
          $ref: '#/components/responses/NAME_QUERY_404'
    delete:
      tags:
      - Queries
      summary: Kill query
      operationId: killQuery
      parameters:
      - $ref: '#/components/parameters/name_query'
      responses:
        '204':
          description: Query killed
        '404':
          $ref: '#/components/responses/NAME_QUERY_404'
components:
  responses:
    MALFORMED_REQUEST_400:
      description: Malformed request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GENERIC_RESPONSE_ERROR_MESSAGE'
    NAME_STORED_QUERY_404:
      description: Stored query does not exist
      content:
        application/json:
          schema:
            required:
            - message
            - code
            properties:
              message:
                type: string
                example: Stored query does not exist
              code:
                type: string
                example: QEQNF2
    PROCESS:
      description: Process
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PROCESS'
    NAME_QUERY_404:
      description: Query does not exist
      content:
        application/json:
          schema:
            required:
            - message
            - code
            properties:
              message:
                type: string
                example: Query does not exist
              code:
                type: string
                example: QEQNF2
    QUERY_LIST:
      description: List of Queries in system
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QUERY_LIST'
    STORED_QUERIES:
      description: RDF serialization of server's stored queries
      content:
        text/turtle:
          schema:
            type: string
          examples:
            STORED_QUERY_TURTLE:
              value: null
              $ref: '#/components/examples/STORED_QUERY_TURTLE'
        application/trig:
          schema:
            type: string
          examples:
            STORED_QUERY_TRIG:
              value: null
              $ref: '#/components/examples/STORED_QUERY_TRIG'
        application/rdf+xml:
          schema:
            type: string
          examples:
            STORED_QUERY_RDFXML:
              value: null
              $ref: '#/components/examples/STORED_QUERY_RDFXML'
        application/n-triples:
          schema:
            type: string
          examples:
            STORED_QUERY_NTRIPLESQUADS:
              value: null
              $ref: '#/components/examples/STORED_QUERY_NTRIPLESQUADS'
        application/n-quads:
          schema:
            type: string
          examples:
            STORED_QUERY_NTRIPLESQUADS:
              value: null
              $ref: '#/components/examples/STORED_QUERY_NTRIPLESQUADS'
        application/ld+json:
          schema:
            type: string
          examples:
            STORED_QUERY_JSONLD:
              value: null
              $ref: '#/components/examples/STORED_QUERY_JSONLD'
  examples:
    STORED_QUERY_RDFXML:
      value: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rdf:RDF\n\txmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n\txmlns:system=\"http://system.stardog.com/\">\n    <rdf:Description rdf:about=\"http://system.stardog.com/QuerymyQuery\">\n        <rdf:type rdf:resource=\"http://system.stardog.com/StoredQuery\"/>\n        <rdf:type rdf:resource=\"http://system.stardog.com/SharedQuery\"/>\n        <rdf:type rdf:resource=\"http://system.stardog.com/ReasoningQuery\"/>\n        <system:queryName rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">myQuery</system:queryName>\n        <system:queryString rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">select * {?s ?p ?o}</system:queryString>\n        <system:queryCreator rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">admin</system:queryCreator>\n        <system:queryDatabase rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">myDb</system:queryDatabase>\n    </rdf:Description>\n</rdf:RDF>"
    STORED_QUERY_TURTLE:
      value: "@prefix system: <http://system.stardog.com/> .\n\nsystem:QuerymyQuery a system:StoredQuery, system:SharedQuery , system:ReasoningQuery ;\n   system:queryName \"myQuery\" ;\n   system:queryString \"select * {?s ?p ?o}\" ;\n   system:queryCreator \"admin\" ;\n   system:queryDatabase \"myDb\" ."
    STORED_QUERY_TRIG:
      value: "@prefix system: <http://system.stardog.com/> .\n\n{\n    system:QuerymyQuery a system:StoredQuery , system:SharedQuery , system:ReasoningQuery ;\n      system:queryName \"myQuery\" ;\n      system:queryString \"select * {?s ?p ?o}\" ;\n      system:queryCreator \"admin\" ;\n      system:queryDatabase \"myDb\" .\n}"
    STORED_QUERY_NTRIPLESQUADS:
      value: "<http://system.stardog.com/QuerymyQuery> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://system.stardog.com/StoredQuery> .\n<http://system.stardog.com/QuerymyQuery> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://system.stardog.com/SharedQuery> . \n<http://system.stardog.com/QuerymyQuery> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://system.stardog.com/ReasoningQuery> . \n<http://system.stardog.com/QuerymyQuery> <http://system.stardog.com/queryName> \"myQuery\" .\n<http://system.stardog.com/QuerymyQuery> <http://system.stardog.com/queryString> \"select * {?s ?p ?o}\" .\n<http://system.stardog.com/QuerymyQuery> <http://system.stardog.com/queryCreator> \"admin\" .\n<http://system.stardog.com/QuerymyQuery> <http://system.stardog.com/queryDatabase> \"myDb\" ."
    STORED_QUERY_JSONLD:
      value: "{\n  \"@context\" : {\n    \"rdf\" : \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\n    \"system\" : \"http://system.stardog.com/\",\n    \"owl\" : \"http://www.w3.org/2002/07/owl#\",\n    \"@vocab\" : \"http://api.stardog.com/\",\n    \"rdfs\" : \"http://www.w3.org/2000/01/rdf-schema#\",\n    \"stardog\" : \"tag:stardog:api:\",\n    \"xsd\" : \"http://www.w3.org/2001/XMLSchema#\"\n  },\n  \"@graph\" : [ {\n    \"@id\" : \"system:QuerymyQuery\",\n    \"@type\" : [ \"system:StoredQuery\", \"system:SharedQuery\", \"system:ReasoningQuery\" ],\n    \"system:queryString\" : {\n      \"@value\" : \"select * {?s ?p ?o}\"\n    },\n    \"system:queryCreator\" : {\n      \"@value\" : \"admin\"\n    },\n    \"system:queryDatabase\" : {\n      \"@value\" : \"myDb\"\n    },\n    \"system:queryName\" : {\n      \"@value\" : \"myQuery\"\n    }\n  } ]\n}"
  schemas:
    QUERY_LIST:
      required:
      - queries
      properties:
        queries:
          type: array
          items:
            $ref: '#/components/schemas/QUERY'
    GENERIC_NAME:
      required:
      - name
      properties:
        name:
          type: string
    GENERIC_RESPONSE_ERROR_MESSAGE:
      required:
      - message
      properties:
        message:
          type: string
          example: Unexpected end of file [L9]
        code:
          type: string
          example: QEIVR2
    PROCESS:
      required:
      - type
      - db
      - endTime
      - startTime
      - id
      - user
      - status
      properties:
        type:
          type: string
          example: query
        db:
          type: string
          description: The database on which the query is running
        endTime:
          type: integer
          description: The UNIX timestamp at which the process ended, or -1 if it is still running
          format: int64
        startTime:
          type: integer
          description: The UNIX timestamp when the process started running
          format: int64
        id:
          type: string
        user:
          type: string
          description: The user that initiated the query
        status:
          type: string
          enum:
          - Not started
          - Pre-execution
          - Running
          - Terminating
          - Done
    QUERY:
      required:
      - query
      - db
      - endTime
      - startTime
      - id
      - kernelId
      - timeout
      - user
      - reasoning
      - status
      properties:
        query:
          type: string
          example: SELECT * WHERE {?s ?p ?o}
        db:
          type: string
          description: The database on which the query is running
        endTime:
          type: integer
          description: The UNIX timestamp at which the query ended, or -1 if it is still running
          format: int64
        startTime:
          type: integer
          description: The UNIX timestamp when the query started running
          format: int64
        id:
          type: string
        kernelId:
          type: string
        timeout:
          type: integer
          description: The amount of time (in ms) after which the query will time out, or -1 if it will not time out
          format: int64
        user:
          type: string
          description: The user that initiated the query
        reasoning:
          type: boolean
          description: Whether reasoning/inference is enabled on the query
        reasoningSchema:
          type: string
        status:
          type: string
          enum:
          - Not started
          - Pre-execution
          - Running
          - Terminating
          - Done
  parameters:
    name_db:
      name: db
      in: query
      description: Database name
      required: false
      schema:
        type: string
      example: myDb
    name_query:
      name: name
      in: path
      description: The name of the query
      required: true
      schema:
        type: string
    name_stored_query:
      name: name
      in: path
      description: The name of the stored query
      required: true
      schema:
        type: string
  requestBodies:
    STORED_QUERY:
      description: RDF serialization of the stored query
      content:
        text/turtle:
          schema:
            type: string
          examples:
            STORED_QUERY_TURTLE:
              value: null
              $ref: '#/components/examples/STORED_QUERY_TURTLE'
        application/trig:
          schema:
            type: string
          examples:
            STORED_QUERY_TRIG:
              value: null
              $ref: '#/components/examples/STORED_QUERY_TRIG'
        application/rdf+xml:
          schema:
            type: string
          examples:
            STORED_QUERY_RDFXML:
              value: null
              $ref: '#/components/examples/STORED_QUERY_RDFXML'
        application/n-triples:
          schema:
            type: string
          examples:
            STORED_QUERY_NTRIPLESQUADS:
              value: null
              $ref: '#/components/examples/STORED_QUERY_NTRIPLESQUADS'
        application/n-quads:
          schema:
            type: string
          examples:
            STORED_QUERY_NTRIPLESQUADS:
              value: null
              $ref: '#/components/examples/STORED_QUERY_NTRIPLESQUADS'
        application/ld+json:
          schema:
            type: string
          examples:
            STORED_QUERY_JSONLD:
              value: null
              $ref: '#/components/examples/STORED_QUERY_JSONLD'
      required: true
externalDocs:
  url: https://docs.stardog.com
x-tagGroups:
- name: Data Unification
  tags:
  - Data Sources
  - Virtual Graphs
- name: Virtual Graphs External Compute
  tags:
  - Virtual Graphs External Compute
- name: Server
  tags:
  - Monitoring
  - Stored Functions
  - Server Status/Metrics
  - Server Admin
  - Queries
  - Cluster Admin
- name: Database
  tags:
  - Checkpoints
  - DB Admin
  - Integrity Constraints / SHACL
  - Data Caching
  - Graph Store Protocol
  - Matcher, aligning schemas from various data sources
  - Reasoning
  - Transactions
  - GraphQL
  - SPARQL
  - EntityResolution
- name: Security
  tags:
  - Roles
  - Permissions
  - Users
- name: Knowledge Catalog
  tags:
  - Knowledge Catalog