Nihar Arisal
New Member
Hi Team,
I have a situation where i need to run one API based on different parameters and need to store the response values in another sheet. parameter will be from one sheet.
refer the attached excel file for the data where in RepoData sheet we have repositories and Result sheet we need values to be stored like this from API.
Curl for API
curl --location 'https://sonarcloud.io/api/measures/...y_rating,security_review_rating&branch=master' \
--header 'Authorization: Basic NGZhNmFkZDFhNmMyNDRkMjdlNjI0MDVjYTQ3YWJmNjhmNzdiYjI0Njo='
Eg: Response
{
"component": {
"id": "AX1rRbipdJtPV1ET12n1",
"key": "imonline_accountmanagement.webapi.reseller",
"name": "AccountManagement.WebApi.Reseller",
"qualifier": "TRK",
"measures": [
{
"metric": "coverage",
"value": "43.8",
"bestValue": false
},
{
"metric": "reliability_rating",
"value": "1.0",
"bestValue": true
},
{
"metric": "code_smells",
"value": "126",
"bestValue": false
},
{
"metric": "duplicated_lines_density",
"value": "4.6",
"bestValue": false
},
{
"metric": "security_rating",
"value": "1.0",
"bestValue": true
},
{
"metric": "security_hotspots_reviewed",
"value": "0.0",
"bestValue": false
},
{
"metric": "security_hotspots",
"value": "141",
"bestValue": false
},
{
"metric": "security_review_rating",
"value": "5.0",
"bestValue": false
},
{
"metric": "sqale_rating",
"value": "1.0",
"bestValue": true
},
{
"metric": "bugs",
"value": "0",
"bestValue": true
},
{
"metric": "tests",
"value": "41"
},
{
"metric": "uncovered_lines",
"value": "444",
"bestValue": false
},
{
"metric": "duplicated_blocks",
"value": "13",
"bestValue": false
},
{
"metric": "ncloc",
"value": "4361"
},
{
"metric": "vulnerabilities",
"value": "0",
"bestValue": true
}
]
}
}
Thanks
I have a situation where i need to run one API based on different parameters and need to store the response values in another sheet. parameter will be from one sheet.
refer the attached excel file for the data where in RepoData sheet we have repositories and Result sheet we need values to be stored like this from API.
Curl for API
curl --location 'https://sonarcloud.io/api/measures/...y_rating,security_review_rating&branch=master' \
--header 'Authorization: Basic NGZhNmFkZDFhNmMyNDRkMjdlNjI0MDVjYTQ3YWJmNjhmNzdiYjI0Njo='
Eg: Response
{
"component": {
"id": "AX1rRbipdJtPV1ET12n1",
"key": "imonline_accountmanagement.webapi.reseller",
"name": "AccountManagement.WebApi.Reseller",
"qualifier": "TRK",
"measures": [
{
"metric": "coverage",
"value": "43.8",
"bestValue": false
},
{
"metric": "reliability_rating",
"value": "1.0",
"bestValue": true
},
{
"metric": "code_smells",
"value": "126",
"bestValue": false
},
{
"metric": "duplicated_lines_density",
"value": "4.6",
"bestValue": false
},
{
"metric": "security_rating",
"value": "1.0",
"bestValue": true
},
{
"metric": "security_hotspots_reviewed",
"value": "0.0",
"bestValue": false
},
{
"metric": "security_hotspots",
"value": "141",
"bestValue": false
},
{
"metric": "security_review_rating",
"value": "5.0",
"bestValue": false
},
{
"metric": "sqale_rating",
"value": "1.0",
"bestValue": true
},
{
"metric": "bugs",
"value": "0",
"bestValue": true
},
{
"metric": "tests",
"value": "41"
},
{
"metric": "uncovered_lines",
"value": "444",
"bestValue": false
},
{
"metric": "duplicated_blocks",
"value": "13",
"bestValue": false
},
{
"metric": "ncloc",
"value": "4361"
},
{
"metric": "vulnerabilities",
"value": "0",
"bestValue": true
}
]
}
}
Thanks