Changelog¶
All notable API changes will be documented in this file. The format is based on Keep a Changelog.
unreleased¶
Fixed¶
- Fixed a bug in bibtext generation that caused a server error when a resource had no title.
- Fixed a bug where exceptions were wrongfully labeled as cache errors.
4.1.0 - 2026-09-23¶
Changed¶
- Adapted the
languagesobject in the metadata responses according to the current JSONschema changes.
Fixed¶
- Updated version number in README.md and openapi_info.yaml to v4.
- Removed "language_codes" property from the JSON schema from
/response-schema. - Logging configuration in
gen_pids.pynow uses a filter to send log messages below ERROR to stdout and ERROR and above to stderr. - Fixed a bug in
gen_pids.pythat caused some missing language properties in the Datacite metadata.
4.0.1 - 2026-09-03¶
Changed¶
- Improved error logging from
gen_pids.pywhen updating Datacite metadata.
Fixed¶
- Fixed a git path calculation bug in gen_pids.
4.0.0 - 2026-09-02¶
Added¶
- Added a new route
/source/[resource_type]/[resource-id]for retrieving the source metadata for a resource (without applying metadata processing). - Collections now have an
updatedfield in the metadata, which - if not set explicitly - is set to the latestupdateddate of all resources in the collection. - Added a new route
/resource-schemafor retrieving the JSON schema used to validate the metadata YAML files. - Added a new route
/validate-resourcefor validating resource metadata (sent in the request body) against the JSON schema. - Added a html developer documentation page at
/docs/(rendered with MkDocs). - Add support for tracking API usage with Matomo.
Changed¶
/schemaroute (returning the JSON schema for the resource listings generated by the/endpoint) has been renamed to/response-schema.- The swagger documentation is now available at
/swaggerinstead of/docs. gen_pids.py: is now called as a module usinguv run -m gen_pids.gen_pids.- Changed names and behavior of flags in
gen_pids.py. Run with--helpto see the new options. gen_pids.pynow handles git commits and log rotation.- Exchanged jsonschema lib for jsonschema-rs for validating metadata against the schema for better error messages and performance.
gen_pids.py: improved handling of resources with multiple languages.
Fixed¶
gen_pids.py --file --force-updatenow limits Datacite updates to the selected resource and its transitive collection/successor closure instead of updating unrelated relation groups.- Fixed bug in
gen_pids.pywhich did not expand resource references with wildcards when generatingHasPartrelations for collections. - Fixed the response model for the
/route to correctly reflect the possible return types when using different query parameters (except for the legacy format). - Empty entries in the
languagesfield of the metadata are now removed from the API response. gen_pids.py: rightsList now only contains unique entries.- Fixed logging bug in cache renewal.
Removed¶
- Removed
gen_pids.shscript. Useuv run -m gen_pids.gen_pidsinstead. - Removed the deprecated
/corpora,/lexicons,/models,/analyses,/utilitiesand/collectionsroutes. Use the main/route with theresourceparameter instead. - Removed the
legacyquery parameter from the/route. The legacy response format (usingcorpora,lexicons, etc.) is no longer supported. - Removed the deprecated
/docroute serving the OpenAPI documentation in YAML format. Use/openapi.jsoninstead.
3.3.1 - 2026-03-09¶
Fixed¶
- Fixed a bug in
parse_yaml.pythat caused thehas_descriptionfield to be missing from collection metadata.
3.3.0 - 2026-01-15¶
Added¶
- Added atomic tracking of pending cache renewal tasks using Redis to prevent overload.
- Added support for wildcards using simple glob-style patterns (
*and?) in collection resource references. - Added support for type prefixes in collection resource references (e.g.
corpus/*). - Added
purge-license-cachequery parameter to/renew-cacheroute to allow re-downloading license information from SPDX before parsing YAML files.
Changed¶
- Improved error messages from
gen_pids.pyandparse_yaml.pyfor better clarity. - All
licensefields in the metadata are now transformed into objects containingid,name, andurlfields with license details from SPDX. - Moved batch programs from
tmp_scripts/tobatch_jobs/directory and refactored code inmetadata_util.py.
3.2.0 - 2025-12-03¶
Added¶
- Added an
updateargument to thegen_pids.shscript to force updates of all Datacite metadata. - Added proper license information to Datacite metadata.
- Added
/redocroute for API documentation with ReDoc. - Added
/docsroute for API documentation with Swagger UI.
Changed¶
- Flask is replaced with FastAPI as the web framework and the app is run asynchronously.
- Minimal Python version is now 3.11.
- The app is now run with
uvicorninstead ofgunicorn. - Cache-renewal is now done in a background task with Celery, using Redis as broker.
- Change preferred installation method to use
uvfor dependency management. gen_pids.pynow uses logging instead of print statements.- Moved some documentation from README.md to docs/dev-docs.md.
- Slightly improved caching logic.
Deprecated¶
- The
/corpora,/lexicons,/models,/analyses,/utilitiesand/collectionsroutes are deprecated and will be removed in a future version. Use the main/route with theresourceparameter instead. - The
/docroute serving the OpenAPI documentation in YAML format is deprecated and will be removed in a future version. Use/openapi.jsoninstead.
Fixed¶
- Cache-renewal is only triggered when changes are detected in the main branch of the metadata repo (instead of all branches).
- Fixed bug in
gen_pids.pythat caused emtpy resource sized. - Fixed Pylance type warnings.
3.1 - 2025-02-28¶
Added¶
- Better error handling and logging for 404 errors.
- Added documentation about caching.
- Added possibility to send error messages to a Slack channel. The URL can be configured with the
SLACK_WEBHOOKvariable. - Added a shell script for extracting the version number from
__init__.pyand changing references to the API version inREADME.md. - When running a test server, the port can now be supplied as an argument to
run.py.
Fixed¶
- The
/schemaroute now correctly reflects the schema for the resource data returned by the API. - Fixed bug that caused errors in logging.
- Do not delete the app logs during log rotation in
gen_pids.sh. - Fixed bug in
/renew-cachethat caused attempts to process non-metadata files.
3.0 - 2025-02-25¶
Added¶
- It is now possible to use a custom config (
config.py) for overriding values defined in the default config. - Proper logging and better error handling.
Changed¶
- Integrated
parse_yaml.pyinto the API. YAML files are now parsed when calling the/renew-cacheroute. - It is now possible to perform a cache refresh with specific updated/deleted resources by supplying the
resource-pathsparameter to/renew-cache. - The format for the resource data has been updated. A json schema will be available soon.
- The API documentation is now served as JSON instead of YAML (by
/doc). - It is now possible to add a new resource type by adding it to the
RESOURCESdictionary in the config file.
2.0 - 2025-02-14¶
This version has been developed over a long period and is therefore incomplete. It only contains the latest changes. Please refer to the git commit log for more information.
Added¶
- Added a route for creating a bibtex citation for a specific resource:
/bibtex?resource=[some-id] - Added a route for lising analyses:
/analyses - Added a route for listing utilities:
/utilities - Added a script for generating PIDs and registering resources at Datacite.