From 7664ed67a4e1077005c8d78b5e51a633ab35b469 Mon Sep 17 00:00:00 2001 From: Sebastien Deschambault Date: Wed, 4 Feb 2026 15:32:12 -0500 Subject: [PATCH] Create guide to list and update identifiers --- docs/docs.json | 3 +- docs/guides/update-identifiers.mdx | 81 ++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 docs/guides/update-identifiers.mdx diff --git a/docs/docs.json b/docs/docs.json index 628ed22..5394f69 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -51,7 +51,8 @@ "guides/credentials-export-domain", "guides/cookie-monitoring", "guides/ioc-feeds", - "guides/threat-flow-report" + "guides/threat-flow-report", + "guides/update-identifiers" ] } ] diff --git a/docs/guides/update-identifiers.mdx b/docs/guides/update-identifiers.mdx new file mode 100644 index 0000000..912cba1 --- /dev/null +++ b/docs/guides/update-identifiers.mdx @@ -0,0 +1,81 @@ +--- +title: 'List and Update Identity Identifiers' +--- +Identifiers (domains, keywords, identities, and other types) can be listed and updated via the Management API. +This guide covers how to list identifiers, retrieve a specific identifier by ID, and update it using the endpoints below. + +## Steps + + + + Use the + [Get Identifiers ](/api-reference/v3/endpoints/identifiers/get-fireworkv3identifiers) + endpoint to retrieve all identifiers. Apply filters to narrow down results to specific identifiers you want to update. + + + + Use the + [Get Identifier ](/api-reference/v3/endpoints/identifiers/get-fireworkv3identifiers-1) + endpoint with the identifier ID to retrieve its complete details and associated data needed to perform the update. + + + + Use the + [Update Asset (Identifier) ](/api-reference/v2/endpoints/identifiers/put-fireworkv2assets) + endpoint to apply the desired changes to each identifier. + + + + +## End-to-end examples + + + + +```python +import time + +from flareio import FlareApiClient + +api_client = FlareApiClient.from_env() + +# 1. List all identifiers +for resp in api_client.scroll( + method="GET", + url="/firework/v3/identifiers/", +): + # Rate limiting (default). + time.sleep(0.25) + + data = resp.json() + items = data.get("items", []) + + for item in items: + # Rate limiting (default). + time.sleep(0.25) + + identifier_id = item.get("id") + + # 2. Get the full identifier by ID + identifier_resp = api_client.get(f"/firework/v3/identifiers/{identifier_id}") + identifier = identifier_resp.json().get("identifier") + + # Rate limiting (default). + time.sleep(0.25) + + # 3. Do the necessary updates to the identifier + api_client.put( + f"/firework/v2/assets/{identifier_id}", + json={ + "name": identifier.get("name", "") + + " (updated)", # Example: update name or other fields + "type": identifier.get("type"), # Required + "data": identifier.get("data"), # Required + # Include other fields from the Identifier schema as needed + }, + ) + print(f"Updated identifier {identifier_id}") +``` + + +