Last updated 5 hours ago
Use these operations to interact with the SonarQube integration in Cortex.
Your API key must have the Configure integrations permission.
Configure integrations
curl -L \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configurations' \ --header 'Authorization: Bearer JWT'
{ "configurations": [ { "alias": "text", "host": "text", "isDefault": true, "lastFour": "text" } ] }
curl -L \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/default-configuration' \ --header 'Authorization: Bearer JWT'
{ "alias": "text", "host": "text", "isDefault": true, "lastFour": "text" }
curl -L \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configuration/{alias}' \ --header 'Authorization: Bearer JWT'
curl -L \ --request POST \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configuration/validate' \ --header 'Authorization: Bearer JWT'
{ "configurations": [ { "alias": "text", "isValid": true, "message": "text" } ] }
curl -L \ --request POST \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configuration/validate/{alias}' \ --header 'Authorization: Bearer JWT'
{ "alias": "text", "isValid": true, "message": "text" }
curl -L \ --request DELETE \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configuration/{alias}' \ --header 'Authorization: Bearer JWT'
curl -L \ --request DELETE \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configurations' \ --header 'Authorization: Bearer JWT'
No body
curl -L \ --request POST \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configurations' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "configurations": [ { "alias": "text", "host": "text", "isDefault": true, "token": "text" } ] }'
{ "configurations": [ { "alias": "text", "host": "text", "isDefault": true, "lastFour": "text" } ], "skippedConfigurations": { "ANY_ADDITIONAL_PROPERTY": "text" } }
curl -L \ --request POST \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configuration' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "alias": "text", "host": "text", "isDefault": true, "token": "text" }'
WARNING: Updating aliases for configurations or changing the default configuration could cause entity YAMLs that use this integration to break.
curl -L \ --request PUT \ --url 'https://api.getcortexapp.com/api/v1/sonarqube/configuration/{alias}' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "alias": "text", "isDefault": true }'