Releases: Heritians/UBA-FORM-API
Connecting Villages - v0.2.0
Release 0.2.0
Highlights
- This release focuses on migrating the API to be compatible with the new
Pydantic V2 engine
, to get 20-30% improved performance.
Migration
- Pydantic V2 deprecated the use of
pydantic.json.ENCODER_BY_TYPES
hence the API now uses custom json encoders provided asfastapi.encoders.jsonable_encoder
. Config
class now contains all the .env variables as per Pydantic V2 requirements.- Now Pydantic Settings is an additional optional package (included in
fastapi[all]
). To use settings you should now import frompydantic_settings import BaseSettings
instead of importing frompydantic
directly.
Major Features and Improvements
@json_encoder
wrapper- As hinted in the migration section, Pydantic V2 deprecated the use of
pydantic.json.ENCODER_BY_TYPES
hence to serializebson.ObjectID
tostring
datatype, desired methods can be wrapped by using this decorator with desired mappings.
- As hinted in the migration section, Pydantic V2 deprecated the use of
API Endpoint
Connecting Villages - v0.1.2
Release 0.1.2
Breaking Changes
- Typehint of
has_SSP
of FamilyInformation table has now been modified from boolean to string. Auth sub
was previously defined asaadharno_role
now changed toaadharno_role_village
.volunteer_id
andtimestamp
ofuser
are now being logged for future reference, hence this schema has been modified (data posted prior to this change is invalid).
Major Features and Improvements
- /ops/*
- Higher hierarchy of operations to interact with the database server directly.
- Metadata about the
user
is now being logged on the event of filling out the form. - Bulk user account creation.
- Space-separated volunteer IDs and passwords can be entered for user account creation in bulk.
Bug Fixes
- Typo:
martial_status
tomarital_status
. - Typo:
is_chemical_weedice_used
tois_chemical_weedicide_used
. - Typo:
is_chemical_organic_manuevers
tois_chemical_organic_manures
. - The method to ingest data in
agri_products
was fixed. - Wrong key_pass to identify
agri_products
- The key passed to identify
agri_products
was pointing to thefamily_info
table hence the agri_products data was being dumped into the wrong collection.
- The key passed to identify
- Fix accessing property bug for
UserOut
and base URL. - Fix the wrong prefix of
agri_products
fromfi
toap
. - Bulk users' passwords were not being hashed, now all the passwords will be hashed first.
Production Link
Connecting Villages - v0.1.1
Release 0.1.1
Breaking Changes
-
Authorization Server
now points to URI starting/auth/*
If you find your workflow failing due to this change, you may be facing one of the following issues:- Distinct Authorization and Resource Servers. The new API design splits the API into Authorization and Resource servers and treats their paths differently. All the authentication requests are now re-routed to paths with the prefix
/auth/
.
- Distinct Authorization and Resource Servers. The new API design splits the API into Authorization and Resource servers and treats their paths differently. All the authentication requests are now re-routed to paths with the prefix
-
Custom Exception Handlers. All the intended exceptions are now raised from custom exceptions catering to the exact scenario. Intended Exceptions are no longer raised as generic python exceptions. Custom exceptions now give coherent descriptions to identify the root cause of the error.
Major Features and Improvements
-
/auth/use_refresh_token
- New route to implement rotational access tokens for a smooth user experience and enhancing security.
- A new set of tokens is issued at the time of expiry of the previous access tokens.
-
CORS Middleware
- Middleware to allow CORS data exchange.
Bug Fixes
-
Wrong decode key pass
- Refresh access tokens were being decoded by the wrong API key resulting in unexpected authentication failures after the access token's expiry.
- Refresh token's API key is now fixed.
-
village_name
parameter was not being considered a part of the authentication process.- The fix includes this parameter as a part of the authentication process and will be hashed before dumping to the database.
Production Link
UBA Form API release - v0.1.0
Build 0.1.0
UBA Form API
Features
- Authentication and Authorization
The API is now secured with a custom Authentication Bearer which uses JWT (JSON web tokens) to authenticate and authorize users scope-wise.
- Filtered searches
The API is now equipped with filtered searches throughout the database.
The user can enter the ID of interest to retrieve family or individual information.
Breaking Changes
Get data route now no longer supports
village_name
as its argument in case of admin due to scope limitations.
Deploymenent Link
UBA Form API release - v0.0.1-beta
Build 0.0.1-beta
UBA Form API
Features
- Real-time data sync
The API dumps the data to the database by accepting the HTTP POST request from the client at the exposed endpoint.
- Realtime Data Retrieval
The API retrieves the data from the database by accepting the HTTP GET request from the client at the exposed endpoint enabling real-time analysis-driven insights.
- Visor
The Visor offers a user interface to see a live view of all the events (logs). You can use it to debug your requests, test your endpoints by sending requests, and more.
- Serverless FaaS Service
This API is serverless and provides FaaS (Function as a Service) which means that you don't have to worry about managing servers, scaling, or paying for the idle time that the cloud provider manages.