Public
Documentation Settings

SOS2021-20-foundsresearchsources-stats v2 (Stable)

This api brings information about the provenance of the founds for research in the different countries of the European Union.

Version 2 is an LTS release.

GET/api/v2/foundsresearchsources-stats/loadInitialData (CONFLICT)

https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats/loadInitialData

Testing conflict when trying to load the dataset twice, its loaded by default when the service starts. Validation test must return:

  • Status code 409.
Example Request
curl
curl --location 'https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats/loadInitialData'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

GET/api/v2/foundsresearchsources-stats (BAD REQUEST)

https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats/llsdjfls

Testing bad request to a random url. Validation test must return:

  • Status code 400.
Example Request
curl
curl --location 'https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats/llsdjfls'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

GET/api/v2/foundsresearchsources-stats

https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats

Returns all the data from foundsresearchsources-stats. Validation test must return:

  • Status code 200.
  • Five objects of the dataset loaded for testing.
Example Request
curl
curl --location 'https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POST/api/v2/foundsresearchsources-stats

https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats

Allows you to insert a new object on database. Validation test must return:

  • Status code 201.
Bodyraw (json)
json
{
            "country": "italy",
            "year": 2015,
            "percentage_of_government_funding": 22.5,
            "percentage_of_private_financing": 58.6,
            "percentage_of_non_profit_funding": 0.4


        }
Example Request
curl
curl --location 'https://sos2021-20.herokuapp.com/api/v2/foundsresearchsources-stats' \
--data '{
            "country": "italy",
            "year": 2015,
            "percentage_of_government_funding": 22.5,
            "percentage_of_private_financing": 58.6,
            "percentage_of_non_profit_funding": 0.4


        }'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers