Skip to content

EuropeanUniversityFoundation/vocabulary-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vocabulary API

Minimalistic implementation of a web API providing controlled vocabularies.

Motivation

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.

Libraries

This is a SlimPHP v4 application that includes the following libraries providing controlled vocabularies:

Other libraries may be added in the future.

Usage

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.

Front end applications

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.

Back end applications

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

Drupal 10+ applications

The following controlled vocabularies are implemented as Drupal field types:

Visit EUF packages for more detailed information.

About

API for controlled vocabularies

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages