Skip to content

Commit 77c8575

Browse files
authored
Remove references to Carbon Black Cloud (#325)
* Marked references to CBC or PSC as deprecated. * Removing doc table of content * added changelog for the doc update
1 parent 4722931 commit 77c8575

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+103
-400
lines changed

.readthedocs.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
14+
# Build documentation in the docs/ directory with Sphinx
15+
sphinx:
16+
configuration: docs/conf.py
17+
builder: dirhtml
18+
# fail_on_warning: true
19+
20+
# If using Sphinx, optionally build your docs in additional formats, such as PDF
21+
formats:
22+
- pdf
23+
- epub
24+
25+
# Optionally declare the Python requirements required to build your docs
26+
python:
27+
install:
28+
- requirements: docs/requirements.txt
29+
- method: setuptools
30+
path: .

docs/changelog.rst

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ CbAPI Changelog
22
===============
33
.. top-of-changelog (DO NOT REMOVE THIS COMMENT)
44
5+
Documentation - Release Feb 14, 2023
6+
------------------------------------
7+
8+
Updates
9+
* Removed references to and documentation about Carbon Black Cloud. CBAPI (this SDK) is not maintained for Carbon Black Cloud.
10+
11+
Users of Carbon Black Cloud must transition to the Carbon Black Cloud Python SDK. Please see
12+
`Carbon Black Cloud Python SDK on the Developer Network <https://developer.carbonblack.com/reference/carbon-black-cloud/integrations/python-sdk>`_
13+
for details.
14+
515
CbAPI 1.7.10 - Release Feb 1, 2023
616
------------------------------------
717

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#
6969
# This is also used if you do content translation via gettext catalogs.
7070
# Usually you set "language" from the command line for these cases.
71-
language = None
71+
# language = None
7272

7373
# There are two options for replacing |today|: either, you set today to some
7474
# non-false value, then it is used:
@@ -299,4 +299,4 @@
299299

300300

301301
def setup(app):
302-
app.add_stylesheet('css/custom.css')
302+
app.add_css_file('css/custom.css')

docs/defense-api.rst

+7-28
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,12 @@
11
.. _defense_api:
22

3-
Cloud Endpoint Standard API
4-
===========================
3+
Cloud Endpoint Standard API - DEPRECATED
4+
========================================
55

6-
This page documents the public interfaces exposed by cbapi when communicating with a Cloud Endpoint Standard server.
6+
Users of Carbon Black Cloud must transition to the Carbon Black Cloud Python SDK.
77

8-
Main Interface
9-
--------------
8+
Please see
9+
`Carbon Black Cloud Python SDK on the Developer Network <https://developer.carbonblack.com/reference/carbon-black-cloud/integrations/python-sdk>`_
10+
for details.
1011

11-
To use cbapi with VMware Carbon Black Cloud Endpoint Standard, you will be using the CBDefenseAPI.
12-
The CBDefenseAPI object then exposes two main methods to select data on the Carbon Black server:
13-
14-
.. autoclass:: cbapi.psc.defense.rest_api.CbDefenseAPI
15-
:members:
16-
:inherited-members:
17-
18-
.. :automethod:: select
19-
.. :automethod:: create
20-
21-
Queries
22-
-------
23-
24-
.. autoclass:: cbapi.psc.defense.rest_api.Query
25-
:members:
26-
27-
28-
Models
29-
------
30-
31-
.. automodule:: cbapi.psc.defense.models
32-
:members:
33-
:undoc-members:
12+
CBAPI is not maintained for Carbon Black Cloud.

docs/getting-started.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ cbapi strongly discourages embedding credentials in individual scripts. Instead,
2525
EDR (CB Response) or App Control (CB Protection) servers inside the API credential file and select which "profile" you would like to use
2626
at runtime.
2727

28-
To create the initial credential file, a simple-to-use script is provided. Just run the ``cbapi-response``,
29-
``cbapi-protection``, or ``cbapi-psc`` script with the ``configure`` argument. On Mac OS X and Linux::
28+
To create the initial credential file, a simple-to-use script is provided. Just run the ``cbapi-response`` or
29+
``cbapi-protection`` script with the ``configure`` argument. On Mac OS X and Linux::
3030

3131
$ cbapi-response configure
3232

@@ -37,9 +37,6 @@ Alternatively, if you're using Windows (change ``c:\python27`` if Python is inst
3737
This configuration script will walk you through entering your API credentials and will save them to your current user's
3838
credential file location, which is located in the ``.carbonblack`` directory in your user's home directory.
3939

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.
42-
4340
Your First Query
4441
----------------
4542

docs/index.rst

-4
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,6 @@ and unlock the full functionality of the SDK.
228228

229229
response-api
230230
protection-api
231-
defense-api
232-
threathunter-api
233-
psc-api
234-
livequery-api
235231
exceptions
236232

237233
Indices and tables

docs/livequery-api.rst

+7-42
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,12 @@
11
.. _livequery_api:
22

3-
CB LiveQuery API
4-
================
3+
CB LiveQuery API - DEPRECATED
4+
=============================
55

6-
This page documents the public interfaces exposed by cbapi when communicating with Carbon Black LiveQuery devices.
6+
Users of Carbon Black Cloud must transition to the Carbon Black Cloud Python SDK.
77

8-
Main Interface
9-
--------------
10-
11-
To use cbapi with Carbon Black LiveQuery, you use CbLiveQueryAPI objects.
12-
13-
The LiveQuery API is used in two stages: run submission and result retrieval.
14-
15-
.. autoclass:: cbapi.psc.livequery.rest_api.CbLiveQueryAPI
16-
:members:
17-
:inherited-members:
18-
19-
Queries
20-
-------
21-
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:
24-
25-
.. autoclass:: cbapi.psc.livequery.query.QueryBuilder
26-
:members:
27-
:inherited-members:
28-
29-
.. autoclass:: cbapi.psc.livequery.query.RunQuery
30-
:members:
31-
:inherited-members:
32-
33-
.. autoclass:: cbapi.psc.livequery.models.ResultQuery
34-
:members:
35-
:inherited-members:
36-
37-
Models
38-
------
39-
40-
.. autoclass:: cbapi.psc.livequery.models.Run
41-
:members:
42-
:inherited-members:
43-
44-
.. autoclass:: cbapi.psc.livequery.models.Result
45-
:members:
46-
:inherited-members:
8+
Please see
9+
`Carbon Black Cloud Python SDK on the Developer Network <https://developer.carbonblack.com/reference/carbon-black-cloud/integrations/python-sdk>`_
10+
for details.
4711

12+
CBAPI is not maintained for Carbon Black Cloud.

docs/livequery-examples.rst

+7-112
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,10 @@
1-
CB LiveQuery API Examples
2-
=========================
1+
CB LiveQuery API Examples - DEPRECATED
2+
======================================
33

4-
Let's cover a few example functions that our LiveQuery Python bindings enable. To begin, we need to import the
5-
relevant libraries::
4+
Users of Carbon Black Cloud must transition to the Carbon Black Cloud Python SDK.
65

7-
>>> import sys
8-
>>> from cbapi.psc.livequery import CbLiveQueryAPI
9-
>>> from cbapi.psc.livequery.models import Run, Result
6+
Please see
7+
`Carbon Black Cloud Python SDK on the Developer Network <https://developer.carbonblack.com/reference/carbon-black-cloud/integrations/python-sdk>`_
8+
for details.
109

11-
12-
Now that we've imported the necessary libraries, we can perform some queries on our endpoints.
13-
14-
Create a Query Run
15-
----------------------------------
16-
17-
Let's create a Query Run. First, we specify which profile to use for authentication from our credentials.psc file and
18-
create the LiveQuery object.
19-
20-
>>> profile = "default'
21-
>>> cb = CbLiveQueryAPI(profile=profile)
22-
23-
Now, we specify the SQL query that we want to run, name of the run, device IDs, and device types.
24-
25-
>>> sql = 'select * from logged_in_users;'
26-
>>> name_of_run = 'Selecting all logged in users'
27-
>>> device_ids = '1234567'
28-
>>> device_types = 'WINDOWS'
29-
30-
Now, we create a query and add these values to it.
31-
32-
>>> query = cb.query(sql)
33-
>>> query.name(name_of_run)
34-
>>> query.device_ids(device_ids)
35-
>>> query.device_types(device_types)
36-
37-
Finally, we submit the query and print the results.
38-
39-
>>> run = query.submit()
40-
>>> print(run)
41-
42-
This query should return all logged in Windows endpoints with a ``device_id`` of ``1234567``.
43-
44-
The same query can be executed with the example script
45-
`manage_run.py <https://github.com/carbonblack/cbapi-python/blob/master/examples/livequery/manage_run.py>`_. ::
46-
47-
python manage_run.py --profile default create --sql 'select * from logged_in_users;' --name 'Selecting all logged in users' --device_ids '1234567' --device_types 'WINDOWS'
48-
49-
Other possible arguments to ``manage_run.py`` include ``--notify`` and ``--policy_ids``.
50-
51-
Get Query Run Status
52-
---------------------
53-
54-
Now that we've created a Query Run, let's check the status. If we haven't already authenticated with a credentials
55-
profile, we begin by specifying which profile to authenticate with.
56-
57-
>>> profile = 'default'
58-
>>> cb = CbLiveQueryAPI(profile=profile)
59-
60-
Next, we select the run with the unique run ID.
61-
62-
>>> run_id = 'a4oh4fqtmrr8uxrdj6mm0mbjsyhdhhvz'
63-
>>> run = cb.select(Run, run_id)
64-
>>> print(run)
65-
66-
This can also be accomplished with the example script
67-
`manage_run.py <https://github.com/carbonblack/cbapi-python/blob/master/examples/livequery/manage_run.py>`_::
68-
69-
python manage_run.py --profile default --id a4oh4fqtmrr8uxrdj6mm0mbjsyhdhhvz
70-
71-
In addition, you can specify which order you want results returned. To change from the default ascending order, use
72-
the flag ``-d`` or ``--descending_results``::
73-
74-
python manage_run.py --profile default --id a4oh4fqtmrr8uxrdj6mm0mbjsyhdhhvz --descending_results
75-
76-
Get Query Run Results
77-
---------------------
78-
79-
Let's view the results of a run. If we haven't already authenticated, we must start with that.
80-
81-
>>> profile = 'default'
82-
>>> cb = CbLiveQueryAPI(profile=profile)
83-
84-
To view the results of a run, we must specify the run ID.
85-
86-
>>> run_id = 'a4oh4fqtmrr8uxrdj6mm0mbjsyhdhhvz'
87-
>>> results = cb.select(Result).run_id(run_id)
88-
89-
Finally, we print the results.
90-
91-
>>> for result in results:
92-
... print(result)
93-
94-
Results can be narrowed down with the following criteria::
95-
96-
device_ids
97-
status
98-
99-
Examples of using these criteria are below::
100-
101-
>>> device_id = '1234567'
102-
>>> results.criteria(device_id=device_id)
103-
>>> status = 'matched'
104-
>>> results.criteria(status=status)
105-
106-
Finally, we print the results.
107-
108-
>>> for result in results:
109-
... print(result)
110-
111-
112-
You can also retrieve run results with the example script
113-
`run_search.py <https://github.com/carbonblack/cbapi-python/blob/master/examples/livequery/run_search.py>`_::
114-
115-
python run_search.py --profile default --id a4oh4fqtmrr8uxrdj6mm0mbjsyhdhhvz --device_ids '1234567' --status 'matched'
10+
CBAPI is not maintained for Carbon Black Cloud.

0 commit comments

Comments
 (0)