Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

BroadView API Client

A basic library to interface with SensePost BroadView Servers.

Basic Usage

>>> import bvapi
>>> client = bvapi.Client(url="https://yourbroadviewserver/api/v1", user="yourusername", password="yourpassword")
>>> client.status()
{u'status': u'success', u'current_time': u'2013-03-27T09:01:52.842965+02:00', u'instance_url': u'unconfigured', u'version': u'v1', u'user': u'admin'}

API Details

Each API call returns a dictionary, unless an error occrus in which case an exception is raised. This dictionary will contain the data requested and possible additionaly information, see the API methods for which keys will be populated with the requested data. Since this library interfaces with a JSON API it will return only basic types(lists, dicts, strings, integers etc). All dates and times will be in ISO 8601 Format with a timezone.

API Methods


Used to determine if server is currently serving requests and if authentication succeeds. It also returns the following info:

  • current_time The server's current time in ISO 8601 format including timezone.
  • instance_url The URL for the servers web interface if configured.
  • version The version of the API at the queried location.
  • user The name of the user used in the request.


Returns all the accounts the user can access in the 'accounts' key.


Return all the jobs for the specified account_id in the 'jobs' key. Order is descending.

scans(job_id, [count])

Returns the last scans for the specified job_id in the 'scans' key. Order is descending. An optional count parameter may be given to control the amount of scans returned. The server will impose a maximum count.


Return the scan requested with its issues. The scan will be a dictionary under the 'scan' key, it will contain a key named 'issues' with the scans issues.


Any error will generate an exception derived from bvapi.exceptions.ApiException or it will be an exception generated by a dependency such as requests(If the connections fails etc). The following exceptions are defined:


User was not authorized to perform the API call or access the specified resource.


The specified resource was not found.


See the file LICENSE for full license text.

Copyright SensePost Pty Ltd 2013