Get supported entitiesv1.0.0 · JSON Schema
Returns the PII entity types Presidio Analyzer can detect for the requested language.
1. List Detectable PII Entity Types
An internal diagnostic check queries the Presidio Analyzer sidecar (GET /supportedentities) to inspect the entity labels available for English (en).
Payload details
- Query parameter: Optional
languageISO 639-1 code (for example,"en"). - Response body: JSON array of Presidio entity type strings (
string[]).
Example response
["PERSON", "EMAIL_ADDRESS", "PHONE_NUMBER", "CREDIT_CARD", "IP_ADDRESS", "LOCATION", "DATE_TIME"]Using this example
Returns 200 OK with a JSON array of supported PII entity labels for the requested language.
using BookWorm.Chassis.Utilities.Configurations;using BookWorm.Constants.Aspire;using Refit;
public interface IPresidioAnalyzerMetadata{ [Get("/supportedentities")] Task<string[]> GetSupportedEntitiesAsync( [Query] string? language = "en", CancellationToken cancellationToken = default );}
// DI registration following BookWorm.Chassis PresidioExtensions patternbuilder.Services .AddRefitGeneratedClient<IPresidioAnalyzerMetadata>( settings, Components.Presidio.Analyzer ) .ConfigureHttpClient(client => client.BaseAddress = new(analyzerConnectionString)) .ConfigurePrimaryHttpMessageHandler(() => new SocketsHttpHandler { PooledConnectionLifetime = TimeSpan.FromMinutes(5) } );
// Typed invocationstring[] entities = await analyzerMetadata.GetSupportedEntitiesAsync("en", cancellationToken);1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "title": "GetSupportedEntitiesResponse",
4 "description": "PII entity types supported by Presidio Analyzer for the requested language.",
5 "type": "array",
6 "items": { "type": "string" }
7}
8