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

Adding API definition for v0.2.0 #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ramnanib2
Copy link

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.

description: URL Endpoint used for dev/test

paths:
/cenreport:

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?

Copy link
Author

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?

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

Copy link
Author

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.

items:
$ref: '#/components/schemas/CenKey'
minItems: 1
maxItems: 10 # TODO: Discuss appropriate value

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 ?

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?

Copy link
Author

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'

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)?

Copy link
Author

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants