Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose/dds over http #3

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
build
.vscode
135 changes: 135 additions & 0 deletions source/dds-http.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
openapi: '3.0.2'
info:
title: DDS over HTTP
version: '1.0.0'
description: Defines bare minimum requirements for exchanging
servers:
- url: http://localhost

components:
responses:
'500':
description: This will be returned on server error. It is up to the client to decide how to try connecting again.
'503':
description: Inform clients that the system is shutting down or other-wise not ready yet.
headers:
retry-after:
description: When to try connecting again. Sending this header to clients is optional.
required: false
schema:
type: string
schemas:
criteria:
type: object
properties:
medium-id-mask:
type: string
description: Regular expression to identify what transport medium messages to include
since:
type: string
until:
type: string
dcpMessage:
type: object
properties:
receiveTime:
type: string
format: date-time
dataSource:
$ref: "#/components/schemas/dataSource"
data:
description: Base64 encoded version of the data. May be text or binary. Messages should
be processed based on the type
type: string
format: byte
dcpMessages:
type: object
properties:
total:
type: integer
description: Number of messages contained in this result
messages:
type: array
items:
$ref: '#/components/schemas/dcpMessage'
dataSource:
description: Source of data that this system retrieves messages from.
A given source has a name and type and may provide additional properties as appropriate.
type: object
properties:
name:
type: string
type:
$ref: "#/components/schemas/dataSourceType"
required:
- name
- type
additionalProperties: true
knownSourceTypes:
type: string
enum: ["GOES", "Iridium", "Network Dcp", "HRIT", "DRGS", "LRGS", "NOAPORT", "WEB"]
customSourceType:
type: string
dataSourceType:
description: An LRGS generally processes data from specific known sources; however it is possible
for a given installation to retrieve data from custom sources.
oneOf:
- $ref: '#/components/schemas/knownSourceTypes'
- $ref: '#/components/schemas/customSourceType'

paths:
/dds/data/next:
get:
summary: Retrieve DCS data
parameters:
- name: criteria
in: query
description: Name of previously provided criteria to use
required: false
schema:
type: string
description: Alphanumeric string given when the criteria was provided to the server.
responses:
'200':
description: Response includes any data available.
content:
application/json:
schema:
$ref: '#/components/schemas/dcpMessages'
'204':
description: No new data available, request again.
'500':
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
description: Retrieve message for the given, or all if none provided, criteria. This uses HTTP long-polling. After 9 seconds, if no new data is available from the server a 204 Response is sent to the client to indicate the client should connect again to wait for more data.
/dds/data/search:
post:
summary: Provide criteria for limiting data returned.
description: Allows the client to inform the system exactly which data should be returned.
responses:
'201':
description: "Successfully stored."
'400':
description: "Provided criteria is invalid."
'500':
$ref: '#/components/responses/500'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/criteria'
/dds/sources:
get:
summary: Provide information about data sources available from this instance
description: Allow client to know what data sources are available
responses:
'200':
description: Sources successfully sent to user
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/dataSource"