Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit e3827ba

Browse files
committed
[client] remove deprecated API from examples (now in tests)
1 parent a722265 commit e3827ba

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

examples/promote_observable_to_indicator.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,10 @@
99
# OpenCTI initialization
1010
opencti_api_client = OpenCTIApiClient(api_url, api_token)
1111

12-
# DEPRECATED >=6.2 & <6.5. Use `promote_to_indicator_v2` instead
13-
obs1 = opencti_api_client.stix_cyber_observable.create(
14-
simple_observable_key="IPv4-Addr.value", simple_observable_value="55.55.55.55"
15-
)
16-
observable = opencti_api_client.stix_cyber_observable.promote_to_indicator(
17-
id=obs1.get("id")
18-
)
19-
print("promoted observable, original observable is", observable)
20-
21-
# Please use promote_to_indicator_v2
22-
obs2 = opencti_api_client.stix_cyber_observable.create(
12+
obs = opencti_api_client.stix_cyber_observable.create(
2313
simple_observable_key="IPv4-Addr.value", simple_observable_value="55.55.55.99"
2414
)
2515
indicator = opencti_api_client.stix_cyber_observable.promote_to_indicator_v2(
26-
id=obs2.get("id")
16+
id=obs.get("id")
2717
)
28-
print("promoted observable, indicator is", indicator)
18+
print("promoted observable, new indicator is", indicator)

0 commit comments

Comments
 (0)