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

Updated documentation

parent 28dc5574
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 927 additions and 785 deletions
...@@ -48,6 +48,8 @@ paths: ...@@ -48,6 +48,8 @@ paths:
'405': '405':
description: Invalid input description: Invalid input
summary: Determine datatypes summary: Determine datatypes
tags:
- analyse-endpoint
/api/analyse/determinepk: /api/analyse/determinepk:
post: post:
consumes: consumes:
...@@ -76,30 +78,109 @@ paths: ...@@ -76,30 +78,109 @@ paths:
'405': '405':
description: Invalid input description: Invalid input
summary: Determine primary keys 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: /health:
get: get:
consumes: consumes:
- application/json - application/json
description: This is a simple API which checks if the application is healthy description: This is a simple API which checks if the application is healthy
parameters: produces:
- description: to-do description - application/json
in: body responses:
name: body '200':
required: true description: OK
schema: schema:
properties: properties:
status: status:
example: UP example: UP
type: string type: string
type: object type: object
produces:
- application/json
responses:
'200':
description: OK
summary: Check if application is running summary: Check if application is running
tags:
- health-endpoint
servers: servers:
- description: Generated server url - description: Generated server url
url: http://localhost:5000 url: http://localhost:5000
- description: Sandbox - description: Sandbox
url: https://dbrepo2.tuwien.ac.at url: https://test.dbrepo.tuwien.ac.at
This diff is collapsed.
...@@ -14,7 +14,174 @@ info: ...@@ -14,7 +14,174 @@ info:
title: Database Repository Search Service API title: Database Repository Search Service API
version: $TAG version: $TAG
openapi: 3.0.0 openapi: 3.0.0
paths: {} paths:
/api/search:
post:
consumes:
- application/json
description: Performs a fuzzy search
operationId: post_fuzzy_search
parameters:
- in: body
name: body
required: true
schema:
properties:
search_term:
example: air quality
type: string
type: object
produces:
- application/json
responses:
'200':
content:
application/json:
schema:
properties:
results:
items:
type: object
type: array
type: object
description: OK, contains the elements formatted as an array of JSON arrays
summary: Performs a fuzzy search
tags:
- search-endpoint
/api/search/{type}:
post:
consumes:
- application/json
description: Performs a general search
operationId: post_general_search
parameters:
- description: The search type.
in: path
name: type
required: true
schema:
enum:
- database
- table
- view
- column
- user
- identifier
- concept
- unit
type: string
- in: body
name: body
required: true
schema:
properties:
field_value_pairs:
type: object
search_term:
example: air quality
type: string
t1:
example: 0
type: integer
t2:
example: 100
type: integer
type: object
produces:
- application/json
responses:
'200':
content:
application/json:
schema:
properties:
results:
items:
type: object
type: array
type:
description: Same as the requested type
enum:
- database
- table
- view
- column
- user
- identifier
- concept
- unit
type: string
type: object
description: OK, contains the elements formatted as an array of JSON arrays
summary: Performs a general search
tags:
- search-endpoint
/api/search/{type}/fields:
get:
operationId: get_fields
parameters:
- description: The search type.
in: path
name: type
required: true
schema:
enum:
- database
- table
- view
- column
- user
- identifier
- concept
- unit
type: string
responses:
'200':
content:
application/json:
schema:
properties:
results:
items:
properties:
attr_friendly_name:
example: Name
type: string
attr_name:
example: name
type: string
type:
description: OpenSearch data types.
example: string
type: string
type: object
type: array
type: object
description: List of fields
'404':
description: Invalid type.
summary: Get searchable fields
tags:
- search-endpoint
/health:
get:
consumes:
- application/json
description: 'Return UP if the instance is ready to serve connections.
'
produces:
- application/json
responses:
'200':
description: OK, service is up and running
schema:
$ref: '#/definitions/Column'
'404':
description: Service is not yet ready
summary: Return a healthcheck
tags:
- actuator
servers: servers:
- description: Generated server url - description: Generated server url
url: http://localhost:4000 url: http://localhost:4000
......
...@@ -93,18 +93,38 @@ core infrastructure and a single Docker container for all user-generated databas ...@@ -93,18 +93,38 @@ core infrastructure and a single Docker container for all user-generated databas
Install DBRepo with the default configuration from the Debian container: Install DBRepo with the default configuration from the Debian container:
curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/install.sh | bash curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/install.sh | bash
View the logs: View the logs:
docker compose logs -f docker compose logs -f
You should now be able to view the front end at [http://localhost:80](http://localhost:80). You should now be able to view the front end at [http://localhost](http://localhost).
Please be warned that the default configuration is not intended for public deployments. It is only intended to have a Please be warned that the default configuration is not intended for public deployments. It is only intended to have a
running system within minutes to play around within the system and explore features. It is strongly advised to change running system within minutes to play around within the system and explore features. It is strongly advised to change
the default `.env` environment variables. the default `.env` environment variables.
### Troubleshooting
In case the deployment is unsuccessful, we have explanations on their origin and solutions to the most common errors:
**Are you trying to mount a directory onto a file (or vice-versa)?**
: *Origin*: Docker Compose does not find all files referenced in the `volumes` section of your `docker-compose.yml`
file.
: *Solution*: Ensure all mounted files in the `volumes` section of your `docker-compose.yml` exist and have correct
file permissions (`0644`) to be found in the filesystem. Note that paths containing directories may not
work when using Windows instead of the supported Linux.
**The Docker images have been updated but my deployment is not receiving the updates**
: *Origin*: Your local Docker image cache is not up-to-date and needs to fetch the remote changes.
: *Solution*: Update your local Docker image cache by executing `docker compose pull`, it automatically downloads
all Docker images that have updates. Then apply the new images with `docker compose up -d`.
## Security
!!! warning "Known security issues with the default configuration" !!! warning "Known security issues with the default configuration"
The system is auto-configured for a small, local, test deployment and is *not* secure! You need to make modifications The system is auto-configured for a small, local, test deployment and is *not* secure! You need to make modifications
...@@ -142,42 +162,6 @@ the default `.env` environment variables. ...@@ -142,42 +162,6 @@ the default `.env` environment variables.
[simple guide](http://nginx.org/en/docs/http/configuring_https_servers.html) on how to install a SSL/TLS [simple guide](http://nginx.org/en/docs/http/configuring_https_servers.html) on how to install a SSL/TLS
certificate on NGINX. certificate on NGINX.
## Upgrade Guide
### 1.2 to 1.3
In case you have a previous deployment from version 1.2, shut down the containers and back them up manually. You can do
this by using the `busybox` image. Replace `deadbeef` with your container name or hash:
```console
export NAME=dbrepo-userdb-xyz
docker run --rm --volumes-from $NAME -v /home/$USER/backup:/backup busybox tar pcvfz /backup/$NAME.tar.gz /var/lib/mysql
```
!!! danger "Wipe all traces of DBRepo from your system"
To erase all traces of DBRepo from your computer or virtual machine, the following commands delete all containers,
volumes and networks that are present, execute the following **dangerous** command. It will **wipe** all information
about DBRepo from your system (excluding the images).
```console
docker container stop $(docker container ls -aq -f name=^/dbrepo-.*) || true
docker container rm $(docker container ls -aq -f name=^/dbrepo-.*) || true
docker volume rm $(docker volume ls -q -f name=^dbrepo-.*) || true
docker network rm $(docker network ls -q -f name=^dbrepo-.*) || true
```
You can restore the volume *after* downloading the new 1.3 images and creating the infrastructure:
```console
export NAME=dbrepo-userdb-xyz
export PORT=12345
docker container create -h $NAME --name $NAME -p $PORT:3306 -e MARIADB_ROOT_PASSWORD=mariadb --network userdb -v /backup mariadb:10.5
docker run --rm --volumes-from $NAME -v /home/$USER/backup/.tar.gz:/backup/$NAME.tar.gz busybox sh -c 'cd /backup && tar xvfz /backup/$NAME.tar.gz && cp -r /backup/var/lib/mysql/* /var/lib/mysql'
```
Future releases will be backwards compatible and will come with migration scripts.
## Limitations ## Limitations
!!! info "Alternative Deployments" !!! info "Alternative Deployments"
......
...@@ -71,7 +71,7 @@ between 32 - 50 °F"* instead. ...@@ -71,7 +71,7 @@ between 32 - 50 °F"* instead.
## Examples ## Examples
See the [usage page](../usage-search). TBD
## Limitations ## Limitations
......
...@@ -1130,12 +1130,110 @@ A user wants a public database to be private and only give specific users access ...@@ -1130,12 +1130,110 @@ A user wants a public database to be private and only give specific users access
=== "Terminal" === "Terminal"
tbd Obtain an access token:
```bash
curl -sSL \
-X POST \
-d 'username=foo&password=bar&grant_type=password&client_id=dbrepo-client&scope=openid&client_secret=MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG' \
http://localhost/api/auth/realms/dbrepo/protocol/openid-connect/token | jq .access_token
```
!!! note
Please note that the `client_secret` is different for your DBRepo instance. This is a default client secret that
likely has been replaced. Please contact your DBRepo administrator to get the `client_secret` for your instance.
Similar you need to replace `localhost` with your actual DBRepo instance hostname, e.g. `test.dbrepo.tuwien.ac.at`.
To change the visibility of a database where you are the owner (this is the case for self-created databases), send
a request to the HTTP API:
```bash
curl -sSL \
-X PUT \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d '{"is_public":true}' \
http://localhost/api/database/1/visibility
```
To give a user (with id `e9bf38a0-a254-4040-87e3-92e0f09e29c8` access to this database (e.g. read access), update
their access using the HTTP API:
```bash
curl -sSL \
-X POST \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d '{"type":"read"}' \
http://localhost/api/database/1/access/e9bf38a0-a254-4040-87e3-92e0f09e29c8
```
In case the user already has access, use the method `PUT`.
=== "JDBC" === "JDBC"
tbd To change the visibility of a database as administrator with direct JDBC access to
the [Metadata Database](../system-databases-metadata), change the visibility directly by executing the SQL-query
in the `fda` schema:
```sql
UPDATE `fda`.`mdb_databases` SET `is_public` = TRUE;
```
To give a user (with id `e9bf38a0-a254-4040-87e3-92e0f09e29c8` access to this database (e.g. read access), update
their access using the JDBC API:
```sql
INSERT INTO `fda`.`mdb_have_access` (`user_id`, `database_id`, `access_type`)
VALUES ('e9bf38a0-a254-4040-87e3-92e0f09e29c8', 1, 'READ');
```
In case the user already has access, use an `UPDATE` query.
=== "Python" === "Python"
tbd Obtain an access token:
\ No newline at end of file
```python
import requests
response = requests.post("http://localhost/api/auth/realms/dbrepo/protocol/openid-connect/token", json={
"username": "foo",
"password": "bar",
"grant_type": "password",
"client_id": "dbrepo-client",
"scope": "openid",
"client_secret": "MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG"
})
access_token = response.json()["access_token"]
print(access_token)
```
!!! note
Please note that the `client_secret` is different for your DBRepo instance. This is a default client secret that
likely has been replaced. Please contact your DBRepo administrator to get the `client_secret` for your instance.
Similar you need to replace `localhost` with your actual DBRepo instance hostname, e.g. `test.dbrepo.tuwien.ac.at`.
To change the visibility of a database where you are the owner (this is the case for self-created databases), send
a request to the HTTP API:
```python
requests.put("http://localhost/api/database/1/visibility", headers={
"Authorization": "Bearer " + access_token
}, json={
"is_public": True
})
```
To give a user (with id `e9bf38a0-a254-4040-87e3-92e0f09e29c8` access to this database (e.g. read access), update
their access using the HTTP API:
```python
requests.post("http://localhost/api/database/1/access/e9bf38a0-a254-4040-87e3-92e0f09e29c8", headers={
"Authorization": "Bearer " + access_token
}, json={
"type": "read"
})
```
In case the user already has access, use the method `put`.
\ No newline at end of file
...@@ -66,15 +66,9 @@ swagger_config = { ...@@ -66,15 +66,9 @@ swagger_config = {
{ {
"endpoint": "api-analyse", "endpoint": "api-analyse",
"route": "/api-analyse.json", "route": "/api-analyse.json",
"rule_filter": lambda rule: rule.endpoint.startswith("analyze"), "rule_filter": lambda rule: True,
"model_filter": lambda tag: True, # all in "model_filter": lambda tag: True, # all in
}, }
{
"endpoint": "api-mdb",
"route": "/api-mdb.json",
"rule_filter": lambda rule: rule.endpoint.startswith("mdb"),
"model_filter": lambda tag: True, # all in
},
], ],
"static_url_path": "/flasgger_static", "static_url_path": "/flasgger_static",
"swagger_ui": True, "swagger_ui": True,
...@@ -102,7 +96,7 @@ template = { ...@@ -102,7 +96,7 @@ template = {
}, },
"servers": [ "servers": [
{"url": "http://localhost:5000", "description": "Generated server url"}, {"url": "http://localhost:5000", "description": "Generated server url"},
{"url": "https://dbrepo2.tuwien.ac.at", "description": "Sandbox"}, {"url": "https://test.dbrepo.tuwien.ac.at", "description": "Sandbox"},
], ],
} }
...@@ -175,8 +169,9 @@ def determinepk(): ...@@ -175,8 +169,9 @@ def determinepk():
return Response(res, mimetype="application/json"), 500 return Response(res, mimetype="application/json"), 500
@app.route("/api/analyse/determineStats", methods=["POST"], endpoint="analyze_stats") @app.route("/api/analyse/determinestats", methods=["POST"], endpoint="analyse_determinestats")
def determineStats(): @swag_from("as-yml/determine_stats.yml")
def determinestats():
logging.debug( logging.debug(
"endpoint to determine the statistical properties, body = %s", request "endpoint to determine the statistical properties, body = %s", request
) )
...@@ -189,8 +184,9 @@ def determineStats(): ...@@ -189,8 +184,9 @@ def determineStats():
return determine_stats(filepath, separator) return determine_stats(filepath, separator)
@app.route("/api/analyse/determineStat", methods=["POST"]) @app.route("/api/analyse/determinestat", methods=["POST"], endpoint="analyse_determinestat")
def determineStat(): @swag_from("as-yml/determine_stat.yml")
def determinestat():
input_json = request.get_json() input_json = request.get_json()
if "database_id" not in input_json: if "database_id" not in input_json:
......
tags:
- analyse-endpoint
summary: Determine statistics
operationId: determinestat
requestBody:
content:
application/json:
schema:
required:
- database_id
- table_id
type: object
properties:
database_id:
type: "integer"
example: 1
table_id:
type: "integer"
example: 1
responses:
"200":
description: Determined statistics
content:
application/json:
schema:
required:
- message
- status
type: object
properties:
message:
type: "string"
example: "Analysed statistical properties"
status:
type: "integer"
example: "200"
400:
description: "Invalid input"
ontent:
application/json:
schema:
required:
- message
- status
type: object
properties:
message:
type: "string"
example: "Analysed statistical properties"
status:
type: "integer"
example: "200"
tags:
- analyse-endpoint
summary: Determine statistics
operationId: determinestats
requestBody:
content:
application/json:
schema:
required:
- filepath
- separator
type: object
properties:
filepath:
type: "string"
example: "file.csv"
separator:
type: "string"
example: ","
responses:
"200":
description: Determined statistics
"400":
description: "Invalid input"
tags:
- analyse-endpoint
summary: "Determine datatypes" summary: "Determine datatypes"
description: "This is a simple API which returns the datatypes of a (path) csv file" description: "This is a simple API which returns the datatypes of a (path) csv file"
consumes: consumes:
......
tags:
- analyse-endpoint
summary: "Determine primary keys" summary: "Determine primary keys"
description: "This is a simple API which returns the primary keys + ranking of a (path) csv file" description: "This is a simple API which returns the primary keys + ranking of a (path) csv file"
consumes: consumes:
......
tags:
- health-endpoint
summary: "Check if application is running" summary: "Check if application is running"
description: "This is a simple API which checks if the application is healthy" description: "This is a simple API which checks if the application is healthy"
consumes: consumes:
- "application/json" - "application/json"
produces: produces:
- "application/json" - "application/json"
parameters: responses:
- in: "body" 200:
name: "body" description: "OK"
description: "to-do description"
required: true
schema: schema:
type: "object" type: "object"
properties: properties:
status: status:
type: "string" type: "string"
example: "UP" example: "UP"
responses:
200:
description: "OK"
\ No newline at end of file
# Search service # Search Service
🚧 WIP 🚧 ## Actuator
The dbrepo search service is used to enable searching for - Health: http://localhost:5000/api/search/health
entries in the opensearch databse. - Prometheus: http://localhost:5000/metrics
## Running the app ## Swagger UI Endpoints
Test the app locally:
```shell
pipenv install && pipenv run flask run --debug --port 4000
```
## Overview - Swagger UI: http://localhost:5000/swagger-ui/
Here's an overview about the different endpoints available at this service:
(`<index>` has to be one of the following indices:
table, user, database, column, identifier, concept, unit, view)
--- ## OpenAPI Endpoints
`/api/search/<index>` :
returns all entries for a given index
--- - OpenAPI v3 as .json: http://localhost:5000/api-search.json
`/api/search/<index>/fields`: \ No newline at end of file
returns all the fields that are saved in a given entry
---
`/api/search`:
this is the main endpoint for searching entries in the opensearch db.
You can specify a search term, a time period
and certain fields that should match a certain value.
ToDo: Continue
\ No newline at end of file
...@@ -52,7 +52,7 @@ def create_app(config_class=Config): ...@@ -52,7 +52,7 @@ def create_app(config_class=Config):
{ {
"endpoint": "api-search", "endpoint": "api-search",
"route": "/api-search.json", "route": "/api-search.json",
"rule_filter": lambda rule: rule.endpoint.startswith('actuator'), "rule_filter": lambda rule: True,
"model_filter": lambda tag: True, # all in "model_filter": lambda tag: True, # all in
} }
], ],
......
...@@ -52,13 +52,12 @@ def general_filter(index, results): ...@@ -52,13 +52,12 @@ def general_filter(index, results):
@api_bp.route("/health", methods=["GET"], endpoint="actuator_health") @api_bp.route("/health", methods=["GET"], endpoint="actuator_health")
@swag_from("us-yml/get_health") # ToDo: get the SWAG right @swag_from("../../us-yml/get_health.yml")
def health(): def health():
return {"status": "UP"} return {"status": "UP"}
@api_bp.route("/api/search/<string:index>", methods=["GET"], endpoint="search_get_index") @api_bp.route("/api/search/<string:index>", methods=["GET"], endpoint="search_get_index")
@swag_from("us-yml") # ToDo: get the SWAG right
def get_index(index): def get_index(index):
""" """
returns all entries in a specific index returns all entries in a specific index
...@@ -81,6 +80,7 @@ def get_index(index): ...@@ -81,6 +80,7 @@ def get_index(index):
@api_bp.route("/api/search/<string:type>/fields", methods=["GET"], endpoint="search_get_index_fields") @api_bp.route("/api/search/<string:type>/fields", methods=["GET"], endpoint="search_get_index_fields")
@swag_from("../../us-yml/get_fields.yml")
def get_fields(type): def get_fields(type):
""" """
returns a list of attributes of the data for a specific index. returns a list of attributes of the data for a specific index.
...@@ -90,7 +90,7 @@ def get_fields(type): ...@@ -90,7 +90,7 @@ def get_fields(type):
logging.info(f'Searching in index database for type: {type}') logging.info(f'Searching in index database for type: {type}')
if type not in available_types: if type not in available_types:
return { return {
"results": {}, "results": {}, # FIXME this can't be right
}, 404 }, 404
fields = get_fields_for_index(type) fields = get_fields_for_index(type)
logging.debug(f'get fields for type {type} resulted in {len(fields)} field(s)') logging.debug(f'get fields for type {type} resulted in {len(fields)} field(s)')
...@@ -98,6 +98,7 @@ def get_fields(type): ...@@ -98,6 +98,7 @@ def get_fields(type):
@api_bp.route("/api/search", methods=["POST"], endpoint="search_fuzzy_search") @api_bp.route("/api/search", methods=["POST"], endpoint="search_fuzzy_search")
@swag_from("../../us-yml/post_fuzzy_search.yml")
def post_fuzzy_search(): def post_fuzzy_search():
""" """
Main endpoint for fuzzy searching. Main endpoint for fuzzy searching.
...@@ -118,6 +119,7 @@ def post_fuzzy_search(): ...@@ -118,6 +119,7 @@ def post_fuzzy_search():
@api_bp.route("/api/search/<string:type>", methods=["POST"], endpoint="search_general_search") @api_bp.route("/api/search/<string:type>", methods=["POST"], endpoint="search_general_search")
@swag_from("../../us-yml/post_general_search.yml")
def post_general_search(type): def post_general_search(type):
""" """
Main endpoint for fuzzy searching. Main endpoint for fuzzy searching.
......
summary: Return a detailed information about a specific column in the elastic search instance
description: |
Return a detailed information about a specific column in the elastic search instance
consumes:
- application/json
produces:
- application/json
parameters:
- in: "path"
type: "integer"
name: "column_id"
description: "The ID of the column to retrieve further information about"
required: true
definitions:
Column:
type: object
properties:
id:
type: integer
description: The id of the column
name:
type: string
description: The name of the column
internal_name:
type: string
description: The internal name of the column
column_type:
type: string
description: The type of the column
is_public:
type: boolean
description: Whether the column is public or not
is_null_allowed:
type: boolean
description: Whether the column allows null values or not
is_primary_key:
type: boolean
description: Whether the column is a primary key or not
table_id:
type: integer
description: The id of the table the column belongs to
database_id:
type: integer
description: The id of the database the column belongs to
responses:
200:
description: OK, contains the detailed information about the column
schema:
$ref: "#/definitions/Column"
404:
description: No column with such ID exists in the elastic search instance
tags:
- get_column_endpoint
\ No newline at end of file
summary: Return a short information about all columns in the elastic search instance
description: |
Return a short information about all columns in the elastic search instance
consumes:
- application/json
produces:
- application/json
definitions:
Column:
type: object
properties:
id:
type: integer
description: The id of the column
name:
type: string
description: The name of the column
column_type:
type: string
description: The type of the column
responses:
200:
description: OK, contains the elements formatted as a JSON array
schema:
type: array
items:
$ref: '#/definitions/Column'
404:
description: No matching element found, no columns exist in the elastic search instance
tags:
- get_columns_endpoint
\ No newline at end of file
summary: Return a detailed information about a specific database in the elastic search instance
description: |
Return a detailed information about a specific database in the elastic search instance
consumes:
- application/json
produces:
- application/json
parameters:
- in: "path"
type: "integer"
name: "db_id"
description: "The ID of the database to retrieve further information about"
required: true
definitions:
Database:
type: object
properties:
id:
type: integer
description: The id of the database
internal_name:
type: string
description: The internal name of the database
name:
type: string
description: The name of the database
public:
type: boolean
description: Whether the database is public or not
responses:
200:
description: OK, contains the detailed information about the database
schema:
$ref: "#/definitions/Database"
404:
description: No database with such ID exists in the elastic search instance
tags:
- get_database_endpoint
\ No newline at end of file
summary: Return a detailed information about a specific table in the elastic search instance (that is contained in the given database)
description: |
Return a detailed information about a specific table in the elastic search instance (that is contained in the given database)
consumes:
- application/json
produces:
- application/json
parameters:
- in: "path"
type: "integer"
name: "table_id"
description: "The ID of the table to retrieve further information about"
required: true
- in: "path"
type: "integer"
name: "database_id"
description: "The ID of the database to retrieve the tables from"
required: true
definitions:
Table:
type: object
properties:
id:
type: integer
description: The id of the table
name:
type: string
description: The name of the table
internal_name:
type: string
description: The internal name of the table
description:
type: string
description: The description of the table
database_id:
type: integer
description: The id of the database the table belongs to
public:
type: boolean
description: Whether the table is public or not
owner:
type: object
description: The owner of the table
properties:
id:
type: integer
description: The id of the owner
username:
type: string
description: The username of the owner
responses:
200:
description: OK, contains the detailed information about the table (that is contained in the given database)
schema:
$ref: "#/definitions/Table"
404:
description: No table with such ID exists in the elastic search instance for that specific database
tags:
- get_database_table_endpoint
\ No newline at end of file
summary: Return a detailed information about a specific column in the elastic search instance in a specific table in a specific database
description: |
Return a detailed information about a specific column in the elastic search instance in a specific table in a specific database
consumes:
- application/json
produces:
- application/json
parameters:
- in: "path"
type: "integer"
name: "column_id"
description: "The ID of the column to retrieve further information about"
required: true
- in: "path"
type: "integer"
name: "table_id"
description: "The ID of the table to retrieve further information about"
required: true
- in: "path"
type: "integer"
name: "database_id"
description: "The ID of the database to retrieve further information about"
required: true
definitions:
Column:
type: object
properties:
id:
type: integer
description: The id of the column
name:
type: string
description: The name of the column
internal_name:
type: string
description: The internal name of the column
column_type:
type: string
description: The type of the column
is_public:
type: boolean
description: Whether the column is public or not
is_null_allowed:
type: boolean
description: Whether the column allows null values or not
is_primary_key:
type: boolean
description: Whether the column is a primary key or not
table_id:
type: integer
description: The id of the table the column belongs to
database_id:
type: integer
description: The id of the database the column belongs to
responses:
200:
description: OK, contains the detailed information about the column in the elastic search instance (in that table in that database)
schema:
$ref: "#/definitions/Column"
404:
description: No column with such ID exists in the elastic search instance (in that table in that database)
tags:
- get_database_column_endpoint
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment