> For the complete documentation index, see [llms.txt](https://docs.syntho.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.syntho.ai/syntho-api/syntho-rest-api/generators.md).

# Generators

## GET /api/v1/generators/{column\_id}/supported\_types/

> Supported generators for column

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"SupportedGeneratorTypes":{"properties":{"Mockers":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Mockers"},"Mask":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Mask"},"Calculated_column":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Calculated Column"},"Dynamic":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Dynamic"},"Duplicate":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Duplicate"},"Exclude":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Exclude"},"Hash":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Hash"},"Generate":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Generate"}},"title":"SupportedGeneratorTypes","type":"object"},"SupportedGeneratorType":{"properties":{"display_name":{"title":"Display Name","type":"string"},"options":{"$ref":"#/components/schemas/GeneratorTypeOptions"},"fields":{"additionalProperties":{"$ref":"#/components/schemas/GeneratorTypeField"},"title":"Fields","type":"object"}},"required":["display_name","options","fields"],"title":"SupportedGeneratorType","type":"object"},"GeneratorTypeOptions":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"output":{"items":{"$ref":"#/components/schemas/DTypes"},"title":"Output","type":"array"},"suggested":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Suggested"},"numeric_range":{"anyOf":[{"$ref":"#/components/schemas/NumericRange"},{"type":"null"}],"default":null}},"required":["output"],"title":"GeneratorTypeOptions","type":"object"},"DTypes":{"enum":["categorical","continuous","discrete","datetime","bytes","bool","uuid","json","xml","geo","sets","unknown"],"title":"DTypes","type":"string"},"NumericRange":{"properties":{"minimum":{"title":"Minimum","type":"number"},"maximum":{"title":"Maximum","type":"number"}},"required":["minimum","maximum"],"title":"NumericRange","type":"object"},"GeneratorTypeField":{"properties":{"type":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Type"},"default":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Default"},"max_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max Length"},"read_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Read Only"}},"required":["type","default"],"title":"GeneratorTypeField","type":"object"}}},"paths":{"/api/v1/generators/{column_id}/supported_types/":{"get":{"operationId":"generators_supported_types_for_column","description":"Supported generators for column","parameters":[{"in":"path","name":"column_id","schema":{"type":"string"},"required":true},{"in":"query","name":"locale","schema":{"type":"string"},"description":"Locale the generators are described for, the workspace default when not given"}],"tags":["Generators"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedGeneratorTypes"}}},"description":"Success: Supported generators"},"503":{"description":"Message: unable to fetch engine from external service"}}}}}}
```

## GET /api/v1/generators/supported\_types/

> Supported generators

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"SupportedGeneratorTypes":{"properties":{"Mockers":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Mockers"},"Mask":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Mask"},"Calculated_column":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Calculated Column"},"Dynamic":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Dynamic"},"Duplicate":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Duplicate"},"Exclude":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Exclude"},"Hash":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Hash"},"Generate":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SupportedGeneratorType"},"type":"object"},{"type":"null"}],"default":null,"title":"Generate"}},"title":"SupportedGeneratorTypes","type":"object"},"SupportedGeneratorType":{"properties":{"display_name":{"title":"Display Name","type":"string"},"options":{"$ref":"#/components/schemas/GeneratorTypeOptions"},"fields":{"additionalProperties":{"$ref":"#/components/schemas/GeneratorTypeField"},"title":"Fields","type":"object"}},"required":["display_name","options","fields"],"title":"SupportedGeneratorType","type":"object"},"GeneratorTypeOptions":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"output":{"items":{"$ref":"#/components/schemas/DTypes"},"title":"Output","type":"array"},"suggested":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Suggested"},"numeric_range":{"anyOf":[{"$ref":"#/components/schemas/NumericRange"},{"type":"null"}],"default":null}},"required":["output"],"title":"GeneratorTypeOptions","type":"object"},"DTypes":{"enum":["categorical","continuous","discrete","datetime","bytes","bool","uuid","json","xml","geo","sets","unknown"],"title":"DTypes","type":"string"},"NumericRange":{"properties":{"minimum":{"title":"Minimum","type":"number"},"maximum":{"title":"Maximum","type":"number"}},"required":["minimum","maximum"],"title":"NumericRange","type":"object"},"GeneratorTypeField":{"properties":{"type":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Type"},"default":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Default"},"max_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max Length"},"read_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Read Only"}},"required":["type","default"],"title":"GeneratorTypeField","type":"object"}}},"paths":{"/api/v1/generators/supported_types/":{"get":{"operationId":"generators_supported_types_retrieve","description":"Supported generators","tags":["Generators"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedGeneratorTypes"}}},"description":"Success: Supported generators"},"503":{"description":"Message: unable to fetch engine from external service"}}}}}}
```

## POST /api/v1/pii/

> Create a custom PII entity with all of its detection rules. What a text de-identification generator does with the entity is configured on the generator, see its pii\_settings.

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"CreatePIIEntitySchema":{"properties":{"engine_id":{"format":"uuid","title":"Engine Id","type":"string"},"name":{"description":"Name of the entity, stored trimmed and upper case","minLength":1,"title":"Name","type":"string"},"rules":{"items":{"$ref":"#/components/schemas/PIIEntityRuleFieldsSchema"},"maxItems":100,"minItems":1,"title":"Rules","type":"array"}},"required":["engine_id","name","rules"],"title":"CreatePIIEntitySchema","type":"object"},"PIIEntityRuleFieldsSchema":{"properties":{"name":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"expression":{"description":"Regular expression matching the values of the entity","minLength":1,"title":"Expression","type":"string"},"confidence":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":100,"title":"Confidence"},"locale":{"anyOf":[{"$ref":"#/components/schemas/DefaultLocale"},{"type":"null"}],"default":null,"description":"Locale the rule applies to; none for every one"}},"required":["expression"],"title":"PIIEntityRuleFieldsSchema","type":"object"},"DefaultLocale":{"enum":["en","nl","ja","de"],"title":"DefaultLocale","type":"string"},"PIIEntitySchema":{"additionalProperties":false,"properties":{"name":{"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/components/schemas/PIIEntityType"},"default_action":{"$ref":"#/components/schemas/PIIAction"},"default_min_confidence":{"maximum":100,"minimum":0,"title":"Default Min Confidence","type":"integer"},"id":{"format":"uuid","title":"Id","type":"string"},"default_generator":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Default Generator"},"rules":{"items":{"$ref":"#/components/schemas/PIIEntityRule"},"title":"Rules","type":"array"},"detected_with_model":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Detected With Model"},"detected_without_model":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Detected Without Model"}},"required":["name","type","default_action","default_min_confidence","id","rules"],"title":"PIIEntitySchema","type":"object"},"PIIEntityType":{"enum":["SYSTEM","CUSTOM"],"title":"PIIEntityType","type":"string"},"PIIAction":{"enum":["mock","annotate","disable"],"title":"PIIAction","type":"string"},"PIIEntityRule":{"additionalProperties":false,"properties":{"id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"default":null,"title":"Id"},"name":{"minLength":1,"title":"Name","type":"string"},"detection_method":{"anyOf":[{"$ref":"#/components/schemas/DetectionMethod"},{"type":"null"}],"default":"REGEX"},"expression":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Expression"},"confidence":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":100,"title":"Confidence"},"locale":{"anyOf":[{"$ref":"#/components/schemas/DefaultLocale"},{"type":"null"}],"default":null}},"required":["name"],"title":"PIIEntityRule","type":"object"},"DetectionMethod":{"enum":["REGEX","LOOKUP","MODEL","BUILTIN"],"title":"DetectionMethod","type":"string"},"ApplicationMessage":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"title":"Code","type":"string"},"title":{"title":"Title","type":"string"},"body":{"items":{"type":"string"},"title":"Body","type":"array"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"required":["code","title","body"],"title":"ApplicationMessage","type":"object"},"Durability":{"enum":["transient","persistent","temporary"],"title":"Durability","type":"string"},"SystemMessageKind":{"enum":["success","error","warning","info"],"title":"SystemMessageKind","type":"string"},"Display":{"enum":["field","screen","notification"],"title":"Display","type":"string"},"HTTPValidationError":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Body"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"title":"HTTPValidationError","type":"object"}}},"paths":{"/api/v1/pii/":{"post":{"operationId":"pii_create","description":"Create a custom PII entity with all of its detection rules. What a text de-identification generator does with the entity is configured on the generator, see its pii_settings.","tags":["Generators","PII"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePIIEntitySchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PIIEntitySchema"}}},"description":"Success: PII entity created"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationMessage"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationMessage"}}},"description":"An entity with this name exists"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation error"},"503":{"description":"Message: unable to fetch engine from external service"}}}}}}
```

## PUT /api/v1/pii/

> Replace the name and rules of a custom PII entity, keeping its ID. A rule with an id is updated, one without is added, and a rule left out is removed.

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"UpdatePIIEntitySchema":{"properties":{"engine_id":{"format":"uuid","title":"Engine Id","type":"string"},"name":{"description":"Name of the entity, stored trimmed and upper case","minLength":1,"title":"Name","type":"string"},"rules":{"items":{"$ref":"#/components/schemas/UpdatePIIEntityRuleSchema"},"maxItems":100,"minItems":1,"title":"Rules","type":"array"},"id":{"format":"uuid","title":"Id","type":"string"}},"required":["engine_id","name","rules","id"],"title":"UpdatePIIEntitySchema","type":"object"},"UpdatePIIEntityRuleSchema":{"properties":{"name":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"expression":{"description":"Regular expression matching the values of the entity","minLength":1,"title":"Expression","type":"string"},"confidence":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":100,"title":"Confidence"},"locale":{"anyOf":[{"$ref":"#/components/schemas/DefaultLocale"},{"type":"null"}],"default":null,"description":"Locale the rule applies to; none for every one"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"default":null,"title":"Id"}},"required":["expression"],"title":"UpdatePIIEntityRuleSchema","type":"object"},"DefaultLocale":{"enum":["en","nl","ja","de"],"title":"DefaultLocale","type":"string"},"PIIEntitySchema":{"additionalProperties":false,"properties":{"name":{"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/components/schemas/PIIEntityType"},"default_action":{"$ref":"#/components/schemas/PIIAction"},"default_min_confidence":{"maximum":100,"minimum":0,"title":"Default Min Confidence","type":"integer"},"id":{"format":"uuid","title":"Id","type":"string"},"default_generator":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Default Generator"},"rules":{"items":{"$ref":"#/components/schemas/PIIEntityRule"},"title":"Rules","type":"array"},"detected_with_model":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Detected With Model"},"detected_without_model":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Detected Without Model"}},"required":["name","type","default_action","default_min_confidence","id","rules"],"title":"PIIEntitySchema","type":"object"},"PIIEntityType":{"enum":["SYSTEM","CUSTOM"],"title":"PIIEntityType","type":"string"},"PIIAction":{"enum":["mock","annotate","disable"],"title":"PIIAction","type":"string"},"PIIEntityRule":{"additionalProperties":false,"properties":{"id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"default":null,"title":"Id"},"name":{"minLength":1,"title":"Name","type":"string"},"detection_method":{"anyOf":[{"$ref":"#/components/schemas/DetectionMethod"},{"type":"null"}],"default":"REGEX"},"expression":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Expression"},"confidence":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":100,"title":"Confidence"},"locale":{"anyOf":[{"$ref":"#/components/schemas/DefaultLocale"},{"type":"null"}],"default":null}},"required":["name"],"title":"PIIEntityRule","type":"object"},"DetectionMethod":{"enum":["REGEX","LOOKUP","MODEL","BUILTIN"],"title":"DetectionMethod","type":"string"},"ApplicationMessage":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"title":"Code","type":"string"},"title":{"title":"Title","type":"string"},"body":{"items":{"type":"string"},"title":"Body","type":"array"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"required":["code","title","body"],"title":"ApplicationMessage","type":"object"},"Durability":{"enum":["transient","persistent","temporary"],"title":"Durability","type":"string"},"SystemMessageKind":{"enum":["success","error","warning","info"],"title":"SystemMessageKind","type":"string"},"Display":{"enum":["field","screen","notification"],"title":"Display","type":"string"},"HTTPValidationError":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Body"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"title":"HTTPValidationError","type":"object"}}},"paths":{"/api/v1/pii/":{"put":{"operationId":"pii_update","description":"Replace the name and rules of a custom PII entity, keeping its ID. A rule with an id is updated, one without is added, and a rule left out is removed.","tags":["Generators","PII"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePIIEntitySchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PIIEntitySchema"}}},"description":"Success: PII entity updated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationMessage"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationMessage"}}},"description":"An entity with this name exists"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation error"},"503":{"description":"Message: unable to fetch engine from external service"}}}}}}
```

## DELETE /api/v1/pii/{pii\_id}/

> Delete a custom PII entity with its rules, the generator settings and the replacement links naming it. While generators still configure it, the deletion is held back and the affected columns are returned, unless force is set.

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"PIIEntityColumnsInUse":{"properties":{"columns":{"anyOf":[{"items":{"$ref":"#/components/schemas/AffectedColumnSchema"},"type":"array"},{"type":"null"}],"default":null,"title":"Columns"}},"title":"PIIEntityColumnsInUse","type":"object"},"AffectedColumnSchema":{"properties":{"id":{"format":"uuid","title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"table_name":{"title":"Table Name","type":"string"},"database_name":{"title":"Database Name","type":"string"}},"required":["id","name","table_name","database_name"],"title":"AffectedColumnSchema","type":"object"},"ApplicationMessage":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"title":"Code","type":"string"},"title":{"title":"Title","type":"string"},"body":{"items":{"type":"string"},"title":"Body","type":"array"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"required":["code","title","body"],"title":"ApplicationMessage","type":"object"},"Durability":{"enum":["transient","persistent","temporary"],"title":"Durability","type":"string"},"SystemMessageKind":{"enum":["success","error","warning","info"],"title":"SystemMessageKind","type":"string"},"Display":{"enum":["field","screen","notification"],"title":"Display","type":"string"},"HTTPValidationError":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Body"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"title":"HTTPValidationError","type":"object"}}},"paths":{"/api/v1/pii/{pii_id}/":{"delete":{"operationId":"pii_destroy","description":"Delete a custom PII entity with its rules, the generator settings and the replacement links naming it. While generators still configure it, the deletion is held back and the affected columns are returned, unless force is set.","parameters":[{"in":"query","name":"engine_id","schema":{"type":"string"},"required":true},{"in":"query","name":"force","schema":{"type":"boolean"}},{"in":"path","name":"pii_id","schema":{"type":"string"},"required":true}],"tags":["Generators","PII"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PIIEntityColumnsInUse"}}},"description":"Not deleted: generators of these columns configure the entity"},"204":{"description":"Success"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationMessage"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation error"},"503":{"description":"Message: unable to fetch engine from external service"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.syntho.ai/syntho-api/syntho-rest-api/generators.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
