openapi: 3.0.3 info: title: TriplyDB Accounts Services API version: 26.5.104 description: "REST API for TriplyDB — a linked data database platform.\n\n## Authentication\n\nRead operations on publicly published datasets can be performed without\nauthentication. Write operations and read operations on private or internal\ndatasets require a valid API token.\n\n### Creating an API token\n\n1. Log into your TriplyDB instance.\n2. Click on the user menu in the top-right corner and click on \"User settings\".\n3. Go to the \"API tokens\" tab.\n4. Click \"Create token\", enter a description (e.g., \"my-script\") and select\n the appropriate access rights.\n5. Click \"Create\" and copy the token. It is only shown once upon creation.\n\n### Using the API token\n\nInclude the token in the `Authorization` header of your HTTP requests:\n\n```\nAuthorization: Bearer YOUR_TOKEN\n```\n\n### Security considerations\n\n- **Do not commit tokens to git repositories.**\n- **Do not share tokens** with anyone who should not have access to your\n TriplyDB resources.\n- **Rotate tokens regularly**, especially if you suspect a compromise.\n\n## Pagination\n\nList endpoints are paginated. The response includes a `Link` header\n([RFC 8288](https://www.rfc-editor.org/rfc/rfc8288)) with URLs for\nnavigating the result set. To paginate, follow the URLs in the `Link`\nheader rather than constructing URLs manually.\n\nThe `Link` header contains up to three relations:\n\n| Relation | Meaning |\n|----------|---------|\n| `first` | URL to the first page of results |\n| `next` | URL to the next page (absent when on the last page) |\n| `prev` | URL to the previous page (absent when on the first page) |\n\nExample response header:\n\n```\nLink: ; rel=\"first\",\n ; rel=\"next\"\n```\n\nTo iterate through all results, keep following the `rel=\"next\"` URL until\nit is no longer present. You can control the page size with the `limit`\nquery parameter (default: 30).\n\n## Content negotiation\n\nLinked data endpoints support format negotiation in two ways:\n\n1. **Accept header** — set the `Accept` request header to the desired media type.\n2. **URL extension** — append a format extension to the URL path (e.g., `/run.csv`).\n When present, the extension takes precedence over the `Accept` header.\n" contact: name: Triply url: https://triply.cc servers: - url: https://api.lod.uba.uva.nl description: This instance security: - bearerAuth: [] - {} tags: - name: Services description: Triple store service management paths: /datasets/{account}/{dataset}/services: parameters: - $ref: '#/components/parameters/account' - $ref: '#/components/parameters/dataset' get: tags: - Services summary: List services operationId: listServices security: - {} responses: '200': description: Service list content: application/json: schema: type: array items: $ref: '#/components/schemas/ServiceMetadata' post: tags: - Services summary: Create a service operationId: createService requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateService' responses: '201': description: Service created content: application/json: schema: $ref: '#/components/schemas/ServiceMetadata' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /datasets/{account}/{dataset}/services/{serviceName}: parameters: - $ref: '#/components/parameters/account' - $ref: '#/components/parameters/dataset' - $ref: '#/components/parameters/serviceName' get: tags: - Services summary: Get service details operationId: getService security: - {} responses: '200': description: Service metadata content: application/json: schema: $ref: '#/components/schemas/ServiceMetadata' '404': $ref: '#/components/responses/NotFound' post: tags: - Services summary: Perform a service action (start, sync, restart) operationId: serviceAction requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ServiceActions' responses: '200': description: Updated service content: application/json: schema: $ref: '#/components/schemas/ServiceMetadata' '401': $ref: '#/components/responses/Unauthorized' patch: tags: - Services summary: Update a service operationId: updateService requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateService' responses: '200': description: Updated service content: application/json: schema: $ref: '#/components/schemas/ServiceMetadata' '401': $ref: '#/components/responses/Unauthorized' delete: tags: - Services summary: Delete a service operationId: deleteService responses: '204': description: Service deleted '401': $ref: '#/components/responses/Unauthorized' /datasets/{account}/{dataset}/services/{serviceName}/graphs: parameters: - $ref: '#/components/parameters/account' - $ref: '#/components/parameters/dataset' - $ref: '#/components/parameters/serviceName' get: tags: - Services summary: List service graphs operationId: listServiceGraphs security: - {} parameters: - name: page in: query schema: type: integer minimum: 1 responses: '200': description: Service graphs content: application/json: schema: type: array items: $ref: '#/components/schemas/ServiceGraphInfo' components: schemas: Capability: type: string enum: - sparql - sparqlApi - elasticSearch LoadStatus: type: string enum: - loaded - loading - error - notLoaded ServiceGraphInfo: type: object required: - graphName - status - statements properties: graphName: type: string status: $ref: '#/components/schemas/LoadStatus' statements: type: integer error: type: string UpdateService: type: object properties: name: type: string ServiceStatus: type: string enum: - starting - running - stopping - stopped - removing - updating - error ServiceConfig: type: object description: 'Service-specific configuration. For Jena services, set `reasonerType`. For Elasticsearch services, set `indexTemplates` and/or `componentTemplates`. ' properties: reasonerType: $ref: '#/components/schemas/JenaReasoner' indexTemplates: type: array description: Elasticsearch index templates items: type: object properties: name: type: string index_patterns: type: string componentTemplates: type: array description: Elasticsearch component templates (mappings, settings) items: type: object properties: name: type: string template: type: object properties: mappings: type: object settings: type: object ErrorResponse: type: object required: - message properties: message: type: string example: Resource not found. code: type: integer example: 404 errors: type: array items: $ref: '#/components/schemas/ErrorResponse' ServiceMetadata: type: object required: - type - name - id - status - capabilities - createdAt properties: type: $ref: '#/components/schemas/ServiceType' version: type: string readOnly: true capabilities: type: array readOnly: true items: $ref: '#/components/schemas/Capability' name: type: string example: sparql id: type: string readOnly: true example: 64a1b2c3d4e5f6001234567a numberOfLoadedStatements: type: integer readOnly: true numberOfLoadedGraphs: type: integer readOnly: true numberOfGraphs: type: integer readOnly: true numberOfGraphErrors: type: integer readOnly: true error: readOnly: true allOf: - $ref: '#/components/schemas/ErrorResponse' status: readOnly: true allOf: - $ref: '#/components/schemas/ServiceStatus' endpoint: type: string readOnly: true outOfSync: type: boolean readOnly: true loadedAt: type: string format: date-time readOnly: true createdAt: type: string format: date-time readOnly: true config: $ref: '#/components/schemas/ServiceConfig' CreateService: type: object required: - name - type properties: name: type: string type: $ref: '#/components/schemas/ServiceType' config: $ref: '#/components/schemas/ServiceConfig' ServiceActions: type: object properties: start: type: boolean sync: type: boolean restart: type: boolean JenaReasoner: type: string enum: - OWL - RDFS - None ServiceType: type: string enum: - elasticSearch - virtuoso - jena responses: NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' Forbidden: description: Insufficient permissions content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' Unauthorized: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' parameters: account: name: account in: path required: true description: Account name (user or group) schema: type: string serviceName: name: serviceName in: path required: true description: Service name schema: type: string dataset: name: dataset in: path required: true description: Dataset name schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT