153 lines
4.6 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
/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:
- Studies
responses:
'204':
description: All Samples removed.
components:
schemas:
Status:
properties:
status:
type: string
Sample:
properties:
barcode:
type: string
example: "000000111-202009091449-4321"
student_id:
type: string
example: "000000111"
date:
type: string
format: date_time
example: "2019-12-25T09:12:33.001Z"
location:
type: string
example: "0001"