A connector for using the EcoVadis API
python3
Supports GET
Supports page_size and paging
Run program in development
This repo uses the file package.json
and yarn to run the required commands.
- Make sure you have installed yarn.
- Creata a file called
helpers.json
and set username and password in the following format:
{
"username": "some username",
"password": "some password"
"base_url": "some url"
}
- run:
yarn install
- execute to run the script:
yarn swagger
Run program in production
Make sure the required env variables are defined.
Use program as a SESAM connector
{
"_id": "ecovadis",
"type": "system:microservice",
"docker": {
"environment": {
"password": "$SECRET(ecovadis-password)",
"username": "$ENV(ecovadis-username)",
"base_url": "$ENV(ecovadis-base_url)",
"page_size": "$ENV(page_size)" <- this one is optional
},
"image": "sesamcommunity/ecovadis:latest",
"port": 5000
},
"verify_ssl": true
}
{
"_id": "ecovadis-evdata",
"type": "pipe",
"source": {
"type": "json",
"system": "ecovadis",
"url": "/entities/get/EVData"
},
"transform": {
"type": "dtl",
"rules": {
"default": [
["copy", "*"]
]
}
}
}
This connector works using dynamic routing when requesting data from the Ecovadis API. In your browser, you can therefore set specific query parameters for each resource, i.e. "EVData", which results in :
/entities/get/EVData