University of Basel API v3 API
The API v3 API from University of Basel — 10 operation(s) for api v3.
The API v3 API from University of Basel — 10 operation(s) for api v3.
openapi: 3.1.0
info:
title: DSP Admin API API v3 API
version: v35.10.0
summary: DSP-API is part of the DaSCH Service Platform, a repository for the long-term preservation and reuse of data in the humanities.
contact:
name: DaSCH
url: https://www.dasch.swiss/
servers:
- url: https://api.dasch.swiss:443
description: The dsp-api server
tags:
- name: API v3
paths:
/v3/projects/{projectIri}/resourcesPerOntology:
get:
tags:
- API v3
description: This endpoint returns all ontologies in a project along with their resource classes and the count of resource instances for each class. Note that the `itemCount` includes only non-deleted resources and it includes resources even if the current user may not be permitted to see some of them, for performance reasons.
operationId: getV3ProjectsProjectiriResourcesperontology
parameters:
- name: projectIri
in: path
description: The IRI of a project. Must be URL-encoded.
required: true
schema:
type: string
example: http://rdfh.ch/projects/0001
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OntologyAndResourceClasses'
example:
- ontology:
iri: http://0.0.0.0:3333/ontology/0001/anything/v2
label: The anything ontology
comment: A sample ontology for anything
classesAndCount:
- resourceClass:
iri: http://0.0.0.0:3333/ontology/0001/anything/v2#ImageThing
representationClass: StillImageRepresentation
label:
- value: Thing with image representation
language: en
comment:
- value: A thing which is has an image
language: en
itemCount: 42
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
project_not_found:
description: 'Example template string for code `project_not_found`:
```
The project ''{id}'' was not found.
```'
value:
message: The project '{id}' was not found.
errors:
- code: project_not_found
message: The project '{id}' was not found.
details:
id: example_id
/v3/export/resources:
post:
tags:
- API v3
description: Export resources to CSV format. Publicly accessible. Requires appropriate object access permissions on the resources.
operationId: postV3ExportResources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExportRequest'
example:
resourceClass: classLink
selectedProperties:
- http://www.knora.org/ontology/knora-base#hasStillImageFileValue
language: en
includeIris: false
includeArkUrls: false
required: true
responses:
'200':
description: ''
headers:
Content-Disposition:
required: true
schema:
type: string
content:
text/csv:
schema:
type: string
format: binary
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
example:
message: Bad request example message
errors: []
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/NotFound'
- $ref: '#/components/schemas/NotFound'
- $ref: '#/components/schemas/NotFound'
examples:
project_not_found:
description: 'Example template string for code `project_not_found`:
```
The project ''{id}'' was not found.
```'
value:
message: The project '{id}' was not found.
errors:
- code: project_not_found
message: The project '{id}' was not found.
details:
id: example_id
ontology_not_found:
description: 'Example template string for code `ontology_not_found`:
```
The ontology ''{id}'' was not found.
```'
value:
message: The ontology '{id}' was not found.
errors:
- code: ontology_not_found
message: The ontology '{id}' was not found.
details:
id: example_id
resourceClass_not_found:
description: 'Example template string for code `resourceClass_not_found`:
```
The resource class ''{id}'' was not found.
```'
value:
message: The resource class '{id}' was not found.
errors:
- code: resourceclass_not_found
message: The resource class '{id}' was not found.
details:
id: example_id
security:
- {}
- httpAuth: []
/v3/export/resources/oai:
post:
tags:
- API v3
description: Export resources to CSV format. Publicly accessible. Requires appropriate object access permissions on the resources.
operationId: postV3ExportResourcesOai
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExportRequestOai'
example:
shortcode: 0803
required: true
responses:
'200':
description: ''
content:
text/plain:
schema:
type: string
'400':
description: 'Invalid value for: body'
content:
text/plain:
schema:
type: string
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
project_not_found:
description: 'Example template string for code `project_not_found`:
```
The project ''{id}'' was not found.
```'
value:
message: The project '{id}' was not found.
errors:
- code: project_not_found
message: The project '{id}' was not found.
details:
id: example_id
security:
- {}
- httpAuth: []
/v3/ontologies/{ontologyIri}/classes/{classIri}/mapping:
put:
tags:
- API v3
description: Adds rdfs:subClassOf triples from the given class to the listed external IRIs. Existing external super-class mappings are not removed - use DELETE first to replace them.
operationId: putV3OntologiesOntologyiriClassesClassiriMapping
parameters:
- name: ontologyIri
in: path
required: true
schema:
type: string
- name: classIri
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddClassMappingsRequest'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ClassMappingResponse'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
example:
message: Bad request example message
errors: []
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
ontology_not_found:
description: 'Example template string for code `ontology_not_found`:
```
The ontology ''{id}'' was not found.
```'
value:
message: The ontology '{id}' was not found.
errors:
- code: ontology_not_found
message: The ontology '{id}' was not found.
details:
id: example_id
class_not_found:
description: 'Example template string for code `class_not_found`:
```
The class ''{id}'' was not found in ontology ''{ontologyIri}''.
```'
value:
message: The class '{id}' was not found in ontology '{ontologyIri}'.
errors:
- code: class_not_found
message: The class '{id}' was not found in ontology '{ontologyIri}'.
details:
id: example_id
ontologyIri: example_ontologyIri
security:
- httpAuth: []
delete:
tags:
- API v3
description: 'Removes a single rdfs:subClassOf triple from the given class to the specified external IRI. Idempotent: deleting an absent triple is a no-op.'
operationId: deleteV3OntologiesOntologyiriClassesClassiriMapping
parameters:
- name: ontologyIri
in: path
required: true
schema:
type: string
- name: classIri
in: path
required: true
schema:
type: string
- name: mapping
in: query
description: The external IRI to remove from rdfs:subClassOf. Must be URL-encoded.
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ClassMappingResponse'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
example:
message: Bad request example message
errors: []
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
ontology_not_found:
description: 'Example template string for code `ontology_not_found`:
```
The ontology ''{id}'' was not found.
```'
value:
message: The ontology '{id}' was not found.
errors:
- code: ontology_not_found
message: The ontology '{id}' was not found.
details:
id: example_id
class_not_found:
description: 'Example template string for code `class_not_found`:
```
The class ''{id}'' was not found in ontology ''{ontologyIri}''.
```'
value:
message: The class '{id}' was not found in ontology '{ontologyIri}'.
errors:
- code: class_not_found
message: The class '{id}' was not found in ontology '{ontologyIri}'.
details:
id: example_id
ontologyIri: example_ontologyIri
security:
- httpAuth: []
/v3/ontologies/{ontologyIri}/properties/{propertyIri}/mapping:
put:
tags:
- API v3
description: Adds rdfs:subPropertyOf triples from the given property to the listed external IRIs. Existing external super-property mappings are not removed - use DELETE first to replace them.
operationId: putV3OntologiesOntologyiriPropertiesPropertyiriMapping
parameters:
- name: ontologyIri
in: path
required: true
schema:
type: string
- name: propertyIri
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddPropertyMappingsRequest'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PropertyMappingResponse'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
example:
message: Bad request example message
errors: []
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
ontology_not_found:
description: 'Example template string for code `ontology_not_found`:
```
The ontology ''{id}'' was not found.
```'
value:
message: The ontology '{id}' was not found.
errors:
- code: ontology_not_found
message: The ontology '{id}' was not found.
details:
id: example_id
property_not_found:
description: 'Example template string for code `property_not_found`:
```
The property ''{id}'' was not found in ontology ''{ontologyIri}''.
```'
value:
message: The property '{id}' was not found in ontology '{ontologyIri}'.
errors:
- code: property_not_found
message: The property '{id}' was not found in ontology '{ontologyIri}'.
details:
id: example_id
ontologyIri: example_ontologyIri
security:
- httpAuth: []
delete:
tags:
- API v3
description: 'Removes a single rdfs:subPropertyOf triple from the given property to the specified external IRI. Idempotent: deleting an absent triple is a no-op.'
operationId: deleteV3OntologiesOntologyiriPropertiesPropertyiriMapping
parameters:
- name: ontologyIri
in: path
required: true
schema:
type: string
- name: propertyIri
in: path
required: true
schema:
type: string
- name: mapping
in: query
description: The external IRI to remove from rdfs:subPropertyOf. Must be URL-encoded.
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PropertyMappingResponse'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
example:
message: Bad request example message
errors: []
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
ontology_not_found:
description: 'Example template string for code `ontology_not_found`:
```
The ontology ''{id}'' was not found.
```'
value:
message: The ontology '{id}' was not found.
errors:
- code: ontology_not_found
message: The ontology '{id}' was not found.
details:
id: example_id
property_not_found:
description: 'Example template string for code `property_not_found`:
```
The property ''{id}'' was not found in ontology ''{ontologyIri}''.
```'
value:
message: The property '{id}' was not found in ontology '{ontologyIri}'.
errors:
- code: property_not_found
message: The property '{id}' was not found in ontology '{ontologyIri}'.
details:
id: example_id
ontologyIri: example_ontologyIri
security:
- httpAuth: []
/v3/projects/{projectIri}/exports:
post:
tags:
- API v3
description: Initiates an export of the project. The export will be performed asynchronously, and the response will contain an export ID that can be used to check the status of the export. An export can only be triggered when no other export exists.
operationId: postV3ProjectsProjectiriExports
parameters:
- name: projectIri
in: path
description: The IRI of a project. Must be URL-encoded.
required: true
schema:
type: string
example: http://rdfh.ch/projects/0001
- name: skipAssets
in: query
description: When true, binary assets are not included in the export.
required: false
schema:
default: false
type: boolean
responses:
'202':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/DataTaskStatusResponse'
'400':
description: 'Invalid value for: query parameter skipAssets'
content:
text/plain:
schema:
type: string
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
project_not_found:
description: 'Example template string for code `project_not_found`:
```
The project ''{id}'' was not found.
```'
value:
message: The project '{id}' was not found.
errors:
- code: project_not_found
message: The project '{id}' was not found.
details:
id: example_id
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
examples:
export_exists:
description: 'Example template string for code `export_exists`:
```
Export ''{id}'' exists for project ''{projectIri}''.
```'
value:
message: Export '{id}' exists for project '{projectIri}'.
errors:
- code: export_exists
message: Export '{id}' exists for project '{projectIri}'.
details:
id: example_id
projectIri: example_projectIri
security:
- httpAuth: []
/v3/projects/{projectIri}/exports/{exportId}:
get:
tags:
- API v3
description: Checks the status of an export. The response will indicate whether the export is still in progress, has completed successfully, or has failed.
operationId: getV3ProjectsProjectiriExportsExportid
parameters:
- name: projectIri
in: path
description: The IRI of a project. Must be URL-encoded.
required: true
schema:
type: string
example: http://rdfh.ch/projects/0001
- name: exportId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/DataTaskStatusResponse'
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
project_not_found:
description: 'Example template string for code `project_not_found`:
```
The project ''{id}'' was not found.
```'
value:
message: The project '{id}' was not found.
errors:
- code: project_not_found
message: The project '{id}' was not found.
details:
id: example_id
export_not_found:
description: 'Example template string for code `export_not_found`:
```
The export ''{id}'' in project ''{projectIri}'' was not found.
```'
value:
message: The export '{id}' in project '{projectIri}' was not found.
errors:
- code: export_not_found
message: The export '{id}' in project '{projectIri}' was not found.
details:
id: example_id
projectIri: example_projectIri
security:
- httpAuth: []
delete:
tags:
- API v3
description: Deletes an export irrevocably. Only exports in state failed or completed can be deleted.
operationId: deleteV3ProjectsProjectiriExportsExportid
parameters:
- name: projectIri
in: path
description: The IRI of a project. Must be URL-encoded.
required: true
schema:
type: string
example: http://rdfh.ch/projects/0001
- name: exportId
in: path
required: true
schema:
type: string
responses:
'204':
description: ''
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
project_not_found:
description: 'Example template string for code `project_not_found`:
```
The project ''{id}'' was not found.
```'
value:
message: The project '{id}' was not found.
errors:
- code: project_not_found
message: The project '{id}' was not found.
details:
id: example_id
export_not_found:
description: 'Example template string for code `export_not_found`:
```
The export ''{id}'' in project ''{projectIri}'' was not found.
```'
value:
message: The export '{id}' in project '{projectIri}' was not found.
errors:
- code: export_not_found
message: The export '{id}' in project '{projectIri}' was not found.
details:
id: example_id
projectIri: example_projectIri
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
examples:
export_in_progress:
description: 'Example template string for code `export_in_progress`:
```
Export ''{id}'' in progress for project ''{projectIri}''.
```'
value:
message: Export '{id}' in progress for project '{projectIri}'.
errors:
- code: export_in_progress
message: Export '{id}' in progress for project '{projectIri}'.
details:
id: example_id
projectIri: example_projectIri
security:
- httpAuth: []
/v3/projects/{projectIri}/exports/{exportId}/download:
get:
tags:
- API v3
description: Download an export. An export can only be downloaded when it has completed successfully. If it is still in progress or has failed, the response will be 409 Conflict.
operationId: getV3ProjectsProjectiriExportsExportidDownload
parameters:
- name: projectIri
in: path
description: The IRI of a project. Must be URL-encoded.
required: true
schema:
type: string
example: http://rdfh.ch/projects/0001
- name: exportId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
headers:
Content-Disposition:
required: true
schema:
type: string
content:
application/zip:
schema:
type: string
format: binary
'401':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
example:
message: Invalid token.
errors: []
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
example:
message: User not active.
errors: []
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
examples:
project_not_found:
description: 'Example template string for code `project_not_found`:
```
The project ''{id}'' was not found.
```'
value:
message: The project '{id}' was not found.
errors:
- code: project_not_found
message: The project '{id}' was not found.
# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/university-of-basel/refs/heads/main/openapi/university-of-basel-api-v3-api-openapi.yml