client-python
client-python copied to clipboard
`first` parameter is not customizable when using the `getAll` option in `list` method
Description
When using the list
method of entities with the getAll
parameter, the first
parameter is overwritten.
For example, trying to run:
reports = opencti_api_client.report.list(
first=200,
withPagination=True,
orderBy="published",
orderMode="desc",
getAll=True,
)
will not fetch the report 200 by 200 since the first
value is overwritten:
https://github.com/OpenCTI-Platform/client-python/blob/1b66a210300505f40dac2b27c2111c333ffc590e/pycti/entities/opencti_report.py#L281-L282
This is the same for the list
method of all entities.
Environment
- OS (where OpenCTI server runs): pycti client
- OpenCTI version: pycti==5.8.7
- Other environment details:
Reproducible Steps
Steps to create the smallest reproducible scenario:
- List entities with the
getAll
parameter and thefirst
parameter - Observe that the
first
parameter has been changed.
Expected Output
I expected to be able to specify the first
and the getAll
parameter.
Actual Output
Number of queries done is not the one expected since the first
parameter has been changed.