Skip to content
Snippets Groups Projects
Verified Commit 4d348850 authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch 'master' into dev

parents 5c3a5987 949f5804
Branches
Tags
3 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0
Showing
with 11256 additions and 10 deletions
openapi: 3.0.1
info:
title: Database Repository Container Service API
description: Service that manages the containers
contact:
name: Prof. Andreas Rauber
email: andreas.rauber@tuwien.ac.at
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
version: 1.2.0
externalDocs:
description: Sourcecode Documentation
url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
servers:
- url: http://localhost:9092
description: Generated server url
- url: https://dbrepo2.tuwien.ac.at
description: Sandbox
paths:
/api/image/{id}:
get:
tags:
- image-endpoint
summary: Find some image
operationId: findById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: Found image
content:
application/json:
schema:
$ref: '#/components/schemas/ImageDto'
"404":
description: Image could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
put:
tags:
- image-endpoint
summary: Update some image
operationId: update
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ImageChangeDto'
required: true
responses:
"202":
description: Updated image successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ImageDto'
"404":
description: Image could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
delete:
tags:
- image-endpoint
summary: Delete some image
operationId: delete
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"202":
description: Deleted image successfully
"404":
description: Image could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
/api/container/{id}:
get:
tags:
- container-endpoint
summary: Find some container
operationId: findById_1
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"502":
description: Docker client failed to connect
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"200":
description: Found container
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerDto'
"404":
description: Container image could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
put:
tags:
- container-endpoint
summary: Modify some container
operationId: modify
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerChangeDto'
required: true
responses:
"409":
description: Container is already started/stopped
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"404":
description: Container or user could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"405":
description: Modification of container state is not permitted
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"200":
description: Modified state of container successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerBriefDto'
security:
- bearerAuth: []
delete:
tags:
- container-endpoint
summary: Delete some container
operationId: delete_1
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"410":
description: Container is already removed
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"409":
description: Container is still running
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"202":
description: Deleted container successfully
security:
- bearerAuth: []
/api/image:
get:
tags:
- image-endpoint
summary: Find all images
operationId: findAll
responses:
"200":
description: List images
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ContainerImage'
post:
tags:
- image-endpoint
summary: Create image
operationId: create
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ImageCreateDto'
required: true
responses:
"201":
description: Created image
content:
application/json:
schema:
$ref: '#/components/schemas/ImageDto'
"404":
description: User could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"400":
description: Image specification is invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"502":
description: Docker client failed to connect
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"409":
description: Image already exists
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
/api/container:
get:
tags:
- container-endpoint
summary: Find all containers
operationId: findAll_1
parameters:
- name: limit
in: query
required: false
schema:
type: integer
format: int32
responses:
"200":
description: List containers
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ContainerBriefDto'
post:
tags:
- container-endpoint
summary: Create container
operationId: create_1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerCreateRequestDto'
required: true
responses:
"201":
description: Created a new container
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerBriefDto'
"404":
description: Container image or user could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"409":
description: Container name already exists
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"502":
description: Docker client failed to connect
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
components:
schemas:
ImageChangeDto:
required:
- dialect
- driver_class
- jdbc_method
- registry
type: object
properties:
registry:
type: string
example: docker.io/library
defaultPort:
maximum: 65535
minimum: 1024
type: integer
format: int32
example: 5432
environment:
type: array
items:
$ref: '#/components/schemas/ImageEnvItemDto'
dialect:
type: string
example: Postgres
driver_class:
type: string
example: org.postgresql.Driver
jdbc_method:
type: string
example: postgresql
ImageEnvItemDto:
required:
- iid
- key
- type
type: object
properties:
iid:
type: integer
format: int64
key:
type: string
example: MARIADB_ROOT_PASSWORD
type:
type: string
example: PRIVILEGED_PASSWORD
enum:
- username
- password
- privileged_username
- privileged_password
ImageDateDto:
required:
- database_format
- example
- has_time
- id
- unix_format
type: object
properties:
id:
type: integer
format: int64
example:
type: string
example: 30.01.2022
database_format:
type: string
example: '%d.%c.%Y'
unix_format:
type: string
example: dd.MM.YYYY
has_time:
type: boolean
example: false
created_at:
type: string
format: date-time
ImageDto:
required:
- default_port
- dialect
- driver_class
- id
- jdbc_method
- registry
- repository
- tag
type: object
properties:
id:
type: integer
format: int64
registry:
type: string
example: docker.io/library
repository:
type: string
example: mariadb
tag:
type: string
example: "10.5"
dialect:
type: string
example: org.hibernate.dialect.MariaDBDialect
hash:
type: string
example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e
compiled:
type: string
format: date-time
example: 2021-03-12T15:26:21.678396092Z
size:
type: integer
example: 314295447
driver_class:
type: string
example: org.mariadb.jdbc.Driver
date_formats:
type: array
items:
$ref: '#/components/schemas/ImageDateDto'
jdbc_method:
type: string
example: mariadb
default_port:
type: integer
format: int32
example: 3306
ApiErrorDto:
required:
- code
- message
- status
type: object
properties:
status:
type: string
example: STATUS
enum:
- 100 CONTINUE
- 101 SWITCHING_PROTOCOLS
- 102 PROCESSING
- 103 EARLY_HINTS
- 103 CHECKPOINT
- 200 OK
- 201 CREATED
- 202 ACCEPTED
- 203 NON_AUTHORITATIVE_INFORMATION
- 204 NO_CONTENT
- 205 RESET_CONTENT
- 206 PARTIAL_CONTENT
- 207 MULTI_STATUS
- 208 ALREADY_REPORTED
- 226 IM_USED
- 300 MULTIPLE_CHOICES
- 301 MOVED_PERMANENTLY
- 302 FOUND
- 302 MOVED_TEMPORARILY
- 303 SEE_OTHER
- 304 NOT_MODIFIED
- 305 USE_PROXY
- 307 TEMPORARY_REDIRECT
- 308 PERMANENT_REDIRECT
- 400 BAD_REQUEST
- 401 UNAUTHORIZED
- 402 PAYMENT_REQUIRED
- 403 FORBIDDEN
- 404 NOT_FOUND
- 405 METHOD_NOT_ALLOWED
- 406 NOT_ACCEPTABLE
- 407 PROXY_AUTHENTICATION_REQUIRED
- 408 REQUEST_TIMEOUT
- 409 CONFLICT
- 410 GONE
- 411 LENGTH_REQUIRED
- 412 PRECONDITION_FAILED
- 413 PAYLOAD_TOO_LARGE
- 413 REQUEST_ENTITY_TOO_LARGE
- 414 URI_TOO_LONG
- 414 REQUEST_URI_TOO_LONG
- 415 UNSUPPORTED_MEDIA_TYPE
- 416 REQUESTED_RANGE_NOT_SATISFIABLE
- 417 EXPECTATION_FAILED
- 418 I_AM_A_TEAPOT
- 419 INSUFFICIENT_SPACE_ON_RESOURCE
- 420 METHOD_FAILURE
- 421 DESTINATION_LOCKED
- 422 UNPROCESSABLE_ENTITY
- 423 LOCKED
- 424 FAILED_DEPENDENCY
- 425 TOO_EARLY
- 426 UPGRADE_REQUIRED
- 428 PRECONDITION_REQUIRED
- 429 TOO_MANY_REQUESTS
- 431 REQUEST_HEADER_FIELDS_TOO_LARGE
- 451 UNAVAILABLE_FOR_LEGAL_REASONS
- 500 INTERNAL_SERVER_ERROR
- 501 NOT_IMPLEMENTED
- 502 BAD_GATEWAY
- 503 SERVICE_UNAVAILABLE
- 504 GATEWAY_TIMEOUT
- 505 HTTP_VERSION_NOT_SUPPORTED
- 506 VARIANT_ALSO_NEGOTIATES
- 507 INSUFFICIENT_STORAGE
- 508 LOOP_DETECTED
- 509 BANDWIDTH_LIMIT_EXCEEDED
- 510 NOT_EXTENDED
- 511 NETWORK_AUTHENTICATION_REQUIRED
message:
type: string
example: Error message
code:
type: string
example: error.service.code
ContainerChangeDto:
required:
- action
type: object
properties:
action:
type: string
enum:
- start
- stop
ContainerBriefDto:
required:
- creator
- hash
- id
- internal_name
- name
- running
type: object
properties:
id:
type: integer
format: int64
hash:
type: string
example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50
name:
type: string
example: Air Quality
creator:
$ref: '#/components/schemas/UserBriefDto'
running:
type: boolean
example: true
database:
$ref: '#/components/schemas/DatabaseBriefDto'
created:
type: string
format: date-time
internal_name:
type: string
example: air-quality
CreatorBriefDto:
required:
- firstname
- lastname
type: object
properties:
firstname:
type: string
example: Josiah
lastname:
type: string
example: Carberry
affiliation:
type: string
example: Wesleyan University
DatabaseBriefDto:
required:
- id
- name
- owner
type: object
properties:
id:
type: integer
format: int64
name:
type: string
example: Air Quality
description:
type: string
example: Air Quality in Austria
identifier:
$ref: '#/components/schemas/IdentifierBriefDto'
engine:
type: string
example: mariadb:10.5
owner:
$ref: '#/components/schemas/UserBriefDto'
container:
$ref: '#/components/schemas/ContainerBriefDto'
creator:
$ref: '#/components/schemas/UserBriefDto'
created:
type: string
format: date-time
is_public:
type: boolean
example: true
IdentifierBriefDto:
required:
- container id
- creators
- database id
- id
- publication_year
- title
- type
type: object
properties:
id:
type: integer
format: int64
title:
type: string
example: "Airquality Stephansplatz, Vienna, Austria"
type:
type: string
enum:
- database
- subset
doi:
type: string
example: 10.1038/nphys1170
publisher:
type: string
example: TU Wien
creators:
type: array
items:
$ref: '#/components/schemas/CreatorBriefDto'
container id:
type: integer
format: int64
example: 1
database id:
type: integer
format: int64
example: 1
query id:
type: integer
format: int64
example: 1
publication_year:
type: integer
format: int32
example: 2022
UserBriefDto:
required:
- id
- username
type: object
properties:
id:
type: string
format: uuid
example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4
username:
type: string
description: Only contains lowercase characters
example: jcarberry
name:
type: string
example: Josiah Carberry
orcid:
type: string
example: 0000-0002-1825-0097
given_name:
type: string
example: Josiah
family_name:
type: string
example: Carberry
email_verified:
type: boolean
example: true
ImageCreateDto:
required:
- default_port
- dialect
- driver_class
- jdbc_method
- registry
- repository
- tag
type: object
properties:
registry:
type: string
example: docker.io/library
repository:
type: string
example: mariadb
tag:
type: string
dialect:
type: string
environment:
type: array
items:
$ref: '#/components/schemas/ImageEnvItemDto'
driver_class:
type: string
jdbc_method:
type: string
default_port:
maximum: 65535
minimum: 1024
type: integer
format: int32
ContainerCreateRequestDto:
required:
- name
- repository
- tag
type: object
properties:
name:
type: string
example: Air Quality
repository:
type: string
example: mariadb
tag:
type: string
example: "10.5"
Constraints:
type: object
properties:
uniques:
type: array
items:
$ref: '#/components/schemas/Unique'
foreignKeys:
type: array
items:
$ref: '#/components/schemas/ForeignKey'
checks:
uniqueItems: true
type: array
items:
type: string
Container:
type: object
properties:
id:
type: integer
format: int64
createdBy:
type: string
format: uuid
creator:
$ref: '#/components/schemas/User'
ownedBy:
type: string
format: uuid
owner:
$ref: '#/components/schemas/User'
name:
type: string
internalName:
type: string
hash:
type: string
imageId:
type: integer
format: int64
port:
type: integer
format: int32
database:
$ref: '#/components/schemas/Database'
image:
$ref: '#/components/schemas/ContainerImage'
ipAddress:
type: string
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
ContainerImage:
type: object
properties:
id:
type: integer
format: int64
repository:
type: string
registry:
type: string
tag:
type: string
driverClass:
type: string
dialect:
type: string
jdbcMethod:
type: string
hash:
type: string
compiled:
type: string
format: date-time
size:
type: integer
format: int64
defaultPort:
type: integer
format: int32
environment:
type: array
items:
$ref: '#/components/schemas/ContainerImageEnvironmentItem'
dateFormats:
type: array
items:
$ref: '#/components/schemas/ContainerImageDate'
containers:
type: array
items:
$ref: '#/components/schemas/Container'
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
ContainerImageDate:
type: object
properties:
id:
type: integer
format: int64
iid:
type: integer
format: int64
image:
$ref: '#/components/schemas/ContainerImage'
example:
type: string
hasTime:
type: boolean
databaseFormat:
type: string
unixFormat:
type: string
createdAt:
type: string
format: date-time
ContainerImageEnvironmentItem:
type: object
properties:
id:
type: integer
format: int64
iid:
type: integer
format: int64
key:
type: string
value:
type: string
type:
type: string
enum:
- USERNAME
- PASSWORD
- PRIVILEGED_USERNAME
- PRIVILEGED_PASSWORD
image:
$ref: '#/components/schemas/ContainerImage'
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
Creator:
type: object
properties:
id:
type: integer
format: int64
pid:
type: integer
format: int64
firstname:
type: string
lastname:
type: string
affiliation:
type: string
orcid:
type: string
identifier:
$ref: '#/components/schemas/Identifier'
created:
type: string
format: date-time
creator:
$ref: '#/components/schemas/User'
lastModified:
type: string
format: date-time
Credential:
type: object
properties:
id:
type: string
format: uuid
type:
type: string
userId:
type: string
format: uuid
createdDate:
type: integer
format: int64
secretData:
type: string
credentialData:
type: string
priority:
type: integer
format: int32
user:
$ref: '#/components/schemas/User'
Database:
type: object
properties:
id:
type: integer
format: int64
createdBy:
type: string
format: uuid
creator:
$ref: '#/components/schemas/User'
ownedBy:
type: string
format: uuid
owner:
$ref: '#/components/schemas/User'
container:
$ref: '#/components/schemas/Container'
name:
type: string
internalName:
type: string
exchangeName:
type: string
description:
type: string
contactPerson:
type: string
format: uuid
contact:
$ref: '#/components/schemas/User'
identifier:
$ref: '#/components/schemas/Identifier'
tables:
type: array
items:
$ref: '#/components/schemas/Table'
views:
type: array
items:
$ref: '#/components/schemas/View'
isPublic:
type: boolean
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
ForeignKey:
type: object
properties:
fkid:
type: integer
format: int64
tid:
type: integer
format: int64
tdbid:
type: integer
format: int64
table:
$ref: '#/components/schemas/Table'
rtid:
type: integer
format: int64
rtdbid:
type: integer
format: int64
referencedTable:
$ref: '#/components/schemas/Table'
references:
type: array
items:
$ref: '#/components/schemas/ForeignKeyReference'
onUpdate:
type: string
enum:
- ReferenceType.RESTRICT
- ReferenceType.CASCADE
- ReferenceType.SET_NULL
- ReferenceType.NO_ACTION
- ReferenceType.SET_DEFAULT
onDelete:
type: string
enum:
- ReferenceType.RESTRICT
- ReferenceType.CASCADE
- ReferenceType.SET_NULL
- ReferenceType.NO_ACTION
- ReferenceType.SET_DEFAULT
ForeignKeyReference:
type: object
properties:
id:
type: integer
format: int64
foreignKey:
$ref: '#/components/schemas/ForeignKey'
column:
$ref: '#/components/schemas/TableColumn'
referencedColumn:
$ref: '#/components/schemas/TableColumn'
Identifier:
required:
- publisher
type: object
properties:
id:
type: integer
format: int64
containerId:
type: integer
format: int64
databaseId:
type: integer
format: int64
queryId:
type: integer
format: int64
creator:
$ref: '#/components/schemas/User'
title:
type: string
description:
type: string
publisher:
type: string
language:
type: string
enum:
- LanguageType.AB
- LanguageType.AA
- LanguageType.AF
- LanguageType.AK
- LanguageType.SQ
- LanguageType.AM
- LanguageType.AR
- LanguageType.AN
- LanguageType.HY
- LanguageType.AS
- LanguageType.AV
- LanguageType.AE
- LanguageType.AY
- LanguageType.AZ
- LanguageType.BM
- LanguageType.BA
- LanguageType.EU
- LanguageType.BE
- LanguageType.BN
- LanguageType.BH
- LanguageType.BI
- LanguageType.BS
- LanguageType.BR
- LanguageType.BG
- LanguageType.MY
- LanguageType.CA
- LanguageType.KM
- LanguageType.CH
- LanguageType.CE
- LanguageType.NY
- LanguageType.ZH
- LanguageType.CU
- LanguageType.CV
- LanguageType.KW
- LanguageType.CO
- LanguageType.CR
- LanguageType.HR
- LanguageType.CS
- LanguageType.DA
- LanguageType.DV
- LanguageType.NL
- LanguageType.DZ
- LanguageType.EN
- LanguageType.EO
- LanguageType.ET
- LanguageType.EE
- LanguageType.FO
- LanguageType.FJ
- LanguageType.FI
- LanguageType.FR
- LanguageType.FF
- LanguageType.GD
- LanguageType.GL
- LanguageType.LG
- LanguageType.KA
- LanguageType.DE
- LanguageType.KI
- LanguageType.EL
- LanguageType.KL
- LanguageType.GN
- LanguageType.GU
- LanguageType.HT
- LanguageType.HA
- LanguageType.HE
- LanguageType.HZ
- LanguageType.HI
- LanguageType.HO
- LanguageType.HU
- LanguageType.IS
- LanguageType.IO
- LanguageType.IG
- LanguageType.ID
- LanguageType.IA
- LanguageType.IE
- LanguageType.IU
- LanguageType.IK
- LanguageType.GA
- LanguageType.IT
- LanguageType.JA
- LanguageType.JV
- LanguageType.KN
- LanguageType.KR
- LanguageType.KS
- LanguageType.KK
- LanguageType.RW
- LanguageType.KV
- LanguageType.KG
- LanguageType.KO
- LanguageType.KJ
- LanguageType.KU
- LanguageType.KY
- LanguageType.LO
- LanguageType.LA
- LanguageType.LV
- LanguageType.LB
- LanguageType.LI
- LanguageType.LN
- LanguageType.LT
- LanguageType.LU
- LanguageType.MK
- LanguageType.MG
- LanguageType.MS
- LanguageType.ML
- LanguageType.MT
- LanguageType.GV
- LanguageType.MI
- LanguageType.MR
- LanguageType.MH
- LanguageType.RO
- LanguageType.MN
- LanguageType.NA
- LanguageType.NV
- LanguageType.ND
- LanguageType.NG
- LanguageType.NE
- LanguageType.SE
- LanguageType.NO
- LanguageType.NB
- LanguageType.NN
- LanguageType.II
- LanguageType.OC
- LanguageType.OJ
- LanguageType.OR
- LanguageType.OM
- LanguageType.OS
- LanguageType.PI
- LanguageType.PA
- LanguageType.PS
- LanguageType.FA
- LanguageType.PL
- LanguageType.PT
- LanguageType.QU
- LanguageType.RM
- LanguageType.RN
- LanguageType.RU
- LanguageType.SM
- LanguageType.SG
- LanguageType.SA
- LanguageType.SC
- LanguageType.SR
- LanguageType.SN
- LanguageType.SD
- LanguageType.SI
- LanguageType.SK
- LanguageType.SL
- LanguageType.SO
- LanguageType.ST
- LanguageType.NR
- LanguageType.ES
- LanguageType.SU
- LanguageType.SW
- LanguageType.SS
- LanguageType.SV
- LanguageType.TL
- LanguageType.TY
- LanguageType.TG
- LanguageType.TA
- LanguageType.TT
- LanguageType.TE
- LanguageType.TH
- LanguageType.BO
- LanguageType.TI
- LanguageType.TO
- LanguageType.TS
- LanguageType.TN
- LanguageType.TR
- LanguageType.TK
- LanguageType.TW
- LanguageType.UG
- LanguageType.UK
- LanguageType.UR
- LanguageType.UZ
- LanguageType.VE
- LanguageType.VI
- LanguageType.VO
- LanguageType.WA
- LanguageType.CY
- LanguageType.FY
- LanguageType.WO
- LanguageType.XH
- LanguageType.YI
- LanguageType.YO
- LanguageType.ZA
- LanguageType.ZU
license:
$ref: '#/components/schemas/License'
type:
type: string
enum:
- DATABASE
- SUBSET
query:
type: string
queryNormalized:
type: string
queryHash:
type: string
resultHash:
type: string
execution:
type: string
format: date-time
resultNumber:
type: integer
format: int64
publicationYear:
type: integer
format: int32
publicationMonth:
type: integer
format: int32
publicationDay:
type: integer
format: int32
visibility:
type: string
enum:
- VisibilityType.EVERYONE
- VisibilityType.SELF
database:
$ref: '#/components/schemas/Database'
related:
type: array
items:
$ref: '#/components/schemas/RelatedIdentifier'
doi:
type: string
creators:
type: array
items:
$ref: '#/components/schemas/Creator'
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
License:
type: object
properties:
identifier:
type: string
uri:
type: string
RelatedIdentifier:
type: object
properties:
id:
type: integer
format: int64
iid:
type: integer
format: int64
value:
type: string
type:
type: string
enum:
- DOI
- URL
- URN
- ARK
- arXiv
- bibcode
- EAN13
- EISSN
- Handle
- IGSN
- ISBN
- ISTC
- LISSN
- LSID
- PMID
- PURL
- UPC
- w3id
relation:
type: string
enum:
- IsCitedBy
- Cites
- IsSupplementTo
- IsSupplementedBy
- IsContinuedBy
- Continues
- IsDescribedBy
- Describes
- HasMetadata
- IsMetadataFor
- HasVersion
- IsVersionOf
- IsNewVersionOf
- IsPreviousVersionOf
- IsPartOf
- HasPart
- IsPublishedIn
- IsReferencedBy
- References
- IsDocumentedBy
- Documents
- IsCompiledBy
- Compiles
- IsVariantFormOf
- IsOriginalFormOf
- IsIdenticalTo
- IsReviewedBy
- Reviews
- IsDerivedFrom
- IsSourceOf
- IsRequiredBy
- Requires
- IsObsoletedBy
- Obsoletes
creator:
$ref: '#/components/schemas/User'
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
Role:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
realmId:
type: string
format: uuid
users:
type: array
items:
$ref: '#/components/schemas/User'
Table:
type: object
properties:
id:
type: integer
format: int64
tdbid:
type: integer
format: int64
creator:
$ref: '#/components/schemas/User'
owner:
$ref: '#/components/schemas/User'
name:
type: string
internalName:
type: string
queueName:
type: string
routingKey:
type: string
description:
type: string
database:
$ref: '#/components/schemas/Database'
columns:
type: array
items:
$ref: '#/components/schemas/TableColumn'
constraints:
$ref: '#/components/schemas/Constraints'
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
TableColumn:
type: object
properties:
id:
type: integer
format: int64
tid:
type: integer
format: int64
cdbid:
type: integer
format: int64
dfid:
type: integer
format: int64
dateFormat:
$ref: '#/components/schemas/ContainerImageDate'
table:
$ref: '#/components/schemas/Table'
view:
$ref: '#/components/schemas/View'
creator:
$ref: '#/components/schemas/User'
name:
type: string
autoGenerated:
type: boolean
internalName:
type: string
isPrimaryKey:
type: boolean
indexLength:
type: integer
format: int32
alias:
type: string
columnType:
type: string
enum:
- TableColumnType.ENUM
- TableColumnType.NUMBER
- TableColumnType.DECIMAL
- TableColumnType.STRING
- TableColumnType.TEXT
- TableColumnType.BOOLEAN
- TableColumnType.DATE
- TableColumnType.TIMESTAMP
- TableColumnType.BLOB
length:
type: integer
format: int32
isNullAllowed:
type: boolean
enumValues:
type: array
items:
type: string
ordinalPosition:
type: integer
format: int32
created:
type: string
format: date-time
concept:
$ref: '#/components/schemas/TableColumnConcept'
unit:
$ref: '#/components/schemas/TableColumnUnit'
lastModified:
type: string
format: date-time
TableColumnConcept:
type: object
properties:
uri:
type: string
name:
type: string
description:
type: string
created:
type: string
format: date-time
columns:
type: array
items:
$ref: '#/components/schemas/TableColumn'
TableColumnUnit:
type: object
properties:
uri:
type: string
name:
type: string
description:
type: string
created:
type: string
format: date-time
columns:
type: array
items:
$ref: '#/components/schemas/TableColumn'
Unique:
type: object
properties:
uid:
type: integer
format: int64
tid:
type: integer
format: int64
tdbid:
type: integer
format: int64
table:
$ref: '#/components/schemas/Table'
columns:
type: array
items:
$ref: '#/components/schemas/TableColumn'
User:
type: object
properties:
id:
type: string
format: uuid
username:
type: string
firstname:
type: string
lastname:
type: string
realmId:
type: string
format: uuid
email:
type: string
emailVerified:
type: boolean
enabled:
type: boolean
createdTimestamp:
type: integer
format: int64
databasePassword:
type: string
attributes:
type: array
items:
$ref: '#/components/schemas/UserAttribute'
credentials:
type: array
items:
$ref: '#/components/schemas/Credential'
containers:
type: array
items:
$ref: '#/components/schemas/Container'
databases:
type: array
items:
$ref: '#/components/schemas/Database'
identifiers:
type: array
items:
$ref: '#/components/schemas/Identifier'
roles:
type: array
items:
$ref: '#/components/schemas/Role'
tables:
type: array
items:
$ref: '#/components/schemas/Table'
UserAttribute:
type: object
properties:
id:
type: string
format: uuid
userId:
type: string
format: uuid
name:
type: string
value:
type: string
user:
$ref: '#/components/schemas/User'
View:
type: object
properties:
id:
type: integer
format: int64
vcid:
type: integer
format: int64
vdbid:
type: integer
format: int64
createdBy:
type: string
format: uuid
creator:
$ref: '#/components/schemas/User'
database:
$ref: '#/components/schemas/Database'
name:
type: string
internalName:
type: string
isPublic:
type: boolean
isInitialView:
type: boolean
query:
type: string
columns:
type: array
items:
$ref: '#/components/schemas/TableColumn'
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
ColumnBriefDto:
required:
- column_type
- database_id
- id
- internal_name
- name
- table_id
type: object
properties:
id:
type: integer
format: int64
name:
type: string
example: date
database_id:
type: integer
format: int64
table_id:
type: integer
format: int64
internal_name:
type: string
example: mdb_date
column_type:
type: string
example: date
enum:
- enum
- number
- decimal
- string
- text
- boolean
- date
- timestamp
- blob
ContainerDto:
required:
- created
- hash
- id
- internal_name
- name
- running
type: object
properties:
id:
type: integer
format: int64
hash:
type: string
example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50
name:
type: string
example: Air Quality
state:
type: string
example: running
enum:
- created
- restarting
- running
- paused
- exited
- dead
database:
$ref: '#/components/schemas/DatabaseDto'
running:
type: boolean
example: true
image:
$ref: '#/components/schemas/ImageBriefDto'
port:
type: integer
format: int32
owner:
$ref: '#/components/schemas/UserBriefDto'
created:
type: string
format: date-time
example: 2021-03-12T15:26:21.678396092Z
internal_name:
type: string
example: air-quality
ip_address:
type: string
CreatorDto:
required:
- firstname
- id
- lastname
type: object
properties:
id:
type: integer
format: int64
firstname:
type: string
example: Josiah
lastname:
type: string
example: Carberry
affiliation:
type: string
example: Wesleyan University
orcid:
type: string
example: 0000-0002-1825-0097
DatabaseAccessDto:
required:
- type
- user
type: object
properties:
user:
$ref: '#/components/schemas/UserDto'
type:
type: string
enum:
- read
- write_own
- write_all
created:
type: string
format: date-time
DatabaseDto:
required:
- creator
- exchange_name
- id
- internal_name
- name
- owner
type: object
properties:
id:
type: integer
format: int64
name:
type: string
example: Air Quality
identifier:
$ref: '#/components/schemas/IdentifierDto'
description:
type: string
example: Weather Australia 2009-2021
tables:
type: array
items:
$ref: '#/components/schemas/TableBriefDto'
views:
type: array
items:
$ref: '#/components/schemas/ViewBriefDto'
image:
$ref: '#/components/schemas/ImageDto'
container:
$ref: '#/components/schemas/ContainerDto'
accesses:
type: array
items:
$ref: '#/components/schemas/DatabaseAccessDto'
creator:
$ref: '#/components/schemas/UserBriefDto'
owner:
$ref: '#/components/schemas/UserBriefDto'
created:
type: string
format: date-time
exchange_name:
type: string
example: dbrepo/air_quality
internal_name:
type: string
example: weather_australia
is_public:
type: boolean
example: true
IdentifierDto:
required:
- container id
- creators
- database id
- execution
- publication_year
- query
- query_hash
- query_normalized
- result_hash
- result_number
- title
- type
- visibility
type: object
properties:
id:
type: integer
format: int64
type:
type: string
enum:
- database
- subset
title:
type: string
example: "Airquality Stephansplatz, Vienna, Austria"
description:
type: string
example: "Air quality reports at Stephansplatz, Vienna"
query:
type: string
example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\
\ = \"09:STEF\""
execution:
type: string
format: date-time
visibility:
type: string
example: everyone
enum:
- everyone
- self
doi:
type: string
example: 10.1038/nphys1170
publisher:
type: string
example: TU Wien
language:
type: string
enum:
- ab
- aa
- af
- ak
- sq
- am
- ar
- an
- hy
- as
- av
- ae
- ay
- az
- bm
- ba
- eu
- be
- bn
- bh
- bi
- bs
- br
- bg
- my
- ca
- km
- ch
- ce
- ny
- zh
- cu
- cv
- kw
- co
- cr
- hr
- cs
- da
- dv
- nl
- dz
- en
- eo
- et
- ee
- fo
- fj
- fi
- fr
- ff
- gd
- gl
- lg
- ka
- de
- ki
- el
- kl
- gn
- gu
- ht
- ha
- he
- hz
- hi
- ho
- hu
- is
- io
- ig
- id
- ia
- ie
- iu
- ik
- ga
- it
- ja
- jv
- kn
- kr
- ks
- kk
- rw
- kv
- kg
- ko
- kj
- ku
- ky
- lo
- la
- lv
- lb
- li
- ln
- lt
- lu
- mk
- mg
- ms
- ml
- mt
- gv
- mi
- mr
- mh
- ro
- mn
- na
- nv
- nd
- ng
- ne
- se
- "no"
- nb
- nn
- ii
- oc
- oj
- or
- om
- os
- pi
- pa
- ps
- fa
- pl
- pt
- qu
- rm
- rn
- ru
- sm
- sg
- sa
- sc
- sr
- sn
- sd
- si
- sk
- sl
- so
- st
- nr
- es
- su
- sw
- ss
- sv
- tl
- ty
- tg
- ta
- tt
- te
- th
- bo
- ti
- to
- ts
- tn
- tr
- tk
- tw
- ug
- uk
- ur
- uz
- ve
- vi
- vo
- wa
- cy
- fy
- wo
- xh
- yi
- yo
- za
- zu
license:
$ref: '#/components/schemas/LicenseDto'
creators:
type: array
items:
$ref: '#/components/schemas/CreatorDto'
created:
type: string
format: date-time
container id:
type: integer
format: int64
example: 1
database id:
type: integer
format: int64
example: 1
query id:
type: integer
format: int64
example: 1
query_normalized:
type: string
example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\
\ = \"09:STEF\""
related:
type: array
items:
$ref: '#/components/schemas/RelatedIdentifierDto'
query_hash:
type: string
description: query hash in sha512
result_hash:
type: string
result_number:
type: integer
format: int64
example: 1
publication_day:
type: integer
format: int32
example: 15
publication_month:
type: integer
format: int32
example: 12
publication_year:
type: integer
format: int32
example: 2022
last_modified:
type: string
format: date-time
ImageBriefDto:
required:
- id
- registry
- repository
- tag
type: object
properties:
id:
type: integer
format: int64
registry:
type: string
example: docker.io/library
repository:
type: string
example: mariadb
tag:
type: string
example: "10.5"
LicenseDto:
required:
- identifier
- uri
type: object
properties:
identifier:
type: string
example: MIT
uri:
type: string
example: https://opensource.org/licenses/MIT
RelatedIdentifierDto:
required:
- created
- id
- value
type: object
properties:
id:
type: integer
format: int64
value:
type: string
example: 10.70124/dc4zh-9ce78
type:
type: string
example: DOI
enum:
- DOI
- URL
- URN
- ARK
- arXiv
- bibcode
- EAN13
- EISSN
- Handle
- IGSN
- ISBN
- ISTC
- LISSN
- LSID
- PMID
- PURL
- UPC
- w3id
relation:
type: string
example: Cites
enum:
- IsCitedBy
- Cites
- IsSupplementTo
- IsSupplementedBy
- IsContinuedBy
- Continues
- IsDescribedBy
- Describes
- HasMetadata
- IsMetadataFor
- HasVersion
- IsVersionOf
- IsNewVersionOf
- IsPreviousVersionOf
- IsPartOf
- HasPart
- IsPublishedIn
- IsReferencedBy
- References
- IsDocumentedBy
- Documents
- IsCompiledBy
- Compiles
- IsVariantFormOf
- IsOriginalFormOf
- IsIdenticalTo
- IsReviewedBy
- Reviews
- IsDerivedFrom
- IsSourceOf
- IsRequiredBy
- Requires
- IsObsoletedBy
- Obsoletes
created:
type: string
format: date-time
last_modified:
type: string
format: date-time
TableBriefDto:
required:
- columns
- description
- id
- internal_name
- name
- owner
type: object
properties:
id:
type: integer
format: int64
name:
type: string
example: Air Quality
description:
type: string
example: Air Quality in Austria
owner:
$ref: '#/components/schemas/UserBriefDto'
columns:
type: array
items:
$ref: '#/components/schemas/ColumnBriefDto'
internal_name:
type: string
example: air_quality
UserAttributeDto:
type: object
properties:
name:
type: string
example: theme_dark
value:
type: string
example: "true"
UserDto:
required:
- email
- email_verified
- id
- username
type: object
properties:
id:
type: string
format: uuid
example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4
username:
type: string
description: Only contains lowercase characters
example: jcarberry
name:
type: string
example: Josiah Carberry
orcid:
type: string
example: 0000-0002-1825-0097
attributes:
type: array
items:
$ref: '#/components/schemas/UserAttributeDto'
containers:
type: array
items:
$ref: '#/components/schemas/ContainerDto'
databases:
type: array
items:
$ref: '#/components/schemas/ContainerDto'
identifiers:
type: array
items:
$ref: '#/components/schemas/ContainerDto'
email:
type: string
example: jcarberry@brown.edu
given_name:
type: string
example: Josiah
family_name:
type: string
example: Carberry
email_verified:
type: boolean
example: true
ViewBriefDto:
required:
- created
- creator
- id
- internal_name
- name
- query
- vdbid
type: object
properties:
id:
type: integer
format: int64
vdbid:
type: integer
format: int64
name:
type: string
example: Air Quality
query:
type: string
example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC
created:
type: string
format: date-time
creator:
$ref: '#/components/schemas/UserDto'
internal_name:
type: string
example: air_quality
is_public:
type: boolean
example: true
initial_view:
type: boolean
description: True if it is the default view for the database
example: true
last_modified:
type: string
format: date-time
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
openapi: 3.0.1
info:
title: Database Repository Semantic Service API
description: Service that manages the tables
contact:
name: Prof. Andreas Rauber
email: andreas.rauber@tuwien.ac.at
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
version: 1.2.0
externalDocs:
description: Sourcecode Documentation
url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
servers:
- url: http://localhost:9097
description: Generated server url
- url: https://dbrepo2.tuwien.ac.at
description: Sandbox
paths:
/api/semantic/ontology/{id}:
get:
tags:
- ontology-endpoint
summary: Find one ontology
operationId: find
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: Find one ontology
content:
application/json:
schema:
$ref: '#/components/schemas/OntologyDto'
"404":
description: Could not find ontology
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
put:
tags:
- ontology-endpoint
summary: Update an ontology
operationId: update
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OntologyModifyDto'
required: true
responses:
"202":
description: Updated ontology successfully
content:
application/json:
schema:
$ref: '#/components/schemas/OntologyDto'
"404":
description: Could not find ontology
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
delete:
tags:
- ontology-endpoint
summary: Delete an ontology
operationId: delete
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"202":
description: Deleted ontology successfully
content:
application/json: {}
"404":
description: Could not find ontology
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
/api/semantic/unit:
get:
tags:
- semantics-endpoint
summary: List semantic units
operationId: findAllUnits
responses:
"200":
description: Find all semantic units
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UnitDto'
post:
tags:
- semantics-endpoint
summary: Save a semantic unit
operationId: saveUnit
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UnitSaveDto'
required: true
responses:
"202":
description: Saved a semantic unit
content:
application/json:
schema:
$ref: '#/components/schemas/UnitDto'
security:
- bearerAuth: []
/api/semantic/ontology:
get:
tags:
- ontology-endpoint
summary: List all ontologies
operationId: findAll
responses:
"200":
description: List all ontologies
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OntologyDto'
post:
tags:
- ontology-endpoint
summary: Register a new ontology
operationId: create
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OntologyCreateDto'
required: true
responses:
"201":
description: Registered ontology successfully
content:
application/json:
schema:
$ref: '#/components/schemas/OntologyDto'
security:
- bearerAuth: []
/api/semantic/concept:
get:
tags:
- semantics-endpoint
summary: List semantic concepts
operationId: findAllConcepts
responses:
"200":
description: Find all semantic concepts
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ConceptDto'
post:
tags:
- semantics-endpoint
summary: Create or update a semantic concept
operationId: saveUnit_1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConceptSaveDto'
required: true
responses:
"202":
description: Saved a semantic concept
content:
application/json:
schema:
$ref: '#/components/schemas/ConceptDto'
security:
- bearerAuth: []
/api/semantic/ontology/{id}/entity:
get:
tags:
- query-endpoint
summary: Find entities
operationId: find_1
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
- name: label
in: query
required: false
schema:
type: string
- name: uri
in: query
required: false
schema:
type: string
responses:
"200":
description: Found entities
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/EntityDto'
"417":
description: Generated query or uri is malformed
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"404":
description: Could not find ontology
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"400":
description: Filter params are invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
/api/semantic/database/{databaseId}/table/{tableId}:
get:
tags:
- table-endpoint
summary: Suggest table semantics
operationId: analyseTable
parameters:
- name: databaseId
in: path
required: true
schema:
type: integer
format: int64
- name: tableId
in: path
required: true
schema:
type: integer
format: int64
responses:
"417":
description: Generated query is malformed
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"404":
description: Could not find the table
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"200":
description: Suggested table semantics successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TableColumnEntityDto'
security:
- bearerAuth: []
/api/semantic/database/{databaseId}/table/{tableId}/column/{columnId}:
get:
tags:
- table-endpoint
summary: Suggest table column semantics
operationId: analyseTableColumn
parameters:
- name: databaseId
in: path
required: true
schema:
type: integer
format: int64
- name: tableId
in: path
required: true
schema:
type: integer
format: int64
- name: columnId
in: path
required: true
schema:
type: integer
format: int64
responses:
"417":
description: Generated query is malformed
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
"200":
description: Suggested table column semantics successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TableColumnEntityDto'
"404":
description: Could not find the table column
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorDto'
security:
- bearerAuth: []
components:
schemas:
OntologyModifyDto:
required:
- prefix
- uri
type: object
properties:
uri:
type: string
example: Ontology URI
prefix:
type: string
example: Ontology prefix
sparql_endpoint:
type: string
example: Ontology SPARQL endpoint
OntologyDto:
required:
- created
- id
- prefix
- rdf
- sparql
- uri
type: object
properties:
id:
type: integer
format: int64
uri:
type: string
example: Ontology URI
prefix:
type: string
example: Ontology prefix
sparql:
type: boolean
example: true
rdf:
type: boolean
example: true
creator:
$ref: '#/components/schemas/UserBriefDto'
created:
type: string
format: date-time
example: 2021-03-12T15:26:21.678396092Z
sparql_endpoint:
type: string
example: Ontology SPARQL endpoint
UserBriefDto:
required:
- id
- username
type: object
properties:
id:
type: string
format: uuid
example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4
username:
type: string
description: Only contains lowercase characters
example: jcarberry
name:
type: string
example: Josiah Carberry
orcid:
type: string
example: 0000-0002-1825-0097
given_name:
type: string
example: Josiah
family_name:
type: string
example: Carberry
email_verified:
type: boolean
example: true
ApiErrorDto:
required:
- code
- message
- status
type: object
properties:
status:
type: string
example: STATUS
enum:
- 100 CONTINUE
- 101 SWITCHING_PROTOCOLS
- 102 PROCESSING
- 103 EARLY_HINTS
- 103 CHECKPOINT
- 200 OK
- 201 CREATED
- 202 ACCEPTED
- 203 NON_AUTHORITATIVE_INFORMATION
- 204 NO_CONTENT
- 205 RESET_CONTENT
- 206 PARTIAL_CONTENT
- 207 MULTI_STATUS
- 208 ALREADY_REPORTED
- 226 IM_USED
- 300 MULTIPLE_CHOICES
- 301 MOVED_PERMANENTLY
- 302 FOUND
- 302 MOVED_TEMPORARILY
- 303 SEE_OTHER
- 304 NOT_MODIFIED
- 305 USE_PROXY
- 307 TEMPORARY_REDIRECT
- 308 PERMANENT_REDIRECT
- 400 BAD_REQUEST
- 401 UNAUTHORIZED
- 402 PAYMENT_REQUIRED
- 403 FORBIDDEN
- 404 NOT_FOUND
- 405 METHOD_NOT_ALLOWED
- 406 NOT_ACCEPTABLE
- 407 PROXY_AUTHENTICATION_REQUIRED
- 408 REQUEST_TIMEOUT
- 409 CONFLICT
- 410 GONE
- 411 LENGTH_REQUIRED
- 412 PRECONDITION_FAILED
- 413 PAYLOAD_TOO_LARGE
- 413 REQUEST_ENTITY_TOO_LARGE
- 414 URI_TOO_LONG
- 414 REQUEST_URI_TOO_LONG
- 415 UNSUPPORTED_MEDIA_TYPE
- 416 REQUESTED_RANGE_NOT_SATISFIABLE
- 417 EXPECTATION_FAILED
- 418 I_AM_A_TEAPOT
- 419 INSUFFICIENT_SPACE_ON_RESOURCE
- 420 METHOD_FAILURE
- 421 DESTINATION_LOCKED
- 422 UNPROCESSABLE_ENTITY
- 423 LOCKED
- 424 FAILED_DEPENDENCY
- 425 TOO_EARLY
- 426 UPGRADE_REQUIRED
- 428 PRECONDITION_REQUIRED
- 429 TOO_MANY_REQUESTS
- 431 REQUEST_HEADER_FIELDS_TOO_LARGE
- 451 UNAVAILABLE_FOR_LEGAL_REASONS
- 500 INTERNAL_SERVER_ERROR
- 501 NOT_IMPLEMENTED
- 502 BAD_GATEWAY
- 503 SERVICE_UNAVAILABLE
- 504 GATEWAY_TIMEOUT
- 505 HTTP_VERSION_NOT_SUPPORTED
- 506 VARIANT_ALSO_NEGOTIATES
- 507 INSUFFICIENT_STORAGE
- 508 LOOP_DETECTED
- 509 BANDWIDTH_LIMIT_EXCEEDED
- 510 NOT_EXTENDED
- 511 NETWORK_AUTHENTICATION_REQUIRED
message:
type: string
example: Error message
code:
type: string
example: error.service.code
UnitSaveDto:
required:
- description
- name
- uri
type: object
properties:
uri:
type: string
name:
type: string
description:
type: string
ColumnBriefDto:
required:
- column_type
- database_id
- id
- internal_name
- name
- table_id
type: object
properties:
id:
type: integer
format: int64
name:
type: string
example: date
database_id:
type: integer
format: int64
table_id:
type: integer
format: int64
internal_name:
type: string
example: mdb_date
column_type:
type: string
example: date
enum:
- enum
- number
- decimal
- string
- text
- boolean
- date
- timestamp
- blob
UnitDto:
required:
- columns
- created
- uri
type: object
properties:
uri:
type: string
name:
type: string
description:
type: string
created:
type: string
format: date-time
columns:
type: array
items:
$ref: '#/components/schemas/ColumnBriefDto'
OntologyCreateDto:
required:
- prefix
- uri
type: object
properties:
uri:
type: string
example: Ontology URI
prefix:
type: string
example: Ontology prefix
sparql_endpoint:
type: string
example: Ontology SPARQL endpoint
ConceptSaveDto:
required:
- description
- name
- uri
type: object
properties:
uri:
type: string
name:
type: string
description:
type: string
ConceptDto:
required:
- columns
- created
- uri
type: object
properties:
uri:
type: string
name:
type: string
description:
type: string
created:
type: string
format: date-time
columns:
type: array
items:
$ref: '#/components/schemas/ColumnBriefDto'
EntityDto:
required:
- label
- uri
type: object
properties:
uri:
type: string
example: https://www.wikidata.org/entity/Q1686799
label:
type: string
example: Apache Jena
description:
type: string
example: open source semantic web framework for Java
TableColumnEntityDto:
required:
- columnId
- databaseId
- tableId
- uri
type: object
properties:
databaseId:
type: integer
format: int64
example: 1
tableId:
type: integer
format: int64
example: 1
columnId:
type: integer
format: int64
example: 1
uri:
type: string
example: https://www.wikidata.org/entity/Q1686799
label:
type: string
example: Apache Jena
description:
type: string
example: open source semantic web framework for Java
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
This diff is collapsed.
This diff is collapsed.
---
author: Martin Weise
hide:
- navigation
---
# Customization
!!! info "Abstract"
On this page, we showcase the customization capabilities of DBRepo to e.g. whitelabel your deployment.
## Custom Title
The default title is "Database Repository" and can be replaced by changing the `TITLE` environment variable.
## Custom Logo
The default placeholder logo consists of the two universities that developed this software. You can replace it by
mounting your own logo with a volume.
```console
docker run -v /path/to/your_logo.png:/logo.png ...
```
In case your logo is not in PNG format, you need to change the environment variable `LOGO` accordingly, e.g. for a logo
in JPEG format, set `LOGO: "/logo.JPEG"` in the `.env` file and start the container with a volume.
```console
docker run -v /path/to/your_logo.JPEG:/logo.JPEG ...
```
<figure markdown>
![](images/custom_logo.png)
<figcaption>Custom logo which replaces the default placeholder logo</figcaption>
</figure>
## Custom Icon
The default placeholder icon can be replaced by mounting your own icon with a volume.
```console
docker run -v /path/to/your_logo.ico:/favicon.ico ...
```
<figure markdown>
![](images/custom_icon.png)
<figcaption>Custom icon which replaces the default placeholder icon</figcaption>
</figure>
In case your icon is not in ICO format, you need to change the environment variable `ICON` accordingly, e.g. for an icon
in GIF format, set `ICON: "/favicon.GIF"` in the `.env` file and start the container with a volume.
```console
docker run -v /path/to/favicon.GIF:/favicon.GIF ...
```
---
author: Martin Weise
hide:
- navigation
---
# Deployment
!!! info "Abstract"
We modified some services and exchanged them with reviewed, open-source implementations that extend the functionality
even more from version 1.2 onwards. On this page, some of the configuration possible is summarized.
## Authentication Service
## Broker Service
### Authentication
The RabbitMQ client can be authenticated through plain (username, password) and OAuth2 mechanisms. Note that the access
token already contains a field `client_id=foo`, so the username is optional in `PlainCredentials()`.
=== "Plain"
``` py
import pika
credentials = pika.credentials.PlainCredentials("foo", "bar")
parameters = pika.ConnectionParameters('localhost', 5672, '/', credentials)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.queue_declare(queue='test', durable=True)
channel.basic_publish(exchange='',
routing_key='test',
body=b'Hello World!')
print(" [x] Sent 'Hello World!'")
connection.close()
```
=== "OAuth2"
``` py
import pika
credentials = pika.credentials.PlainCredentials("", "THE_ACCESS_TOKEN")
parameters = pika.ConnectionParameters('localhost', 5672, '/', credentials)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.queue_declare(queue='test', durable=True)
channel.basic_publish(exchange='',
routing_key='test',
body=b'Hello World!')
print(" [x] Sent 'Hello World!'")
connection.close()
```
## Identifier Service
From version 1.2 onwards there are two modes for the Identifier Service:
1. Persistent Identifier (PID)
2. Digital Object Identifier (DOI)
By default, the URI mode is used, creating a PID for databases or subsets. If starting the Identifier Service in DOI mode,
a DOI is minted for persistent identification of databases or subsets. Using the DOI system is entirely *optional* and
should not be done for test-deployments.
<figure markdown>
![](images/identifier-doi.png)
<figcaption>Minting a test-DOI for a subset</figcaption>
</figure>
## Gateway Service
From version 1.2 onwards we use both HTTP and HTTPS to serve the API, especially for the Authentication Service. The Discovery
Service lists both the non-secure and secure ports.
This diff is collapsed.
.docs/images/architecture.png

112 KiB

...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Redirect Notice</title> <title>Redirect Notice</title>
<meta http-equiv="Refresh" content="0; url='https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.3/'" /> <meta http-equiv="Refresh" content="0; url='https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4/'" />
</head> </head>
<body> <body>
<h1>Redirect Notice</h1> <h1>Redirect Notice</h1>
<p> <p>
This page should automatically open the documentation for version 1.3. In case this page does not load the site is This page should automatically open the documentation for version 1.4. In case this page does not load the site is
available at: available at:
</p> </p>
<p> <p>
<a href="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.3/">https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.3/</a> <a href="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4/">https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4/</a>
</p> </p>
</body> </body>
</html> </html>
mkdocs==1.4.3
mkdocs-material==9.1.17
mkdocs-with-pdf==0.9.3
mkdocs-material-extensions>=1.0.3
requests>=2.27.0
py-dotenv>=0.1
python-dotenv==1.0.0
...@@ -8,7 +8,7 @@ author: Martin Weise ...@@ -8,7 +8,7 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/search-db:latest`](https://hub.docker.com/r/dbrepo/search-db) Image: [`dbrepo/search-db:1.4`](https://hub.docker.com/r/dbrepo/search-db)
* Ports: 9200/tcp * Ports: 9200/tcp
* Indexes: `http://:9200/_all` * Indexes: `http://:9200/_all`
......
...@@ -8,7 +8,7 @@ author: Martin Weise ...@@ -8,7 +8,7 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/ui:latest`](https://hub.docker.com/r/dbrepo/ui) Image: [`dbrepo/ui:1.4`](https://hub.docker.com/r/dbrepo/ui)
* Ports: 3000/tcp, 9100/tcp * Ports: 3000/tcp, 9100/tcp
* Prometheus: `http://:9100/metrics` * Prometheus: `http://:9100/metrics`
......
...@@ -8,7 +8,7 @@ author: Martin Weise ...@@ -8,7 +8,7 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/analyse-service:latest`](https://hub.docker.com/r/dbrepo/analyse-service) Image: [`dbrepo/analyse-service:1.4`](https://hub.docker.com/r/dbrepo/analyse-service)
* Ports: 5000/tcp * Ports: 5000/tcp
* Prometheus: `http://<hostname>:5000/metrics` * Prometheus: `http://<hostname>:5000/metrics`
......
...@@ -8,7 +8,7 @@ author: Martin Weise ...@@ -8,7 +8,7 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/authentication-service:latest`](https://hub.docker.com/r/dbrepo/authentication-service) Image: [`dbrepo/authentication-service:1.4`](https://hub.docker.com/r/dbrepo/authentication-service)
* Ports: 8080/tcp * Ports: 8080/tcp
* Admin Console: `http://<hostname>:8080/api/auth/admin/` * Admin Console: `http://<hostname>:8080/api/auth/admin/`
......
...@@ -8,7 +8,7 @@ author: Martin Weise ...@@ -8,7 +8,7 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/data-service:latest`](https://hub.docker.com/r/dbrepo/data-service) Image: [`dbrepo/data-service:1.4`](https://hub.docker.com/r/dbrepo/data-service)
* Ports: 9093/tcp * Ports: 9093/tcp
* Info: `http://<hostname>:9093/actuator/info` * Info: `http://<hostname>:9093/actuator/info`
......
...@@ -8,7 +8,7 @@ author: Martin Weise ...@@ -8,7 +8,7 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/metadata-service:latest`](https://hub.docker.com/r/dbrepo/metadata-service) Image: [`dbrepo/metadata-service:1.4`](https://hub.docker.com/r/dbrepo/metadata-service)
* Ports: 9099/tcp * Ports: 9099/tcp
* Info: `http://9093:9099/actuator/info` * Info: `http://9093:9099/actuator/info`
......
...@@ -8,7 +8,7 @@ author: Martin Weise ...@@ -8,7 +8,7 @@ author: Martin Weise
!!! debug "Debug Information" !!! debug "Debug Information"
Image: [`dbrepo/mirror-service:latest`](https://hub.docker.com/r/dbrepo/mirror-service) Image: [`dbrepo/mirror-service:1.4`](https://hub.docker.com/r/dbrepo/mirror-service)
* Ports: 9050/tcp * Ports: 9050/tcp
* Info: `http://<hostname>:9050/actuator/info` * Info: `http://<hostname>:9050/actuator/info`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment