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

Updates the docs

parent 15b3d8b8
No related branches found
No related tags found
3 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0
Showing
with 2511 additions and 13348 deletions
{"definitions":{},"externalDocs":{"description":"Sourcecode Documentation","url":"https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services"},"info":{"contact":{"email":"andreas.rauber@tuwien.ac.at","name":"Prof. Andreas Rauber"},"description":"Service that analyses data structures","license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"title":"Database Repository Analyse Service API","version":"1.3.0"},"openapi":"3.0.0","paths":{"/api/analyse/determinedt":{"post":{"consumes":["application/json"],"description":"This is a simple API which returns the datatypes of a (path) csv file","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"enum":{"example":true,"type":"boolean"},"enum_tol":{"example":0.1},"filepath":{"example":"/data/testdt08.csv","type":"string"},"separator":{"example":",","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Determine datatypes"}},"/api/analyse/determinepk":{"post":{"consumes":["application/json"],"description":"This is a simple API which returns the primary keys + ranking of a (path) csv file","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"filepath":{"example":"/data/testdt08.csv","type":"string"},"seperator":{"example":",","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Determine primary keys"}},"/health":{"get":{"consumes":["application/json"],"description":"This is a simple API which checks if the application is healthy","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"status":{"example":"UP","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"}},"summary":"Check if application is running"}}},"servers":[{"description":"Generated server url","url":"http://localhost:5000"},{"description":"Sandbox","url":"https://dbrepo2.tuwien.ac.at"}]}
components:
schemas: {}
externalDocs:
description: Sourcecode Documentation
url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
info:
contact:
email: andreas.rauber@tuwien.ac.at
name: Prof. Andreas Rauber
description: Service that analyses data structures
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
title: Database Repository Analyse Service API
version: dbrepo-latest
openapi: 3.0.0
paths:
/api/analyse/determinedt:
post:
consumes:
- application/json
description: This is a simple API which returns the datatypes of a (path) csv
file
parameters:
- description: to-do description
in: body
name: body
required: true
schema:
properties:
enum:
example: true
type: boolean
enum_tol:
example: 0.1
filename:
example: sample.csv
type: string
separator:
example: ','
type: string
type: object
produces:
- application/json
responses:
'200':
description: OK
'405':
description: Invalid input
summary: Determine datatypes
tags:
- analyse-endpoint
/api/analyse/determinepk:
post:
consumes:
- application/json
description: This is a simple API which returns the primary keys + ranking of
a (path) csv file
parameters:
- description: to-do description
in: body
name: body
required: true
schema:
properties:
filepath:
example: /data/testdt08.csv
type: string
seperator:
example: ','
type: string
type: object
produces:
- application/json
responses:
'200':
description: OK
'405':
description: Invalid input
summary: Determine primary keys
tags:
- analyse-endpoint
/api/analyse/determinestat:
post:
operationId: determinestat
requestBody:
content:
application/json:
schema:
properties:
database_id:
example: 1
type: integer
table_id:
example: 1
type: integer
required:
- database_id
- table_id
type: object
responses:
'200':
content:
application/json:
schema:
properties:
message:
example: Analysed statistical properties
type: string
status:
example: '200'
type: integer
required:
- message
- status
type: object
description: Determined statistics
'400':
description: Invalid input
ontent:
application/json:
schema:
properties:
message:
example: Analysed statistical properties
type: string
status:
example: '200'
type: integer
required:
- message
- status
type: object
summary: Determine statistics
tags:
- analyse-endpoint
/api/analyse/determinestats:
post:
operationId: determinestats
requestBody:
content:
application/json:
schema:
properties:
filepath:
example: file.csv
type: string
separator:
example: ','
type: string
required:
- filepath
- separator
type: object
responses:
'200':
description: Determined statistics
'400':
description: Invalid input
summary: Determine statistics
tags:
- analyse-endpoint
/health:
get:
consumes:
- application/json
description: This is a simple API which checks if the application is healthy
parameters:
- description: to-do description
in: body
name: body
required: true
schema:
properties:
status:
example: UP
type: string
type: object
produces:
- application/json
responses:
'200':
description: OK
summary: Check if application is running
tags:
- health-endpoint
servers:
- description: Generated server url
url: http://localhost:5000
- description: Sandbox
url: https://test.dbrepo.tuwien.ac.at
This diff is collapsed.
......@@ -8,7 +8,7 @@ info:
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
version: 1.3.0
version: dbrepo-latest
externalDocs:
description: Sourcecode Documentation
url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
openapi: 3.0.1
info:
title: OpenAPI definition
version: v0
servers:
- url: http://localhost:9050
description: Generated server url
paths: {}
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
This diff is collapsed.
......@@ -12,7 +12,7 @@ info:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
title: Database Repository Search Service API
version: 1.4.0
version: dbrepo-latest
openapi: 3.0.0
paths: {}
servers:
......
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
......@@ -21,7 +21,7 @@ info:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
title: Database Repository Data Database sidecar API
version: 1.4.0
version: dbrepo-latest
openapi: 3.0.0
paths:
/health:
......
This diff is collapsed.
openapi: 3.0.1
openapi: 3.0.0
info:
title: Database Repository Upload Service API
description: Service that manages the uploads
......@@ -8,7 +8,7 @@ info:
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
version: 1.3.0
version: 1.4.9
externalDocs:
description: Sourcecode Documentation
url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
......
This diff is collapsed.
#!/bin/bash
# This script is executed before pushing to the pipeline for the moment.
# @author: Martin Weise
declare -A services
services[5000]=analyse
services[9050]=mirror
services[9093]=data
services[9099]=metadata
function retrieve () {
if [[ "$2" == analyse ]]; then
echo "... retrieve json api from localhost:$1"
wget "http://localhost:$1/api-$2.json" -O "./.docs/.swagger/api-$2.yaml" -q
else
echo "... retrieve yaml api from localhost:$1"
wget "http://localhost:$1/v3/api-docs.yaml" -O "./.docs/.swagger/api-$2.yaml" -q
fi
}
for key in "${!services[@]}"; do
echo "Generating ${services[$key]} API"
retrieve "$key" "${services[$key]}"
done
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment