REST API Wrappers for V1 Compatibility
- Our Products & Services
- Getting Started
- Accounts
- Communication
- Billing
- Companies
- Financial
- Integrations
- Inventory
- Jobs
- Mapping
- Misc.
- Monitoring
- Purchase Orders
- Release Notes
- Sonar Billing
- Voice
- Reporting
- Security
- sonarPay
- Ticketing
- Working With the Sonar Team & Additional Resources
- System
- Networking
Table of Contents
While Sonar V2 uses GraphQL as its primary API language, rather than REST endpoints, many APIs that were available in Sonar V1 have been ported to V2 for backwards-compatibility purposes.
To see a list of all V1 endpoints, visit legacy.sonar.software/apidoc. There is also a subset of those V1 endpoints that are available in the current version of Sonar, which are listed below.
Sonar V2 Supported Endpoints
All supported endpoints will include the following base: https://example.sonar.software/api/v1
Testing the API wrapper
This cURL example assumes the username is apiguy
and the password is superSecret123
:
- bash/zsh/etc example (e.g., Linux or Mac):
API_URI=https://myinstance.sonar.software/api/v1/system/services
API_USER=apiguy
API_PASSWORD='superSecret123'
curl --basic --user "$API_USER":"$API_PASSWORD" $API_URI
- Windows cmd/PowerShell:
curl.exe --basic --user apiguy:"superSecret123" https://myinstance.sonar.software/api/v1/system/services
Authenticating via Base64 username+password
If you’re using software you have written yourself, you may need to convert the username and password into an http basic authentication string. To do this, concatenate username:password. For example, if your username is apiguy
and your password is superSecret123
, convert apiguy:superSecret123
to base64 encoding. You can paste them below and we will do it for you. Note that nothing is transmitted to our server--this runs in your own web browser only.