Replies: 1 comment
-
Thank you for the very helpful documentation! Is there any timeline for the urls to the pdf reports to be integrated into the api? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Last revised: 20230711
We are offering this for review and discussion. This will become operating procedure on October 1, 2023. Subsequent revisions will be made in consultation with our user community.
API naming conventions
api_
so that it’s easy to distinguish them from other schemas we might work with during development.Examples
api_v1_0_0
- First frozen versionapi_v1_0_1
- Fixes a bugapi_v1_1_0
- Adds a new featureapi_v2_0_0
- Breaks compatibility with older clientsOffering multiple API versions in parallel
We use the PostgREST schema functionality to offer multiple versions of the API in parallel. The order is significant; the first in the list is the default. For example, our configuration after a while might look like:
This means:
v2.0.0
, and if you don’t specify, that’s what you getv1.1.0
is still available, but you have to explicitly specify itv3.0.0-beta
is also available, but you have to opt into itv1.0.0
is no longer available (because it’s not in the list, and presumably we removed that schema altogether)How clients explicitly select the API version
They use headers.
Migrating to new versions
Say we’re getting ready to make
v2
available, and we want feedback from early testers. We makeapi_v2_0_0_alpha
,api_v2_0_0_beta
etc. available on an opt-in basis for volunteers as we make changes. Volunteers would opt in to using those newer API versions.Once we are confident in our release, we would announce
api_v2_0_0
as a non-default, opt-in version, along with much fanfare and a date for when it will become the default (e.g. T+3 months). During that period, people can opt-in to usingv2
in order to verify that their stuff will continue to work oncev2
becomes the default.After the
v2
date passes,v2
will be the default unless people explicitly "opt-out" by specifying that they still want to usev1
. We would also explicitly announce thatv1
is deprecated, and the date after which it may be removed (eg T+12 months). This is to ensure that:The same process would apply for MINOR increments.
Fixing bugs
When we fix a bug, we copy the entire schema (including all of its views) and increment the PATCH. We then put that version after the version that it is fixing. We do this even if the bug we’re fixing is in a view definition and not visible to clients. The reason is so that we can explicitly select that patched version in our tests, smoke tests, etc.
Once the bug is confirmed fixed, both via our own tests and any necessary confirmation from a user, then it’s OK to move the new version in front of the version that was fixed.
We should still announce bugfix releases!
Cleaning up cruft in the codebase
It’s totally reasonable to remove schemas associated with fully-deprecated MAJOR versions from our codebase.
It’s totally reasonable to remove schemas associated with
-alpha
or-beta
or-rc
versions once the final version is available.Beta Was this translation helpful? Give feedback.
All reactions