The Vega API is only released in beta, as such, it is not covered by Vega Support, and using the API is equivalent to agreeing to this condition.
The API uses the Open API specification (formerly Swagger). You can find documentation and tools for that here: http://swagger.io
The first step is to get the API keys for authentication. Vega uses basic auth for its authentication process.
To get the keys, Login into your Vega account and navigate to the Admin > Vega API.
There you will get the ClientID (username) and API key (password) which you will use for authentication.
The list of API endpoints and how to use them can be found here: api.vega.works/help/index
Here's a sample curl request that will get a list of all supporters in my demo organisation:
curl -u 0C421337-E526-4BF0-807A-C6788A8FF58E:F08w6G8jW98VedsqUtci0knEzZW5D6eQhaC8s1L6X4 https://api.vega.works/api/Supporters
This will return a JSON file with the supporter data. Note - you'll need to substitute the username and password for your own version or you'll get an error.
This is a sample request in PHP:
$username = "0C421337-E526-4BF0-807A-C6788A8FF58E";
$password = "F08w6G8jW98VedsqUtci0knEzZW5D6eQhaC8s1L6X4";
$remote_url = 'https://api.vega.works/api/Supporters';
$opts = array(
'header' => "Authorization: Basic " . base64_encode("$username:$password")
$context = stream_context_create($opts);
$supporterList = file_get_contents($remote_url, false, $context);
Please sign in to leave a comment.