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

Commit 5b472db

Browse files
author
peritz
committed
Allow customAttributes for listing capabilities
1 parent 0c2c466 commit 5b472db

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

pycti/entities/opencti_capability.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@ def __init__(self, opencti):
1818
attribute_order
1919
"""
2020

21-
def list(self) -> List[Dict]:
22-
"""Lists all capabilities available on the platform"""
21+
def list(self, **kwargs) -> List[Dict]:
22+
"""Lists all capabilities available on the platform
23+
24+
:param customAttributes: Custom attributes to retrieve from the GraphQL
25+
query.
26+
:type customAttributes: str, optional
27+
:return: List of capabilities
28+
:rtype: List[Dict]
29+
"""
30+
customAttributes = kwargs.get("customAttributes")
2331
self.opencti.admin_logger.info("Listing capabilities")
2432
query = (
2533
"""
@@ -28,7 +36,8 @@ def list(self) -> List[Dict]:
2836
edges {
2937
node {
3038
"""
31-
+ self.properties
39+
+ (self.properties if customAttributes is None
40+
else customAttributes)
3241
+ """
3342
}
3443
}

0 commit comments

Comments
 (0)