Upsert Integration
admin:integrations
Upsert Integration
Create or update the (tenant, provider) row.
Flow:
- Pull existing row (if any) to know which secrets to preserve.
- Merge incoming config with existing secrets (keep-on-omit).
- Validate the merged config against the provider’s Pydantic schema.
- Persist + audit (with redacted before/after — never log secrets).
PUT
Upsert Integration
Autorizzazioni
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parametri del percorso
Corpo
application/json
Body of PUT /admin/integrations/{provider}.
config is validated against the provider schema. Secret fields
can be:
- omitted → keep the existing value (no change)
- empty string "" → explicit removal
- any other string → set/replace
The "omit to keep" behaviour matters: the admin UI receives a redacted row (no plaintext) and the operator usually only edits one field at a time. Without the keep-on-omit rule, the next save would wipe the api key.