Table of Contents

API Wrappers for V1 Compatibility

Matt Glosson Updated by Matt Glosson

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

How the API Wrapper Works

To utilize Sonar V1 API wrappers in Sonar V2, perform the following steps:

  1. Convert your V2 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:  
  2. As a proof-of-concept, you can then run (from Linux or Mac):
    INSTANCE=myinstance.sonar.software
    API_ENDPOINT=system/services/1
    API_AUTH=YXBpZ3V5OnN1cGVyU2VjcmV0MTIz

    curl "https://$INSTANCE/api/v1/$API_ENDPOINT" --header "Authorization: Basic $API_AUTH"
    Windows would look like:
    set INSTANCE=myinstance.sonar.software
    set API_ENDPOINT=system/services/1
    set API_AUTH=YXBpZ3V5OnN1cGVyU2VjcmV0MTIz

    curl "https://%INSTANCE%/api/v1/%API_ENDPOINT%" --header "Authorization: Basic %API_AUTH%"

How did we do?

Filtering: Simple vs Advanced

My Info: Your Personal User Settings

Contact