This repository was archived by the owner on Dec 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11# coding: utf-8
2- from pycti import OpenCTIApiClient , OpenCTIApiConnector , OpenCTIApiWork
2+ from pycti import OpenCTIApiClient
33
44# Variables
55api_url = "https://demo.opencti.io"
99
1010# OpenCTI initialization
1111opencti_api_client = OpenCTIApiClient (api_url , api_token )
12- opencti_api_connector = OpenCTIApiConnector (opencti_api_client )
13- opencti_api_work = OpenCTIApiWork (opencti_api_client )
1412
1513# Create the observable
1614observable = opencti_api_client .stix_cyber_observable .create (
2119)
2220
2321# Get connector id for defined connector name
24- connector_list = opencti_api_connector .list ()
22+ connector_list = opencti_api_client . connector .list ()
2523connector_names = []
2624connector_id = ""
2725for connector in connector_list :
4038 id = observable ["id" ], connector_id = connector_id
4139)
4240# Wait for connector to finish
43- opencti_api_work .wait_for_work_to_finish (work_id )
41+ opencti_api_client . work .wait_for_work_to_finish (work_id )
4442
4543# Read the observable
4644obs = opencti_api_client .stix_cyber_observable .read (id = observable ["id" ])
You can’t perform that action at this time.
0 commit comments