mirror of
https://github.com/sartography/uva-covid19-testing-communicator.git
synced 2025-02-23 12:28:26 +00:00
198 lines
5.9 KiB
YAML
198 lines
5.9 KiB
YAML
openapi: "3.0.2"
|
|
info:
|
|
version: 1.0.0
|
|
title: Workflow Microservice
|
|
license:
|
|
name: MIT
|
|
servers:
|
|
- url: http://localhost:5000/v1.0
|
|
paths:
|
|
/status:
|
|
get:
|
|
operationId: communicator.api.admin.status
|
|
summary: provides a basic status endpoint, just get things off the ground.
|
|
security: [] # Disable security for this endpoint only.
|
|
responses:
|
|
'200':
|
|
description: Status indicator that the app is up and alive.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Status"
|
|
/update_data:
|
|
get:
|
|
operationId: communicator.api.admin.update_data
|
|
summary: Checks the local file system and firecloud for data and loads it into the db.
|
|
security: [] # Disable security for this endpoint only.
|
|
responses:
|
|
'200':
|
|
description: Status indicator that the app is up and alive.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
/merge_similar_records:
|
|
get:
|
|
operationId: communicator.api.admin.merge_similar_records
|
|
summary: Checks the local file system and firecloud for data and loads it into the db.
|
|
security: [] # Disable security for this endpoint only.
|
|
responses:
|
|
'200':
|
|
description: Status indicator that the app is up and alive.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
/split_location_column:
|
|
get:
|
|
operationId: communicator.api.admin.split_location_column
|
|
summary: Checks the local file system and firecloud for data and loads it into the db.
|
|
security: [] # Disable security for this endpoint only.
|
|
responses:
|
|
'200':
|
|
description: Status indicator that the app is up and alive.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
/update_and_notify:
|
|
get:
|
|
operationId: communicator.api.admin.update_and_notify
|
|
summary: Does everything, updates data from IVY, and sends out all notifications.
|
|
security: [] # Disable security for this endpoint only.
|
|
responses:
|
|
'200':
|
|
description: Just returns a 200 if it was successful.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
/notify_by_email:
|
|
get:
|
|
parameters:
|
|
- in: query
|
|
name: file_name
|
|
schema:
|
|
type: string
|
|
description: An optional file name, only records from this ivy file will be notified.
|
|
- in: query
|
|
name: retry
|
|
schema:
|
|
type: boolean
|
|
description: If set to true, will attept to resend previous failures.
|
|
operationId: communicator.api.admin.notify_by_email
|
|
summary: when called, reviews all samples, and sends out any pending email notifications.
|
|
security: [] # Disable security for this endpoint only.
|
|
responses:
|
|
'200':
|
|
description: Just returns a 200 if it was successful.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
/notify_by_text:
|
|
get:
|
|
parameters:
|
|
- in: query
|
|
name: file_name
|
|
schema:
|
|
type: string
|
|
description: An optional file name, only records from this ivy file will be notified.
|
|
- in: query
|
|
name: retry
|
|
schema:
|
|
type: boolean
|
|
description: If set to true, will attept to resend previous failures.
|
|
operationId: communicator.api.admin.notify_by_text
|
|
summary: when called, reviews all samples, and sends out any pending SMS notifications.
|
|
security: [] # Disable security for this endpoint only.
|
|
responses:
|
|
'200':
|
|
description: Just returns a 200 if it was successful.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
/sample:
|
|
post:
|
|
operationId: communicator.api.admin.add_sample
|
|
summary: Creates a new sample
|
|
tags:
|
|
- Samples
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Sample'
|
|
responses:
|
|
'200':
|
|
description: Sample created successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/Sample"
|
|
delete:
|
|
operationId: communicator.api.admin.clear_samples
|
|
summary: Removes the given samples completely.
|
|
tags:
|
|
- Samples
|
|
responses:
|
|
'204':
|
|
description: All Samples removed.
|
|
get:
|
|
operationId: communicator.api.admin.get_samples
|
|
summary: Returns all the samples, can be restricted by sending a barcode for the last sample received.
|
|
tags:
|
|
- Samples
|
|
security:
|
|
- ApiKeyAuth: []
|
|
parameters:
|
|
- in: query
|
|
name: bar_code
|
|
required: false
|
|
description: Return all samples AFTER this bar code.
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: a list of samples
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/Sample"
|
|
|
|
components:
|
|
securitySchemes:
|
|
ApiKeyAuth:
|
|
type: apiKey
|
|
in: header
|
|
name: X-CR-API-KEY
|
|
x-apikeyInfoFunc: communicator.api.admin.verify_token
|
|
schemas:
|
|
Status:
|
|
properties:
|
|
status:
|
|
type: string
|
|
Sample:
|
|
properties:
|
|
barcode:
|
|
type: string
|
|
example: "000000111-202009091449-4321"
|
|
student_id:
|
|
type: string
|
|
example: "000000111"
|
|
computing_id:
|
|
type: string
|
|
example: "abc2d"
|
|
date:
|
|
type: string
|
|
format: date_time
|
|
example: "2019-12-25T09:12:33.001Z"
|
|
location:
|
|
type: string
|
|
example: "0001"
|