Management APIs
Destinations API
List Destinations
4 min
list destinations you can list all of the destinations currently set up on your account by making making a http get request to the /destinations endpoint parameters the following querystring (http get) parameters allow you to refine the results returned by the destinations list api true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example get get /destinations in the example below we list page 1 of all the destinations on your account http https //api bigboxapi com/destinations?api key=demo$ curl "https //api bigboxapi com/destinations?api key=demo"const axios = require('axios'); axios get('https //api bigboxapi com/destinations?api key=demo') then(response => { const apiresponse = response data; console log("total destinations ", apiresponse usage used); apiresponse destinations map((destination, number) => console log((number + 1) + ' ' + destination name); }) catch(error => { console error(error); });import requests import json params = { 'api key' 'demo' } api result = requests get('https //api bigboxapi com/destinations', { params }) api response = api result json() for number, destination in enumerate(api response\['destinations'], start=1) print "%s %s" % (number, destination\['name'])\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init(sprintf('%s?%s', 'https //api bigboxapi com/destinations', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); echo "total destinations ", $api result\['usage']\['used'], php eol; foreach ($api result\['destinations'] as $number => $destination) { echo "{$number} {$destination\['name']}", php eol; } ?> bigbox api responds with the following json showing page 1 of all the destinations on your bigbox api account { "request info" { "success" true }, "usage" { "used" 1, "limit" 50, "available" 49 }, "destinations" \[ { "id" "abcdefg", "name" "my first s3 destination", "type" "s3", "enabled" true, "used by" 0, "s3 bucket name" "s3 bucket name", "s3 path prefix" "my path prefix" } ] } next steps https //docs trajectdata com/bigboxapi/destinations api/update https //docs trajectdata com/bigboxapi/destinations api/delete