bored-engineer-40110
04/23/2025, 11:04 AMbrief-egg-61061
04/23/2025, 11:04 AMbrief-egg-61061
04/23/2025, 11:04 AM/admin/identities
endpoint allows listing identities, but with limited filtering capabilities: > Lists all [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined. [Ory API Reference](https://www.ory.sh/docs/reference/api) There's also a GitHub issue that discusses the limitations of the current identity filtering capabilities: > Ory has a list identities API which retrieves a list of identities with the option of filtering by a credential type (username, email), but does not allow filtering by ids in a batch. The issue suggests some workarounds: 1. Poll Ory periodically for the list of identities and store them in-memory 2. Use webhooks to keep your data in sync with Ory 3. Make parallel requests to get individual identities (suggested by an Ory team member) For self-hosted Kratos, you might need to implement one of these workarounds or consider extending the API functionality yourself if you need this capability. If you need to retrieve a specific identity and you know its ID, you can use the GetIdentity
endpoint as shown in the Go SDK examples: go getIdentity, r, err := apiClient.IdentityApi.GetIdentity(context.Background(), identityId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FrontendApi.GetIdentity``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } fmt.Fprintf(os.Stdout, "Email for identity with id %v. Traits %v\n", identityId, getIdentity.Traits)