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

Commit 08cebbf

Browse files
committed
[backend/client] renaming
1 parent c5b431f commit 08cebbf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pycti/api/opencti_api_pir.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ class OpenCTIApiPir:
44
def __init__(self, api):
55
self.api = api
66

7-
def add_pir_dependency(self, **kwargs):
7+
def pir_flag_element(self, **kwargs):
88
id = kwargs.get("id", None)
99
input = kwargs.get("input", None)
1010
query = """
11-
mutation PirAddDependency($id: ID!, $input: PirDependencyAddInput!) {
12-
pirAddDependency(id: $id, input: $input)
11+
mutation PirFlagElement($id: ID!, $input: PirFlagElementInput!) {
12+
pirFlagElement(id: $id, input: $input)
1313
}
1414
"""
1515
self.api.query(
@@ -20,12 +20,12 @@ def add_pir_dependency(self, **kwargs):
2020
},
2121
)
2222

23-
def delete_pir_dependency(self, **kwargs):
23+
def pir_unflag_element(self, **kwargs):
2424
id = kwargs.get("id", None)
2525
input = kwargs.get("input", None)
2626
query = """
27-
mutation PirDeleteDependency($id: ID!, $input: PirDependencyDeleteInput!) {
28-
pirDeleteDependency(id: $id, input: $input)
27+
mutation PirUnflagElement($id: ID!, $input: PirUnflagElementInput!) {
28+
pirUnflagElement(id: $id, input: $input)
2929
}
3030
"""
3131
self.api.query(

pycti/utils/opencti_stix2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2484,14 +2484,14 @@ def apply_opencti_operation(self, item, operation):
24842484
self.opencti.stix.merge(id=target_id, object_ids=source_ids)
24852485
elif operation == "patch":
24862486
self.apply_patch(item=item)
2487-
elif operation == "add_pir_dependency":
2487+
elif operation == "pir_flag_element":
24882488
id = item["id"]
24892489
input = item["input"]
2490-
self.opencti.pir.add_pir_dependency(id=id, input=input)
2491-
elif operation == "delete_pir_dependency":
2490+
self.opencti.pir.pir_flag_element(id=id, input=input)
2491+
elif operation == "pir_unflag_element":
24922492
id = item["id"]
24932493
input = item["input"]
2494-
self.opencti.pir.delete_pir_dependency(id=id, input=input)
2494+
self.opencti.pir.pir_unflag_element(id=id, input=input)
24952495
else:
24962496
raise ValueError("Not supported opencti_operation")
24972497

0 commit comments

Comments
 (0)