Reputation: 175
In my application , I am going to use connectwise API , but I can't figure out how to call their API, like
Thanks in advance for any help !!
Upvotes: 2
Views: 10741
Reputation: 324
ConnectWise has a developer portal that is very helpful for this stuff: developer.connectwise.com. If you don't have a login, create a ticket with them to give you access.
Here are basic answers to your questions, though:
https://[connectwise_server]/v4_6_release/apis/3.0/
and then you add to the end depending on the resource you're queryingContent-Type: application/json
and the authentication header (see below)Authentication is BASIC auth. In PHP, that would look something like this.
$username = $companyId .'+'. $publicKey;
$password = $privateKey;
curl_setopt($process, CURLOPT_USERPWD, $username . ":" . $password);
A quick search of SO produced this starting point: Call a REST API in PHP
Upvotes: 5