[ ] I added/update the relevant documentation (either on github or on notion)
[ ] Where necessary I refactored code to improve the overall quality
Further comments
I guess it's a programming oversight not to allow read using from_or_to_id since it works just by adding this condition.
I'm open to adding a test case for this change but I wasn't able to find a proper example with fixtures.
How to test
Get the id of an element with a relationship from your OpenCTI
import pycti
OPENCTI_URL = "http://localhost:8080"
OPENCTI_TOKEN = "<token>"
opencti_client = pycti.OpenCTIApiClient(OPENCTI_URL, OPENCTI_TOKEN)
toto = opencti_client.stix_core_relationship.read(
fromOrToId="<id of an element with a relationship>"
)
print(toto)
Proposed changes
Checklist
Further comments
I guess it's a programming oversight not to allow read using from_or_to_id since it works just by adding this condition. I'm open to adding a test case for this change but I wasn't able to find a proper example with fixtures.
How to test