2020-09-10 11:28:58 -04:00
|
|
|
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"
|
2020-09-17 11:16:41 -04:00
|
|
|
/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
|
2020-10-07 12:58:44 -04:00
|
|
|
/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
|
2020-12-30 09:06:46 -05:00
|
|
|
/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
|
2021-01-07 16:59:36 -05:00
|
|
|
/correct_computing_id:
|
|
|
|
get:
|
|
|
|
operationId: communicator.api.admin.correct_computing_id
|
|
|
|
summary: Correct the computing ids if they are missing by trying to pull it from emails.
|
|
|
|
security: [] # Disable security for this endpoint only.
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Task completed successfully.
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
schema:
|
|
|
|
type: string
|
2020-10-13 16:13:41 -04:00
|
|
|
/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
|
2020-09-17 11:16:41 -04:00
|
|
|
/notify_by_email:
|
|
|
|
get:
|
2020-10-15 15:29:40 -04:00
|
|
|
parameters:
|
|
|
|
- in: query
|
|
|
|
name: file_name
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
description: An optional file name, only records from this ivy file will be notified.
|
2020-10-17 15:56:47 -04:00
|
|
|
- in: query
|
|
|
|
name: retry
|
|
|
|
schema:
|
|
|
|
type: boolean
|
|
|
|
description: If set to true, will attept to resend previous failures.
|
2020-09-17 11:16:41 -04:00
|
|
|
operationId: communicator.api.admin.notify_by_email
|
2020-10-13 16:13:41 -04:00
|
|
|
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:
|
2020-10-15 15:31:28 -04:00
|
|
|
parameters:
|
|
|
|
- in: query
|
|
|
|
name: file_name
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
description: An optional file name, only records from this ivy file will be notified.
|
2020-10-17 15:56:47 -04:00
|
|
|
- in: query
|
|
|
|
name: retry
|
|
|
|
schema:
|
|
|
|
type: boolean
|
|
|
|
description: If set to true, will attept to resend previous failures.
|
2020-10-13 16:13:41 -04:00
|
|
|
operationId: communicator.api.admin.notify_by_text
|
|
|
|
summary: when called, reviews all samples, and sends out any pending SMS notifications.
|
2020-09-17 11:16:41 -04:00
|
|
|
security: [] # Disable security for this endpoint only.
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Just returns a 200 if it was successful.
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
schema:
|
|
|
|
type: string
|
2020-09-23 12:43:58 -04:00
|
|
|
/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"
|
2020-09-23 15:24:09 -04:00
|
|
|
delete:
|
|
|
|
operationId: communicator.api.admin.clear_samples
|
|
|
|
summary: Removes the given samples completely.
|
|
|
|
tags:
|
2020-12-16 11:51:36 -05:00
|
|
|
- Samples
|
2020-09-23 15:24:09 -04:00
|
|
|
responses:
|
|
|
|
'204':
|
|
|
|
description: All Samples removed.
|
2020-12-16 11:51:36 -05:00
|
|
|
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
|
2021-01-08 17:26:25 -05:00
|
|
|
name: last_modified
|
2020-12-16 11:51:36 -05:00
|
|
|
required: false
|
2021-01-08 17:26:25 -05:00
|
|
|
description: Return all samples modified AFTER the given date, provided as an ISO string (ex '2021-01-01T01:01:00')
|
2020-12-16 11:51:36 -05:00
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: a list of samples
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/Sample"
|
|
|
|
|
2020-09-10 11:28:58 -04:00
|
|
|
components:
|
2020-12-16 11:51:36 -05:00
|
|
|
securitySchemes:
|
|
|
|
ApiKeyAuth:
|
|
|
|
type: apiKey
|
|
|
|
in: header
|
|
|
|
name: X-CR-API-KEY
|
|
|
|
x-apikeyInfoFunc: communicator.api.admin.verify_token
|
2020-09-10 11:28:58 -04:00
|
|
|
schemas:
|
|
|
|
Status:
|
|
|
|
properties:
|
|
|
|
status:
|
2020-09-23 12:43:58 -04:00
|
|
|
type: string
|
|
|
|
Sample:
|
|
|
|
properties:
|
|
|
|
barcode:
|
|
|
|
type: string
|
|
|
|
example: "000000111-202009091449-4321"
|
|
|
|
student_id:
|
|
|
|
type: string
|
|
|
|
example: "000000111"
|
2020-12-16 10:12:01 -05:00
|
|
|
computing_id:
|
|
|
|
type: string
|
|
|
|
example: "abc2d"
|
2020-09-23 12:43:58 -04:00
|
|
|
date:
|
|
|
|
type: string
|
|
|
|
format: date_time
|
|
|
|
example: "2019-12-25T09:12:33.001Z"
|
|
|
|
location:
|
|
|
|
type: string
|
|
|
|
example: "0001"
|