[FR] GraphQL: IOCS
c8y3 opened this issue · comments
c8y3 commented
Enrich the graphQL API with queries and mutations that allow the manipulation of IOCS:
- add query ioc to retrieve an IOC by its ID
- add field iocs on the graphql CaseObject to retrieve the IOCs associated to a case
- add mutation iocCreate to create an IOC
- add mutation iocDelete to delete an IOC
- add mutation iocUpdate to update an IOC
For the required/optional fields of mutations, mimic the existing REST API (https://docs.dfir-iris.org/latest/_static/iris_api_reference_v2.0.4.html):
- /case/ioc/add for mutation iocCreate
- /case/ioc/update/{ioc_id} for mutation iocUpdate
- /case/ioc/delete/{ioc_id} for mutation iocDelete
For the field iocs on CaseObject, the filters available to the table of iocs in the case should first be implemented. Then see whether the remaining fields can be filtered as well. The return type should be a paginated list (decide whether to follow the relay standard for the pagination results or not)
Do not forget to handle permissions correctly.