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

CaseRfi.list throws exception when using getAll = True #953

@scott-taubman

Description

@scott-taubman

Description

CaseRfi.list accepts a "getAll" kwarg. When this is set to True, an exception gets raised due to an incorrect key lookup on the result data. There is a lookup of date that appears to intend to be data.

while result["data"]["caseRfis"]["pageInfo"]["hasNextPage"]:
    after = result["date"]["caseRfis"]["pageInfo"]["endCursor"]

Environment

  1. OS (where OpenCTI server runs): N/A
  2. OpenCTI version: 6.7.9
  3. Other environment details: N/A

Reproducible Steps

Steps to create the smallest reproducible scenario:

opencti_client = OpenCTIApiClient(
            URL,
            TOKEN,
            ssl_verify=CERT,
        )
opencti_client.stix2.export_list("Case-Rfi")

The above ultimately tries to call CaseRfi.list with getAll=True, which results in the described exception.

Expected Output

The case RFI data.

Actual Output

Exception raise:

pycti/entities/opencti_case_rfi.py", line 549, in list
    after = result["date"]["caseRfis"]["pageInfo"]["endCursor"]
            ~~~~~~^^^^^^^^
KeyError: 'date'

Additional information

N/A

Metadata

Metadata

Assignees

Labels

buguse for describing something not working as expectedsolveduse to identify issue that has been solved (must be linked to the solving PR)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions