-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adding API definition for v0.2.0 #4
base: master
Are you sure you want to change the base?
Conversation
description: URL Endpoint used for dev/test | ||
|
||
paths: | ||
/cenreport: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we version the endpoints? Like /v1/cenreport
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe for versions 0.x, the endpoints can be found at the base URL. Once we increment the major version starting from 1, we can add base paths v1, v2, etc.
schema: | ||
type: object | ||
properties: | ||
reportId: # Suggestion: Why is this being passed by the client? Better to be auto-generated by server? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 to not passing in and having server generate. Would want to return the reportId
in the server response I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I think. But maybe I don't understand the purpose of this identifier. Sourabh mentioned this would not be a mandatory field. Let's wait for his input on this.
api_definition/coepi_0.2.0.yml
Outdated
items: | ||
$ref: '#/components/schemas/CenKey' | ||
minItems: 1 | ||
maxItems: 10 # TODO: Discuss appropriate value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC we were estimating based off of 1k contacts a day? For 14 days? So maybe 2000 or something? Or 10000?
description: Unexpected Error | ||
|
||
|
||
/cenreport/{cenkey}: # Suggestion: Should we allow passing a list of CEN keys to reduce roundtrips ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, the client would get reports for CENs generated since a client cached checkpoint timestamp right? To populate the exposure alerts UI.
Should be fairly straightforward to make this a batch endpoint right? Just GET /cenreport
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the goal here is to retrieve all cen reports for a timestamp range, as per the documentation.
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Report' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is made batch, would Report
need a circular reference to the CEN it was from? Or would this need to become a map of CEN -> Report(s)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter approach sounds cleaner.
|
||
/cenkeys/{timestamp}: | ||
get: | ||
summary: Returns all cenKeys generated between the range [timestamp - 3600, timestamp) # TBD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would this be called for?
This directory consists of CoEpi API model definitions in Open API specification. Each definition file describes the specific version of the API in format coepi_.yml. The model definition can be used to test the API calls or edit the models using swagger editor. It can also be used to auto-generate client and server SDKs.