Table of Contents

REST API Wrappers for V1 Compatibility

Matt Glosson Updated by Matt Glosson

Read Time: 2 mins

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

Category

Endpoint

Account Addresses

accounts/:id/addresses

Account Billing

accounts/:id/billing_details

Account Call Logs

accounts/:id/call_logs

Account Contacts

accounts/:account_id/contacts

Account IP Addresses

accounts/:id/ip_assignments

Account Inventory

accounts/:id/inventory_items

Account Invoices

accounts/:id/invoices

Account Services

accounts/:id/services

Account Tax Overrides

accounts/:id/account_tax_overrides

Accounts

accounts

Address Lists

network/provisioning/address_lists

Alerting Rotations

network/monitoring/alerting_rotations/:id

Contracts

accounts/:account_id/contracts

DHCP Server Identifiers

network/provisioning/dhcp_server_identifiers

DHCP Servers

network/provisioning/dhcp_servers

General Ledger Codes

financial/general_ledger_codes

Inbound Email Accounts

system/tickets/inbound_email_accounts

Network Site IP Addresses

network/network_sites/:id/ip_assignments

Notes

notes/:entity_type/:entity_id

Services

system/services

System

system/account_groups

Ticket Groups

system/tickets/ticket_groups

Users

users

Testing the API wrapper

This cURL example assumes the username is apiguy and the password is superSecret123:

  1. 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
  2. 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.


Username:   Password:  

How did we do?

Browser Compatibility and Minimum Hardware Requirements for Sonar

User Profile: Your Personal User Settings

Contact