SmartMind view API
The view API from SmartMind — 2 operation(s) for view.
The view API from SmartMind — 2 operation(s) for view.
openapi: 3.0.2
info:
title: THANOSQL api file view API
description: THANOSQL TEST API documentation
version: '1.0'
tags:
- name: view
paths:
/api/v1/view/:
get:
tags:
- view
summary: Get Views
description: "Gets the paginated list of all the views from the given schema. If no\nschema is provided then the function retreives all of the views from\nall of the schemas. pg_catalog and information_schema related views are\nexempted, unless specified. The API can only return 100 views at a time,\nstarting from the offset number specified.\n\nParameters\n----------\n- schema : str, default None\n The schema to retrieve the views from. If None is\n provided, refers to all schemas.\n- verbose: bool, default False\n Whether to include only base information or verbose information on the views.\n- offset: int, default 0\n The offset position of where to select the views from.\n- limit: int, default 100\n The number of views to retrieve. This value must range from 0 and 100.\n\nReturns\n-------\nA ViewsResponse Pydantic object containing a List of\neither View Pydantic or Base Table Pydantic models depending\non the verbose parameter."
operationId: get_views_api_v1_view__get
parameters:
- required: false
schema:
title: Schema
type: string
name: schema
in: query
- required: false
schema:
title: Verbose
type: boolean
default: false
name: verbose
in: query
- required: false
schema:
title: Offset
type: integer
default: 0
name: offset
in: query
- required: false
schema:
title: Limit
type: integer
default: 100
name: limit
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
/api/v1/view/{view_name}:
get:
tags:
- view
summary: Get View
description: "Gets the View object with the specified view_name and\nschema. If the schema is not specified, it automatically\ndefaults to public.\n\nParameters\n----------\nview_name: str\nschema : str, default public\n The schema to retrieve the views from. If no parameter is\n provided, assigned as public.\n\nReturns\n-------\nA ViewResponse Pydantic object containing a View Pydantic object."
operationId: get_view_api_v1_view__view_name__get
parameters:
- required: true
schema:
title: View Name
type: string
name: view_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ViewResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
delete:
tags:
- view
summary: Delete View
description: "Deletes the view specified by view_name and schema.\n\nParameters\n----------\n- view_name: str\n- schema : str, default \"public\"\n The schema to delete the view from. If no parameter is\n provided, defaults to \"public\".\n\nReturns\n-------\nA ViewMessage Pydantic object containing a success message and the view_name."
operationId: delete_view_api_v1_view__view_name__delete
parameters:
- required: true
schema:
title: View Name
type: string
name: view_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ViewMessageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
components:
schemas:
ViewResponse:
title: ViewResponse
required:
- view
type: object
properties:
view:
$ref: '#/components/schemas/View'
ViewMessageResponse:
title: ViewMessageResponse
required:
- message
- view_name
type: object
properties:
message:
title: Message
type: string
view_name:
title: View Name
type: string
Column:
title: Column
required:
- type
- name
type: object
properties:
id:
title: Id
type: integer
default:
title: Default
type: string
is_nullable:
title: Is Nullable
type: boolean
default: true
type:
title: Type
type: string
name:
title: Name
type: string
View:
title: View
required:
- definition
type: object
properties:
name:
title: Name
type: string
schema:
title: Schema
type: string
columns:
title: Columns
type: array
items:
$ref: '#/components/schemas/Column'
definition:
title: Definition
type: string
ValidationError:
title: ValidationError
required:
- loc
- msg
- type
type: object
properties:
loc:
title: Location
type: array
items:
anyOf:
- type: string
- type: integer
msg:
title: Message
type: string
type:
title: Error Type
type: string
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
securitySchemes:
Bearer Auth:
type: apiKey
in: header
name: Authorization
description: 'Enter: **''Bearer <JWT>''**, where JWT is the access token. Example: Bearer access_token_comes_here'