Skip to content

Commit 24d677f

Browse files
authored
Merge pull request #306 from carbonblack/develop
Release 1.7.6 Bug Fix: Removed the requirement for an admin token to connect Bug Fix: Added sensor paginated query Library update: Updated version of lxml library
2 parents 048459b + 1e05974 commit 24d677f

27 files changed

+172
-164
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python bindings for Carbon Black REST API
22

3-
**Latest Version: 1.7.5**
3+
**Latest Version: 1.7.6**
44

55
_**Notice**:_
66
* The Carbon Black Cloud portion of CBAPI has moved to https://github.com/carbonblack/carbon-black-cloud-sdk-python. Any future development and bug fixes for Carbon Black Cloud APIs will be made there. Carbon Black EDR and App Control will remain supported at CBAPI

docs/changelog.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ CbAPI Changelog
22
===============
33
.. top-of-changelog (DO NOT REMOVE THIS COMMENT)
44
5+
CbAPI 1.7.6 - Release Dec 20, 2021
6+
------------------------------------
7+
8+
Bug Fixes
9+
* Removed the requirement for an admin token to connect
10+
* Added sensor paginated query
11+
12+
General
13+
* Updated version of lxml library
14+
15+
516
CbAPI 1.7.5 - Released June 16, 2021
617
------------------------------------
718

docs/concepts.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ Joining Model Objects
6262
---------------------
6363

6464
Many times, there are relationships between different Model Objects. To make navigating these relationships easy,
65-
cbapi provides special properties to "join" Model Objects together. For example, a :py:mod:`cbapi.response.models.Process`
66-
Model Object can reference the :py:mod:`cbapi.response.models.Sensor` or :py:mod:`cbapi.response.models.Binary`
67-
associated with this Process.
65+
cbapi provides special properties to "join" Model Objects together. For example, a
66+
:py:mod:`cbapi.response.models.Process` Model Object can reference the :py:mod:`cbapi.response.models.Sensor` or
67+
:py:mod:`cbapi.response.models.Binary` associated with this Process.
6868

6969
In this case, special "join" properties are provided for you. When you use one of these properties, cbapi will
7070
automatically retrieve the associated Model Object, if necessary.
@@ -186,8 +186,8 @@ represent these data types can be "created" in cbapi by using the ``create()`` m
186186

187187
If you attempt to create a Model Object that cannot be created, you will receive a :py:mod:`ApiError` exception.
188188

189-
Once a Model Object is created, it's blank (it has no data). You will need to set the required properties and then call the
190-
``.save()`` method::
189+
Once a Model Object is created, it's blank (it has no data). You will need to set the required properties and then call
190+
the ``.save()`` method::
191191

192192
>>> bh = cb.create(BannedHash)
193193
>>> bh.text = "Banned from API"

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
# The short X.Y version.
6262
version = u'1.7'
6363
# The full version, including alpha/beta/rc tags.
64-
release = u'1.7.5'
64+
release = u'1.7.6'
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.

docs/defense-api.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.. _defense_api:
22

3-
CB Defense API
4-
==============
3+
Cloud Endpoint Standard API
4+
===========================
55

6-
This page documents the public interfaces exposed by cbapi when communicating with a CB Defense server.
6+
This page documents the public interfaces exposed by cbapi when communicating with a Cloud Endpoint Standard server.
77

88
Main Interface
99
--------------
1010

11-
To use cbapi with Carbon Black Defense, you will be using the CBDefenseAPI.
11+
To use cbapi with VMware Carbon Black Cloud Endpoint Standard, you will be using the CBDefenseAPI.
1212
The CBDefenseAPI object then exposes two main methods to select data on the Carbon Black server:
1313

1414
.. autoclass:: cbapi.psc.defense.rest_api.CbDefenseAPI

docs/getting-started.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Getting Started
44
First, let's make sure that your API authentication tokens have been imported into cbapi. Once that's done, then read
55
on for the key concepts that will explain how to interact with Carbon Black APIs via cbapi.
66

7-
Feel free to follow along with this document or watch the `Development Environment Setup video <https://developer.carbonblack.com/guide/enterprise-response/development-environment-video/>`_
7+
Feel free to follow along with this document or watch the
8+
`Development Environment Setup video <https://developer.carbonblack.com/guide/enterprise-response/development-environment-video/>`_
89
on the Developer Network website.
910

1011
API Authentication
@@ -36,7 +37,8 @@ Alternatively, if you're using Windows (change ``c:\python27`` if Python is inst
3637
This configuration script will walk you through entering your API credentials and will save them to your current user's
3738
credential file location, which is located in the ``.carbonblack`` directory in your user's home directory.
3839

39-
If using cbapi-psc, you will also be asked to provide an org key. An org key is required to access the Carbon Black Cloud, and can be found in the console under Settings -> API Keys.
40+
If using cbapi-psc, you will also be asked to provide an org key. An org key is required to access the Carbon Black
41+
Cloud, and can be found in the console under Settings -> API Keys.
4042

4143
Your First Query
4244
----------------

docs/index.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This library provides a Pythonic layer to access the raw power of the REST APIs
1313

1414
>>> from cbapi.response import CbResponseAPI, Process, Binary, Sensor
1515
>>> #
16-
>>> # Create our CbAPI object
16+
>>> # Create our EDR API object
1717
>>> #
1818
>>> c = CbResponseAPI()
1919
>>> #
@@ -43,7 +43,7 @@ If you're a Carbon Black App Control customer (formerly CB Protection), you may
4343
>>> from cbapi.protection.models import FileInstance
4444
>>> from cbapi.protection import CbProtectionAPI
4545
>>> #
46-
>>> # Create our CB Protection API object
46+
>>> # Create our App Control API object
4747
>>> #
4848
>>> p = CbProtectionAPI()
4949
>>> #
@@ -65,7 +65,7 @@ As of version 1.2, CBAPI also supports Carbon Black Cloud Endpoint Standard (for
6565

6666
>>> from cbapi.psc.defense import *
6767
>>> #
68-
>>> # Create our CB Defense API object
68+
>>> # Create our Cloud Endpoint Standard API object
6969
>>> #
7070
>>> p = CbDefenseAPI()
7171
>>> #
@@ -116,7 +116,7 @@ Major Features
116116
API Credentials
117117
---------------
118118

119-
CBAPI version 0.9.0 enforces the use of credential files.
119+
CBAPI version 0.9.0 enforces the use of credential files.
120120

121121
In order to perform any queries via the API, you will need to get the API token for your CB user. See the documentation
122122
on the Developer Network website on how to acquire the API token for
@@ -130,13 +130,15 @@ Once you acquire your API token, place it in one of the default credentials file
130130
* ``~/.carbonblack/``
131131
* ``/current_working_directory/.carbonblack/``
132132

133-
For distinction between credentials of different Carbon Black products, use the following naming convention for your credentials files:
133+
For distinction between credentials of different Carbon Black products, use the following naming convention for your
134+
credentials files:
134135

135136
* ``credentials.psc`` for Carbon Black Cloud Endpoint Standard, Audit & Remediation, and Enterprise EDR (CB Defense, CB LiveOps, and CB ThreatHunter)
136137
* ``credentials.response`` for Carbon Black EDR (CB Response)
137138
* ``credentials.protection`` for Carbon Black App Control (CB Protection)
138139

139-
For example, if you use a Carbon Black Cloud product, you should have created a credentials file in one of these locations:
140+
For example, if you use a Carbon Black Cloud product, you should have created a credentials file in one of these
141+
locations:
140142

141143
* ``/etc/carbonblack/credentials.psc``
142144
* ``~/.carbonblack/credentials.psc``
@@ -188,8 +190,8 @@ The latest CBAPI for Python supports specifying API credentials in the following
188190
The `CBAPI_URL` envar holds the FQDN of the target, an EDR (CbR), CBD, or CbD/Carbon Black Cloud server specified just as they are in the
189191
configuration file format specified above.
190192

191-
The optional `CBAPI_SSL_VERIFY` envar can be used to control SSL validation(True/False or 0/1), which will default to ON when
192-
not explicitly set by the user.
193+
The optional `CBAPI_SSL_VERIFY` envar can be used to control SSL validation(True/False or 0/1), which will default to
194+
ON when not explicitly set by the user.
193195

194196
For environments where complex outbound network filters and proxy configurations are used (eg. anything other than
195197
an unauthenticated or basic password authenticated proxy) a prepared `requests.Session` object may be supplied as a
@@ -239,7 +241,7 @@ API Documentation
239241
-----------------
240242

241243
Once you have read the User Guide, you can view `examples on GitHub <https://github.com/carbonblack/cbapi-python/tree/master/examples>`_
242-
or try writing code of your own. You can use the full API documentation below to see all the methods available in CBAPI
244+
or try writing code of your own. You can use the full API documentation below to see all the methods available in CBAPI
243245
and unlock the full functionality of the SDK.
244246

245247
.. toctree::

docs/installation.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ https://www.python.org/ftp/python/3.6.4/python-3.6.4-amd64.exe.
3939
:alt: Windows installation options showing "Add python.exe to path"
4040
:align: right
4141

42-
Ensure that the "Add Python to PATH" option is
43-
checked.
42+
Ensure that the "Add Python to PATH" option is checked.
4443

4544
If for some reason you do not have pip installed, follow the instructions at this
4645
`handy guide <http://docs.python-guide.org/en/latest/starting/installation/>`_.
@@ -75,4 +74,3 @@ Once you have a copy of the source, you can install it in "development" mode int
7574
This will link the version of cbapi-python you checked out into your Python site-packages directory. Any changes you
7675
make to the checked out version of cbapi will be reflected in your local Python installation. This is a good choice
7776
if you are thinking of changing or developing on cbapi itself.
78-

docs/live-response.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CbAPI and Live Response
22
=======================
33

4-
Working with the CB Live Response REST API directly can be difficult. Thankfully, just like the rest of Carbon
4+
Working with the Live Response REST API directly can be difficult. Thankfully, just like the rest of Carbon
55
Black's REST APIs, cbapi provides Pythonic APIs to make working with the Live Response API much easier.
66

77
In addition to easy-to-use APIs to call into Live Response, cbapi also provides a "job-based" interface that allows
@@ -92,4 +92,3 @@ back from the endpoint, and submit the ``.run()`` method to the Live Response Jo
9292

9393
Your script resumes execution immediately after the call to ``.submit_job()``. The job(s) that you've submitted will
9494
be executed in a set of background threads managed by cbapi.
95-

docs/livequery-api.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
.. _livequery_api:
22

33
CB LiveQuery API
4-
===================
4+
================
55

6-
This page documents the public interfaces exposed by cbapi when communicating with
7-
Carbon Black LiveQuery devices.
6+
This page documents the public interfaces exposed by cbapi when communicating with Carbon Black LiveQuery devices.
87

98
Main Interface
109
--------------
@@ -20,9 +19,8 @@ The LiveQuery API is used in two stages: run submission and result retrieval.
2019
Queries
2120
-------
2221

23-
The LiveQuery API uses QueryBuilder instances to construct structured
24-
or unstructured (i.e., raw string) queries. You can either construct these
25-
instances manually, or allow ``CbLiveQueryAPI.select()`` to do it for you:
22+
The LiveQuery API uses QueryBuilder instances to construct structured or unstructured (i.e., raw string) queries.
23+
You can either construct these instances manually, or allow ``CbLiveQueryAPI.select()`` to do it for you:
2624

2725
.. autoclass:: cbapi.psc.livequery.query.QueryBuilder
2826
:members:

0 commit comments

Comments
 (0)