What is the difference between the legacy API and the REST API?

When we upgraded Zenodo in October 2023, we changed to a new REST API while still supporting the legacy API. The legacy API is the one which is documented on Zenodo.
     Documentation https://developers.zenodo.org/

The UI uses the REST API endpoint which is documented on inveniordm.docs.cern.ch and we're working on improving this:
     Experimental OpenAPI documentation: https://inveniosoftware.github.io/invenio-openapi/