This section is dedicated to developers who want to integrate our services in their applications.

API stands for Application Programming Interface and represents a software intermediary that allows two applications to talk to each other.
An API is a set of defined rules that explain how computers or applications communicate with one another.
With the API, developers can simply use the interface to communicate with other products and services, with no need to know how an API is implemented.

ENVRI FAIR APIs are open and developers can access them simply using the HTTP protocol.
The APIs available in the training catalogue, and listed below, can be used in other applications or by a browser:


Sinthetic List
https://trainingcatalogue.envri.eu/api/list?format={json/xml}

This api is a GET method and it returns some fields (external_id, code, title, subtitle, description) of all active resources loaded into the catalogue. The input parameter format is optional and it permits to obtain the response as xml, if format = xml, or as json, if format =json. If format parameter is not used, the default response format is json. To test it copy and paste the url in a browser.

Examples :
https://trainingcatalogue.envri.eu/api/list?
https://trainingcatalogue.envri.eu/api/list?format=xml
https://trainingcatalogue.envri.eu/api/list?format=json

Detailed list
https://trainingcatalogue.envri.eu/api/full-list?format={json/xml}

This api is a GET method and it returns the list of all active resources loaded into the catalogue, as the previous one, plus it also returns the fields of LOM. The input parameter format is optional and it permits to obtain the response as xml, if format = xml, or as json, if format =json. If format parameter is not used, the default response format is json. To test it copy and paste the url in a browser.

Examples :
https://trainingcatalogue.envri.eu/api/full-list?
https://trainingcatalogue.envri.eu/api/full-list?format=xml
https://trainingcatalogue.envri.eu/api/full-list?format=json

Single resource detail
https://trainingcatalogue.envri.eu/api/resource?extid={external_id}&format={json/xml}

This api is a GET method and it returns all resource data, included LOM fields, that match the parameter external_id in input. The input parameter external_id is mandatory and it is the unique id of required resource. The input parameter format is optional and it permits to obtain the response as xml, if format = xml, or as json, if format =json. If format parameter is not used, the default response format is json. To test it copy and paste the url in a browser.

Examples:
https://trainingcatalogue.envri.eu/api/resource?extid=HTjETKz1aj
https://trainingcatalogue.envri.eu/api/resource?extid=HTjETKz1aj&format=xml
https://trainingcatalogue.envri.eu/api/resource?extid=HTjETKz1aj&format=json

LOM definition
https://trainingcatalogue.envri.eu/api/lom-structure?format={json/xml}

This api is a GET method and it returns the LOM structure at the time of the request. The input parameter format is optional and it permits to obtain the response as xml, if format = xml, or as json, if format =json. If format parameter is not used, the default response format is json. To test it copy and paste the url in a browser.

Examples:
https://trainingcatalogue.envri.eu/api/lom-structure?
https://trainingcatalogue.envri.eu/api/lom-structure?format=xml
https://trainingcatalogue.envri.eu/api/lom-structure?format=json

Simple search
https://trainingcatalogue.envri.eu/api/search?format={json/xml}

This api is a POST method and it returns external_id, code, title, subtitle, description of those resources that matched the specified search parameters. The possible input parameters for post method are: Code, title, subtitle, description, it is mandatory to enter at least one parameter.
This api can be tested using the site https://reqbin.com/ or postman app. Select POST type of rest, insert the url in the dedicated text area, then select Content and choose FORM URL Encoded (application/x-www-form-urlencoded) in the drop down menu.

In the text area for parameters you can write for example:
code = 4
title=fairness

Advanced search
https://trainingcatalogue.envri.eu/api/full-search?format={json/xml}

This api is a POST method and it returns all metadata of those resources that matched the specified search parameters. The possible input parameters for post method are: Code, title, subtitle, description, it is mandatory to enter at least one parameter. This api can be tested using the site https://reqbin.com/ or postman app. Select POST type of rest, insert the url in the dedicated text area, then select Content and choose FORM URL Encoded (application/x-www-form-urlencoded) in the drop down menu.

In the text area for parameters you can write for example:
code = 4
title=fairness
metadata[1.5]=en
metadata[1.1]=1