210 lines
6.4 KiB
YAML
Raw Normal View History

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
/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
/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
/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:
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.
2020-09-17 11:16:41 -04:00
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.
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
/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"