Skip to content

tenant creds docs #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"pages": [
"guides/global-search",
"guides/tenant-events",
"guides/tenant-credentials",
"guides/credentials-export-domain",
"guides/cookie-monitoring",
"guides/threat-flow-report"
Expand Down
63 changes: 63 additions & 0 deletions docs/guides/tenant-credentials.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: 'List Credentials Within a Tenant'
---

Browsing credentials within a tenant is exposed through the
[List Tenant Credentials <Icon icon="code" size={16} />](/api-reference/v2/endpoints/me/get-mefeedcredentials)
API.

This guide explains how to use the tenant feed API perform a full export
of all credentials results.

## Paging

The tenant credentials feed endpoint uses parameters that match the
[Flare standard paging pattern <Icon icon="book" size={16} />](/concepts/paging).

## End-to-End Examples

These are end-to-end examples in various programming languages.

<AccordionGroup>

<Accordion title="Python SDK Example">
```python
import time

from flareio import FlareApiClient


api_client = FlareApiClient.from_env()

last_from: str | None = None
fetched_pages: int = 0

for resp in api_client.scroll(
method="GET",
url="/firework/v2/me/feed/credentials",
params={
"from": last_from,
},
):
# Rate limiting.
time.sleep(1)

resp_data: dict = resp.json()

fetched_pages += 1
num_results: int = len(resp_data["items"])
print(f"Fetched page {fetched_pages} with {num_results} results...")

# Save the last "next" value.
last_from = resp_data.get("next") or last_from

for item in resp_data["items"]:
print(item)

# Note that this endpoint's order is DESC by default, so this would be useful
# only for performing full exports.
print(f"The next execution could resume using {last_from=}.")
```
</Accordion>

</AccordionGroup>