Stardog Integrity Constraints / SHACL API

The Integrity Constraints / SHACL API from Stardog — 5 operation(s) for integrity constraints / shacl.

Operations 5

GET /{db}/icv List constraints #
POST /{db}/icv/validate Validate constraints #
POST /{db}/icv/{txid}/validate Validate constraints in transaction #
POST /{db}/icv/report SHACL validation report #
POST /{db}/icv/{txid}/report SHACL validation report in transaction #

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-integrity-constraints-shacl-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-integrity-constraints-shacl-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stardog HTTP Integrity Constraints / SHACL 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: Integrity Constraints / SHACL
  description: ''
paths:
  /{db}/icv:
    get:
      tags:
      - Integrity Constraints / SHACL
      summary: List constraints
      operationId: getConstraints
      parameters:
      - name: db
        $ref: '#/components/parameters/db'
      responses:
        '200':
          description: Constraints in RDF format
          content:
            text/turtle:
              schema:
                type: String
              examples:
                ICV_CONSTRAINT_TTL:
                  description: ICV_CONSTRAINT_TTL
                  value: null
                  $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
            application/trig:
              schema:
                type: String
              examples:
                ICV_CONSTRAINT_TTL:
                  description: ICV_CONSTRAINT_TTL
                  value: null
                  $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
            application/rdf+xml:
              schema:
                type: String
              examples:
                ICV_CONSTRAINT_RDFXML:
                  description: ICV_CONSTRAINT_RDFXML
                  value: null
                  $ref: '#/components/examples/ICV_CONSTRAINT_RDFXML'
            application/n-triples:
              schema:
                type: String
              examples:
                ICV_CONSTRAINT_TTL:
                  description: ICV_CONSTRAINT_TTL
                  value: null
                  $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
            application/n-quads:
              schema:
                type: String
              examples:
                ICV_CONSTRAINT_TTL:
                  description: ICV_CONSTRAINT_TTL
                  value: null
                  $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
            application/ld+json:
              schema:
                type: String
              examples:
                ICV_CONSTRAINT_JSONLD:
                  description: ICV_CONSTRAINT_JSONLD
                  value: null
                  $ref: '#/components/examples/ICV_CONSTRAINT_JSONLD'
        '404':
          description: Database does not exist
          content:
            application/json:
              schema:
                required:
                - message
                - code
                properties:
                  message:
                    type: string
                    example: Database does not exist
                  code:
                    type: string
                    example: 0D0DU2
      x-sort-order:
        group: '0'
  /{db}/icv/validate:
    post:
      tags:
      - Integrity Constraints / SHACL
      summary: Validate constraints
      description: Determine whether or not the given constraints are valid
      operationId: validateConstraints
      parameters:
      - name: db
        $ref: '#/components/parameters/db'
      requestBody:
        $ref: '#/components/requestBodies/ICV_CONSTRAINT'
      responses:
        '200':
          $ref: '#/components/responses/ICV_CONSTRAINT_VALIDATION'
        '404':
          description: Database does not exist
          content:
            application/json:
              schema:
                required:
                - message
                - code
                properties:
                  message:
                    type: string
                    example: Database does not exist
                  code:
                    type: string
                    example: 0D0DU2
      x-sort-order:
        group: '1'
        order: '1'
  /{db}/icv/{txid}/validate:
    post:
      tags:
      - Integrity Constraints / SHACL
      summary: Validate constraints in transaction
      description: Determine whether or not the given constraints are valid
      operationId: validateInTx
      parameters:
      - name: db
        $ref: '#/components/parameters/db'
      - name: txid
        $ref: '#/components/parameters/txid'
      requestBody:
        $ref: '#/components/requestBodies/ICV_CONSTRAINT'
      responses:
        '200':
          $ref: '#/components/responses/ICV_CONSTRAINT_VALIDATION'
        '404':
          description: Database/Transaction does not exist
          content:
            application/json:
              schema:
                required:
                - message
                - code
                properties:
                  message:
                    type: string
                    example: Database does not exist
                  code:
                    type: string
                    example: 0D0DU2
      x-sort-order:
        group: '1'
        order: '2'
  /{db}/icv/report:
    post:
      tags:
      - Integrity Constraints / SHACL
      summary: SHACL validation report
      description: Produces a SHACL validation report against the specified shape(s)
      externalDocs:
        url: https://www.w3.org/TR/shacl/#validation-report
      operationId: shaclValidationReport
      parameters:
      - name: db
        $ref: '#/components/parameters/db'
      - name: shapes
        in: query
        description: SHACL shapes to validate
        schema:
          type: string
      - name: shacl.shape.graphs
        in: query
        description: SHACL shape graphs to validate
        schema:
          type: string
      - name: nodes
        in: query
        description: SHACL focus node(s) to validate
        schema:
          type: string
      - name: countLimit
        in: query
        description: Maximum number of violations to report
        schema:
          type: string
      - name: shacl.targetClass.simple
        in: query
        schema:
          $ref: '#/components/schemas/SHACL_TARGETCLASS_SIMPLE'
      - name: shacl.violation.limit.shape
        in: query
        description: number of violation limits per SHACL shapes
        schema:
          type: string
      - $ref: '#/components/parameters/graph-uri'
      - $ref: '#/components/parameters/reasoning'
      responses:
        '200':
          $ref: '#/components/responses/SHACL_VALIDATION_REPORT'
        '404':
          description: Database does not exist
          content:
            application/json:
              schema:
                required:
                - message
                - code
                properties:
                  message:
                    type: string
                    example: Database does not exist
                  code:
                    type: string
                    example: 0D0DU2
      x-sort-order:
        group: '3'
        order: '1'
  /{db}/icv/{txid}/report:
    post:
      tags:
      - Integrity Constraints / SHACL
      summary: SHACL validation report in transaction
      description: Produces a SHACL validation report against the specified shape(s)
      externalDocs:
        url: https://www.w3.org/TR/shacl/#validation-report
      operationId: shaclValidationReportInTx
      parameters:
      - name: db
        $ref: '#/components/parameters/db'
      - name: txid
        $ref: '#/components/parameters/txid'
      - name: shapes
        in: query
        description: SHACL shapes to validate
        schema:
          type: string
      - name: shacl.shape.graphs
        in: query
        description: SHACL shape graphs to validate
        schema:
          type: string
      - name: nodes
        in: query
        description: SHACL focus node(s) to validate
        schema:
          type: string
      - name: countLimit
        in: query
        description: Maximum number of violations to report
        schema:
          type: string
      - name: shacl.targetClass.simple
        in: query
        schema:
          $ref: '#/components/schemas/SHACL_TARGETCLASS_SIMPLE'
      - name: shacl.violation.limit.shape
        in: query
        description: number of violation limits per SHACL shapes
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/SHACL_VALIDATION_REPORT'
        '404':
          description: Database/Transaction does not exist
          content:
            application/json:
              schema:
                required:
                - message
                - code
                properties:
                  message:
                    type: string
                    example: Database does not exist
                  code:
                    type: string
                    example: 0D0DU2
      x-sort-order:
        group: '3'
        order: '2'
components:
  schemas:
    SPARQL_RESULTS_JSON:
      required:
      - head
      - results
      properties:
        head:
          required:
          - vars
          properties:
            vars:
              type: array
              items:
                type: string
        results:
          required:
          - bindings
          properties:
            bindings:
              type: array
              items:
                additionalProperties:
                  required:
                  - type
                  - value
                  properties:
                    type:
                      type: string
                      example: literal
                    value:
                      type: string
                      example: '42'
    SHACL_TARGETCLASS_SIMPLE:
      type: boolean
      description: If true, sh:targetClass will be evaluated based on rdf:type triples only, without following rdfs:subClassOf relations
    ICV_VALIDATION:
      required:
      - valid
      properties:
        valid:
          type: boolean
    BOOLEAN:
      type: boolean
    GENERIC_JSONLD:
      properties:
        '@id':
          type: string
          example: urn:example:Entity1
        '@type':
          type: string
          example: urn:example:Entity
        urn:example:hasProp:
          required:
          - '@id'
          type: array
          items:
            required:
            - '@value'
            properties:
              '@type':
                type: string
                example: http://www.w3.org/2001/XMLSchema#integer
              '@value':
                type: string
                example: '42'
  examples:
    SPARQL_RESULTS_XML:
      value: "<?xml version='1.0' encoding='UTF-8'?>\n<sparql xmlns='http://www.w3.org/2005/sparql-results#'>\n    <head>\n        <variable name='s'/>\n        <variable name='label'/>\n    </head>\n    <results>\n        <result>\n            <binding name='s'>\n                <uri>http://example.org/stardog#Example1</uri>\n            </binding>\n            <binding name='label'>\n                <literal>42</literal>\n            </binding>\n        </result>\n        <result>\n            <binding name='s'>\n                <uri>http://example.org/stardog#Example2</uri>\n            </binding>\n            <binding name='label'>\n                <literal>foo</literal>\n            </binding>\n        </result>\n    </results>\n</sparql>"
    SPARQL_RESULTS_CSV:
      value: 's,label

        http://example.org/stardog#Example1,42

        http://example.org/stardog#Example2,foo'
    GENERIC_RDFXML:
      value: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rdf:RDF\n\txmlns=\"http://api.stardog.com/\"\n\txmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n\txmlns:owl=\"http://www.w3.org/2002/07/owl#\"\n\txmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"\n\txmlns:stardog=\"tag:stardog:api:\"\n\txmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\">\n\n<rdf:Description rdf:about=\"urn:example:Entity1\">\n\t<rdf:type rdf:resource=\"urn:example:Entity\"/>\n\t<hasProp xmlns=\"urn:example:\" rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">42</hasProp>\n</rdf:Description>\n\n</rdf:RDF>"
    GENERIC_TURTLE:
      value: "@prefix : <urn:example:> .\n@prefix owl: <http://www.w3.org/2002/07/owl#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix stardog: <tag:stardog:api:> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\n<urn:example:Entity1> a <urn:example:Entity> ;\n\t<urn:example:hasProp> 42 ."
    ICV_CONSTRAINT_TTL:
      value: <urn:Employee> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <urn:Person> .
    SPARQL_RESULTS_TSV:
      value: "?s\t?label\n<http://example.org/stardog#Example1>\t\"42\"\n<http://example.org/stardog#Example2>\t\"foo\""
    GENERIC_TRIG:
      value: "@prefix : <urn:example:> .\n@prefix owl: <http://www.w3.org/2002/07/owl#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix stardog: <tag:stardog:api:> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\n{ \t<urn:example:Entity1> a <urn:example:Entity> ;\n\t\t <urn:example:hasProp> 42 .\n}"
    GENERIC_NQUADS:
      value: '<urn:context> <urn:example:Entity1> a <urn:example:Entity> .

        <urn:context> <urn:example:Entity1> <urn:example:hasProp> 42 .'
    ICV_CONSTRAINT_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    <rdf:Description rdf:about=\"urn:Employee\">\n        <subClassOf xmlns=\"http://www.w3.org/2000/01/rdf-schema#\" rdf:resource=\"urn:Person\"/>\n    </rdf:Description>\n</rdf:RDF>"
    ICV_CONSTRAINT_JSONLD:
      value: "[\n  {\n    \"@id\": \"urn:Employee\",\n    \"http://www.w3.org/2000/01/rdf-schema#subClassOf\": [\n      {\n        \"@id\": \"urn:Person\"\n      }\n    ]\n  }\n]"
    GENERIC_NTRIPLES:
      value: '<urn:example:Entity1> a <urn:example:Entity> .

        <urn:example:Entity1> <urn:example:hasProp> 42 .'
  responses:
    SHACL_VALIDATION_REPORT:
      description: SHACL validation report
      content:
        text/turtle:
          schema:
            type: string
          examples:
            GENERIC_TURTLE:
              value: null
              $ref: '#/components/examples/GENERIC_TURTLE'
        application/trig:
          schema:
            type: string
          examples:
            GENERIC_TRIG:
              value: null
              $ref: '#/components/examples/GENERIC_TRIG'
        application/rdf+xml:
          schema:
            type: string
          examples:
            GENERIC_RDFXML:
              value: null
              $ref: '#/components/examples/GENERIC_RDFXML'
        application/n-triples:
          schema:
            type: string
          examples:
            GENERIC_NTRIPLES:
              value: null
              $ref: '#/components/examples/GENERIC_NTRIPLES'
        application/n-quads:
          schema:
            type: string
          examples:
            GENERIC_NQUADS:
              value: null
              $ref: '#/components/examples/GENERIC_NQUADS'
        application/ld+json:
          schema:
            $ref: '#/components/schemas/GENERIC_JSONLD'
        application/sparql-results+xml:
          schema:
            type: string
          examples:
            SPARQL_RESULTS_XML:
              value: null
              $ref: '#/components/examples/SPARQL_RESULTS_XML'
        application/sparql-results+json:
          schema:
            $ref: '#/components/schemas/SPARQL_RESULTS_JSON'
        text/csv:
          schema:
            type: string
          examples:
            SPARQL_RESULTS_CSV:
              value: null
              $ref: '#/components/examples/SPARQL_RESULTS_CSV'
        text/tsv:
          schema:
            type: string
          examples:
            SPARQL_RESULTS_TSV:
              value: null
              $ref: '#/components/examples/SPARQL_RESULTS_TSV'
    ICV_CONSTRAINT_VALIDATION:
      description: ICV Constraint Validation
      content:
        text/boolean:
          schema:
            $ref: '#/components/schemas/BOOLEAN'
        application/json:
          schema:
            $ref: '#/components/schemas/ICV_VALIDATION'
  parameters:
    txid:
      name: txid
      in: path
      description: Transaction ID
      required: true
      schema:
        type: string
        format: uuid
        example: 4ea1ebac-48f0-459c-a9a7-6cad7189403d
    db:
      name: db
      in: path
      description: Database name
      required: true
      schema:
        type: string
      example: myDb
    reasoning:
      name: reasoning
      in: query
      description: Enable Reasoning
      schema:
        type: boolean
    graph-uri:
      name: graph-uri
      in: query
      description: Named Graph / Context
      required: false
      schema:
        type: string
        format: URI
      example: https://stardog.com/graphs/myGraph
  requestBodies:
    ICV_CONSTRAINT:
      description: The ICV constraint(s)
      content:
        text/turtle:
          schema:
            type: string
          examples:
            ICV_CONSTRAINT_TTL:
              value: null
              $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
        application/trig:
          schema:
            type: string
          examples:
            ICV_CONSTRAINT_TTL:
              value: null
              $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
        application/rdf+xml:
          schema:
            type: string
          examples:
            ICV_CONSTRAINT_RDFXML:
              value: null
              $ref: '#/components/examples/ICV_CONSTRAINT_RDFXML'
        application/n-triples:
          schema:
            type: string
          examples:
            ICV_CONSTRAINT_TTL:
              value: null
              $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
        application/n-quads:
          schema:
            type: string
          examples:
            ICV_CONSTRAINT_TTL:
              value: null
              $ref: '#/components/examples/ICV_CONSTRAINT_TTL'
        application/ld+json:
          schema:
            type: string
          examples:
            ICV_CONSTRAINT_JSONLD:
              value: null
              $ref: '#/components/examples/ICV_CONSTRAINT_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