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

Commit b22c3bc

Browse files
authored
[client] remove hardcoded first value in list method when using getAll
1 parent 4dd8af6 commit b22c3bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+15
-109
lines changed

pycti/entities/opencti_attack_pattern.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ def list(self, **kwargs):
256256
get_all = kwargs.get("getAll", False)
257257
with_pagination = kwargs.get("withPagination", False)
258258
with_files = kwargs.get("withFiles", False)
259-
if get_all:
260-
first = 500
261259

262260
self.opencti.app_logger.info(
263261
"Listing Attack-Patterns with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_campaign.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ def list(self, **kwargs):
241241
get_all = kwargs.get("getAll", False)
242242
with_pagination = kwargs.get("withPagination", False)
243243
with_files = kwargs.get("withFiles", False)
244-
if get_all:
245-
first = 100
246244

247245
self.opencti.app_logger.info(
248246
"Listing Campaigns with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_case_incident.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def generate_id_from_data(data):
467467

468468
"""
469469
List Case Incident objects
470-
470+
471471
:param filters: the filters to apply
472472
:param search: the search keyword
473473
:param first: return the first n rows from the after ID (or the beginning if not set)
@@ -486,8 +486,6 @@ def list(self, **kwargs):
486486
get_all = kwargs.get("getAll", False)
487487
with_pagination = kwargs.get("withPagination", False)
488488
with_files = kwargs.get("withFiles", False)
489-
if get_all:
490-
first = 500
491489

492490
self.opencti.app_logger.info(
493491
"Listing Case Incidents with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_case_rfi.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def __init__(self, opencti):
206206
}
207207
... on StixCyberObservable {
208208
observable_value
209-
}
209+
}
210210
... on StixCoreRelationship {
211211
standard_id
212212
spec_version
@@ -417,7 +417,7 @@ def __init__(self, opencti):
417417
}
418418
... on StixCyberObservable {
419419
observable_value
420-
}
420+
}
421421
... on StixCoreRelationship {
422422
standard_id
423423
spec_version
@@ -465,7 +465,7 @@ def generate_id_from_data(data):
465465

466466
"""
467467
List Case Rfi objects
468-
468+
469469
:param filters: the filters to apply
470470
:param search: the search keyword
471471
:param first: return the first n rows from the after ID (or the beginning if not set)
@@ -484,8 +484,6 @@ def list(self, **kwargs):
484484
get_all = kwargs.get("getAll", False)
485485
with_pagination = kwargs.get("withPagination", False)
486486
with_files = kwargs.get("withFiles", False)
487-
if get_all:
488-
first = 500
489487

490488
self.opencti.app_logger.info(
491489
"Listing Case Rfis with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_case_rft.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def __init__(self, opencti):
206206
}
207207
... on StixCyberObservable {
208208
observable_value
209-
}
209+
}
210210
... on StixCoreRelationship {
211211
standard_id
212212
spec_version
@@ -417,7 +417,7 @@ def __init__(self, opencti):
417417
}
418418
... on StixCyberObservable {
419419
observable_value
420-
}
420+
}
421421
... on StixCoreRelationship {
422422
standard_id
423423
spec_version
@@ -465,7 +465,7 @@ def generate_id_from_data(data):
465465

466466
"""
467467
List Case Rft objects
468-
468+
469469
:param filters: the filters to apply
470470
:param search: the search keyword
471471
:param first: return the first n rows from the after ID (or the beginning if not set)
@@ -484,8 +484,6 @@ def list(self, **kwargs):
484484
get_all = kwargs.get("getAll", False)
485485
with_pagination = kwargs.get("withPagination", False)
486486
with_files = kwargs.get("withFiles", False)
487-
if get_all:
488-
first = 500
489487
self.opencti.app_logger.info(
490488
"Listing Case Rfts with filters", {"filters": json.dumps(filters)}
491489
)

pycti/entities/opencti_channel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,6 @@ def list(self, **kwargs):
237237
get_all = kwargs.get("getAll", False)
238238
with_pagination = kwargs.get("withPagination", False)
239239
with_files = kwargs.get("withFiles", False)
240-
if get_all:
241-
first = 100
242240

243241
self.opencti.app_logger.info(
244242
"Listing Channels with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_course_of_action.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ def list(self, **kwargs):
229229
get_all = kwargs.get("getAll", False)
230230
with_pagination = kwargs.get("withPagination", False)
231231
with_files = kwargs.get("withFiles", False)
232-
if get_all:
233-
first = 100
234232

235233
self.opencti.app_logger.info(
236234
"Listing Courses-Of-Action with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_data_component.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ def list(self, **kwargs):
271271
get_all = kwargs.get("getAll", False)
272272
with_pagination = kwargs.get("withPagination", False)
273273
with_files = kwargs.get("withFiles", False)
274-
if get_all:
275-
first = 100
276274

277275
self.opencti.app_logger.info(
278276
"Listing Data-Components with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_data_source.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ def list(self, **kwargs):
229229
get_all = kwargs.get("getAll", False)
230230
with_pagination = kwargs.get("withPagination", False)
231231
with_files = kwargs.get("withFiles", False)
232-
if get_all:
233-
first = 100
234232

235233
self.opencti.app_logger.info(
236234
"Listing Data-Sources with filters", {"filters": json.dumps(filters)}

pycti/entities/opencti_event.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ def list(self, **kwargs):
241241
get_all = kwargs.get("getAll", False)
242242
with_pagination = kwargs.get("withPagination", False)
243243
with_files = kwargs.get("withFiles", False)
244-
if get_all:
245-
first = 100
246244

247245
self.opencti.app_logger.info(
248246
"Listing Events with filters", {"filters": json.dumps(filters)}

0 commit comments

Comments
 (0)