cti-python-stix2/docs/guide/TAXIICollection.ipynb

118 lines
4.0 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## TAXIICollection\n",
"\n",
"The TAXIICollection suite contains **TAXIICollectionStore**, **TAXIICollectionSource**, and **TAXIICollectionSink**. **TAXIICollectionStore** for pushing and retrieving STIX content to local/remote TAXII Collection(s). **TAXIICollectionSource** for retrieving STIX content to local/remote TAXII Collection(s). **TAXIICollectionSink** for pushing STIX content to local/remote TAXII Collection(s). Each of the interfaces is designed to be binded to a Collection from the taxii2client library (taxii2client.Collection), where all **TAXIICollection** API calls will be executed through that Collection instance.\n",
"\n",
"A note on TAXII2 searching/filtering of STIX content. TAXII2 server implementations natively support searching on the STIX2 object properties: id, type and version; API requests made to TAXII2 can contain filter arguments for those 3 properties. However, the **TAXIICollection** suite supports searching on all STIX2 common object properties (see **Filters** documentation for full listing). This works simply by augmenting the filtering that is done remotely at the TAXII2 server instance. **TAXIICollection** will seperate any supplied queries into TAXII supported filters and non-supported filters. During a **TAXIICollection** API call, TAXII2 supported filters get inserted into the TAXII2 server request (to be evaluated at the server). The rest of the filters are kept locally and then applied to the STIX2 content that is returned from the TAXII2 server, before being returned from the **TAXIICollection** API call. \n",
"\n",
"### TAXIICollection API\n",
"\n",
"### TAXIICollectionSource\n",
"* **get()** - search/retrieve most current STIX SDO/SRO via its ID\n",
"* **all_versions()** - search/retrieve all versions of STIX SDO/SRO via its id\n",
"* **query()** - search/retrieve STIX SDO/SRO(s) via search filters\n",
"* **add_filters()** - attach filter(s) to the TAXIICollectionSource\n",
"\n",
"### TAXIICollectionSink\n",
"* **add()** - add a set of STIX SDO/SRO to a TAXII Collection endpoint.\n",
"\n",
"### TAXIICollectionStore\n",
"\n",
"(super set of TAXIICollectionSource and TAXIICollectionSink)\n",
"* **get()**\n",
"* **all_versions()**\n",
"* **query()**\n",
"* **add()**\n",
"* **add_filters()**\n",
"\n",
"### TAXIICollection Examples\n",
"\n",
"#### TAXIICollectionSource"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from stix2 import TAXIICollectionSource\n",
"from taxii2client import Collection\n",
"\n",
"# establish TAXII 2 Collection instance\n",
"collection = Collection(\"do we have a TAXII 2 instance anywhere? or Vargass\")\n",
"\n",
"tc_source = TAXIICollectionSource(collection)\n",
"\n",
"# NEED TO BE COMPLETED\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"#### TAXIICollectionSink"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# NEED TO BE COMPLETED"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### TAXIICollectionStore"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# NEED TO BE COMPLETED"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
}