Minimalistic implementation of a web API providing controlled vocabularies.
Controlled vocabularies change very seldom, if they change at all. While it is common practice to store such vocabularies in database tables, we believe some things are better off defined in code.
This is a SlimPHP v4 application that includes the following libraries providing controlled vocabularies:
Other libraries may be added in the future.
The fully functional API is available at vocabulary.api.uni-foundation.eu.
To obtain the full ISCED vocabulary, use GET /api/v1/isced.
To obtain a full ELM controlled vocabulary, use GET /api/v1/elm/{vocabulary}. For example: GET /api/v1/elm/learning-setting.
To obtain a particular translation, add ?lang={langcode} as a query parameter. For example: GET /api/v1/isced?lang=fr.
When building a front end application that includes a controlled vocabulary as a select list or similar component, a complete vocabulary can be fetched and stored in the application. Caching is very much advised.
If you expect to make heavy use of the API, please clone this repository and deploy your own. See the SlimPHP documentation for more information.
When building a back end application in PHP, simply include the libraries in the code base:
composer require euf/elm_vocabularies
composer require euf/isced
The following controlled vocabularies are implemented as Drupal field types:
Visit EUF packages for more detailed information.