Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@
Change history
==============

3.3.0 (2025-10-06)
------------------

**New features**

* [:objects-api:`653`] Add ``created_on`` & ``modified_on`` to ``Object`` & ``ObjectRecord`` models to
allow sorting and filtering in the admin UI
* [:open-api-framework:`175`] Changes to logging of handled and unhandled exceptions (see :ref:`manual_logging_exceptions`)

* Log events for handled API exceptions (e.g. HTTP 400) now include ``data``
* Log events for unhandled API exceptions (e.g. HTTP 500) now include the traceback via ``exception``

* [:open-api-framework:`184`] ``setup_configuration`` now supports pulling values from
environment variables in YAML configuration by using ``value_from`` (see `setup_configuration documentation`_ for more information)

.. TODO should be reference to readthedocs
.. _setup_configuration documentation: https://github.com/maykinmedia/django-setup-configuration/blob/main/README.rst#environment-variable-substitution


**Project maintenance**

* Upgrade dependencies

* ``Django`` to 5.2.7
* ``pip`` to 25.2 in dev dependencies
* [:open-api-framework:`175`] ``commonground-api-common`` to 2.10.1
* [:open-api-framework:`184`] ``django-setup-configuration`` to 0.9.0
* [:open-api-framework:`186`] ``open-api-framework`` to 0.13.1

* Fix ReadTheDocs build by installing required dependencies

3.2.0 (2025-09-16)
------------------

Expand Down
37 changes: 35 additions & 2 deletions README.NL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Objecten API
============

:Version: 3.2.0
:Version: 3.3.0
:Source: https://github.com/maykinmedia/objecttypes-api
:Keywords: objecten, assets, zaakobjecten

Expand Down Expand Up @@ -38,7 +38,40 @@ Applicatie versie Release datum API specificatie
================= ============== =============================
latest n/a `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/master/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/master/src/objects/api/v2/openapi.yaml>`_,
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.0.0..master>`_)
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.3.0..master>`_)
3.3.0 2025-10-02 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.3.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.3.0/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.2.0..3.3.0>`_)
3.2.0 2025-09-16 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.2.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.2.0/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.1.4..3.2.0>`_)
3.1.4 2025-08-28 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.4/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.4/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.1.3..3.1.4>`_)
3.1.3 2025-08-04 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.3/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.3/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.1.2..3.1.3>`_)
3.1.2 2025-07-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.2/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.2/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.1.1..3.1.2>`_)
3.1.1 2025-07-04 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.1/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.1/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.1.0..3.1.1>`_)
3.1.0 2025-05-26 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.0/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.0.4..3.1.0>`_)
3.0.4 2025-05-13 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.4/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.4/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.0.3..3.0.4>`_)
3.0.3 2025-04-03 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.3/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.3/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.0.2..3.0.3>`_)
3.0.2 2025-03-07 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.2/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.2/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.0.1..3.0.2>`_)
3.0.1 2025-03-04 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.1/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.1/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/3.0.0..3.0.1>`_)
3.0.0 2025-01-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.0/src/objects/api/v2/openapi.yaml>`_
(`verschillen <https://github.com/maykinmedia/objects-api/compare/2.5.0..3.0.0>`_)
Expand Down
37 changes: 35 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Objects API
===========

:Version: 3.2.0
:Version: 3.3.0
:Source: https://github.com/maykinmedia/objects-api
:Keywords: objects, assets, zaakobjecten

Expand Down Expand Up @@ -36,7 +36,40 @@ Application version Release date API specification
=================== ============== =============================
latest n/a `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/master/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/master/src/objects/api/v2/openapi.yaml>`_,
(`diff <https://github.com/maykinmedia/objects-api/compare/3.0.0..master>`_)
(`diff <https://github.com/maykinmedia/objects-api/compare/3.3.0..master>`_)
3.3.0 2025-10-02 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.3.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.3.0/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.2.0..3.3.0>`_)
3.2.0 2025-09-16 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.2.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.2.0/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.1.4..3.2.0>`_)
3.1.4 2025-08-28 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.4/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.4/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.1.3..3.1.4>`_)
3.1.3 2025-08-04 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.3/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.3/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.1.2..3.1.3>`_)
3.1.2 2025-07-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.2/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.2/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.1.1..3.1.2>`_)
3.1.1 2025-07-04 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.1/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.1/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.1.0..3.1.1>`_)
3.1.0 2025-05-26 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.1.0/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.0.4..3.1.0>`_)
3.0.4 2025-05-13 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.4/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.4/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.0.3..3.0.4>`_)
3.0.3 2025-04-03 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.3/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.3/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.0.2..3.0.3>`_)
3.0.2 2025-03-07 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.2/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.2/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.0.1..3.0.2>`_)
3.0.1 2025-03-04 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.1/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.1/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/3.0.0..3.0.1>`_)
3.0.0 2025-01-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.0/src/objects/api/v2/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.0.0/src/objects/api/v2/openapi.yaml>`_
(`diff <https://github.com/maykinmedia/objects-api/compare/2.5.0..3.0.0>`_)
Expand Down
6 changes: 3 additions & 3 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ API Specification version(s)
`Redoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objecttypes-api/3.0.3/src/objecttypes/api/v2/openapi.yaml>`__,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objecttypes-api/3.0.3/src/objecttypes/api/v2/openapi.yaml>`__
)
`Objects API`_ 2.4.3 (
`Redoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.2.0/src/objects/api/v2/openapi.yaml>`__,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.2.0/src/objects/api/v2/openapi.yaml>`__
`Objects API`_ 2.4.4 (
`Redoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.3.0/src/objects/api/v2/openapi.yaml>`__,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/objects-api/3.3.0/src/objects/api/v2/openapi.yaml>`__
)
====================== ==========================================

Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"https://objects.municipality.nl/admin/",
"https://sparxsystems.com/products/ea/trial/request.html", # this raises 403 for crawlers probably?
"https://data.overheid.nl/",
"https://github.com/maykinmedia/django-setup-configuration/blob/main/README.rst#environment-variable-substitution",
]

extlinks = {
Expand Down
49 changes: 47 additions & 2 deletions docs/manual/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,53 @@ Objecttypes API
* ``object_version_updated``: updated an ``Object_version`` via the API. Additional context: ``version``, ``objecttype_uuid``, ``token_identifier``, ``token_application``.
* ``object_version_deleted``: deleted an ``Object_version`` via the API. Additional context: ``version``, ``objecttype_uuid``, ``token_identifier``, ``token_application``.

.. _manual_logging_exceptions:

Exceptions
----------

Handled exceptions follow a standardized JSON format to ensure consistency and improve error tracking.
Most fields are standard and include:
``title``, ``code``, ``status``, ``event``, ``source``, ``user_id``, ``request_id``, ``timestamp``, ``logger`` and ``level``.

A new field ``data`` has been added to provide detailed information about which input parameters caused the error in API calls.

.. code-block:: json

{
"title": "Authentication credentials were not provided.",
"code": "not_authenticated",
"status": 401,
"data": {
"detail": "Authentication credentials were not provided."
},
"event": "api.handled_exception",
"user_id": null,
"request_id": "68b46bf0-a5b8-43f7-a550-e37dee617bff",
"source": "app",
"timestamp": "2025-10-06T07:43:40.991929Z",
"logger": "objects.utils.views",
"level": "error"
}

Uncaught exceptions that occur via the API are logged as ``api.uncaught_exception`` events
and contain the traceback of the exception.

.. code-block:: json

{
"event": "api.uncaught_exception",
"request_id": "9a5c781d-b15c-4b3a-8910-e7968ae37cb6",
"user_id": null,
"timestamp": "2025-10-06T08:31:57.572352Z",
"logger": "objects.utils.views",
"level": "error",
"exception": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.12/site-packages/rest_framework/views.py\", line 497, in dispatch\n self.initial(request, *args, **kwargs)\n File \"/usr/local/lib/python3.12/site-packages/vng_api_common/geo.py\", line 30, in initial\n super().initial(request, *args, **kwargs)\n File \"/usr/local/lib/python3.12/site-packages/rest_framework/views.py\", line 415, in initial\n self.check_permissions(request)\n File \"/usr/local/lib/python3.12/site-packages/rest_framework/views.py\", line 332, in check_permissions\n if not permission.has_permission(request, self):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/src/objects/token/permissions.py\", line 10, in has_permission\n 1 / 0\n ~~^~~\nZeroDivisionError: division by zero"
}


Setup configuration
~~~~~~~~~~~~~~~~~~~
-------------------

* ``no_permissions_defined``: while running the token configuration step, it was detected that neither permissions nor ``is_superuser`` was set for the token. Additional context: ``token_identifier``.
* ``no_tokens_defined``: while running the token configuration step, it was detected that the config file did not define any tokens.
Expand All @@ -85,7 +130,7 @@ Setup configuration
* ``token_configuration_success``: configuring a token succeeded. Additional context: ``token_identifier``.

Data migrations
~~~~~~~~~~~~~~~
---------------

* ``token_identifier_generated``: while migrating, an ``identifier`` was generated for a token. Additional context: ``token_identifier``, ``token_pk``.
* ``missing_service_for_objecttype``: while migrating, a ``Service`` object is missing for an ``ObjectType``. Additional context: ``object``, ``objecttype``.
Expand Down
Loading