Cannot read `x_opencti_workflow_id` from entity
Description
When using vulnerability.read, I cannot return the x_opencti_workflow_id. Instead it errors with {'name': 'GRAPHQL_VALIDATION_FAILED', 'error_message': 'Cannot query field "x_opencti_workflow_id" on type "Vulnerability". Did you mean "x_opencti_stix_ids"?'}
Environment
OpenCTI version: 6.5.3 pycti version: 6.3.4
Reproducible Steps
Steps to create the smallest reproducible scenario:
x_opencti_workflow_id = self._client.api.vulnerability.read(customAttributes="x_opencti_workflow_id", id=octi_vuln_data['id'], json_logging=False)
Expected Output
Return x_opencti_workflow_id
Actual Output
{'name': 'GRAPHQL_VALIDATION_FAILED', 'error_message': 'Cannot query field "x_opencti_workflow_id" on type "Vulnerability". Did you mean "x_opencti_stix_ids"?'}
Hello, in current version of OpenCTI there is no field "x_opencti_workflow_id" thats is exposed in the graphQL API for vulnerability, so the python client cannot query it.
What is avalaible is the current status of vulnerability, so you can get the status id by using:
vulnerability.read(customAttributes="status{id template{name}}", id="xxxx", json_logging=False)
Does that solve your issue @NathanC-TC ?
Sorry for the late response. Finally was able to test this, and yes this works great! Thanks so much.