indicator_get_v1 API Doesn't Return Tags #652
-
Hello! Looking at the IOC apis, specifically the get API, I noticed that the tags element of the IOC is not returned by the API, both in practice and per documentation. This presents a bit of an issue as I'm working on a process that utilizes CI/CD to manage IOCs in our environment. The lack of tags presents an issue as I, the developer, need to be aware of if the IOCs I'm submitting to the API are new or exist and need to be updated, both the create and update APIs require the code to handle duplication and present error messages if you try to create and IOC that already exists. So, to handle this I have a process that creates a hash of the relevant information between my repo and what Crowdstrike is aware of, if there is a change in the description, severity, platforms the hash value will differ from what Crowdstrike knows and what my repo has and I can call the update endpoint instead of the create endpoint (or do nothing if the hash matches). Since the Crowdstrike API doesn't return the tags of the IOC, I can't use those as part of the comparison, this puts me in a situation where I cannot have just the tags on an IOC change, because the code doesn't detect that it is a changed IOC, as far as what the Crowstrike API returns, it isn't a changed IOC. Is there a possibility for the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @mtobias-getty - I've confirmed that tags are not coming back in a I'll follow up shortly (I'm working on confirming if there isn't a method for us to retrieve these another way.) |
Beta Was this translation helpful? Give feedback.
-
Hi @mtobias-getty! You will only get a response back containing the tags branch if there are tags set on the indicator. This should hold true for both the Example import json
from falconpy import IOC
ioc = IOC(client_id="CLIENT_ID_HERE", client_secret="CLIENT_SECRET_HERE")
result = ioc.indicator_combined_v1(filter="value:'1.2.3.4'")["body"]["resources"]
print(json.dumps(result, indent=4)) Which should return you something along the lines of ... [
{
"id": "a9e43608f2dd50138b6REDACTED",
"type": "ipv4",
"value": "1.2.3.4",
"action": "no_action",
"severity": "",
"metadata": {},
"platforms": [
"linux"
],
"tags": [
"JoshTest"
],
"expired": false,
"deleted": false,
"applied_globally": true,
"from_parent": false,
"created_on": "2021-10-22T11:20:04.584121517Z",
"created_by": "REDACTED_CLIENT_ID",
"modified_on": "2022-05-11T16:04:44.847319541Z",
"modified_by": "falconpy@CrowdStrike"
}
] |
Beta Was this translation helpful? Give feedback.
-
Hey @jshcodes, Good news! I was actually incorrect. Upon further testing, and the If anything I might suggest a note be included in the documentation indicating that tags is an optional response from the API depending on if the IOC has tags already or not. Otherwise, thank you very much for your quick response, I think I'm all set! |
Beta Was this translation helpful? Give feedback.
Hi @mtobias-getty!
You will only get a response back containing the tags branch if there are tags set on the indicator. This should hold true for both the
indicator_get_v1
andindicator_combined_v1
operations.Example
Which should return you something along the lines of ...