restoreTenant
Since pyck v0.27.0
Restore a previously disabled tenant by clearing its deleted_at flag. An optional input.expiresAt overrides the tenant’s prior expiry; when omitted, the prior expiry persists, which can re-disable the tenant on the next tenant-expiry-check sweep if the value is already in the past.
The target tenant is named by input.tenantId. Only a tenant whose registration finished (status done) can be restored.
System caller required (PYCK_SERVICE_TOKEN): restore is an operator action, so an admin (the tenant’s own or one holding ROLE_ADMIN through a cross-tenant grant) is refused.
Served by: management
Arguments
Section titled “Arguments”| Name | Type | Default | Description |
|---|---|---|---|
input |
RestoreTenantInput! |
Returns
Section titled “Returns”Example
Section titled “Example”Manually restores a previously disabled tenant by clearing its deleted_at flag via the RestoreTenantWorkflow. System role required. Only a tenant whose registration finished can be restored. Returns an error when the tenant does not exist; idempotent on already-active tenants.
mutation RestoreTenant($input: RestoreTenantInput!) { restoreTenant(input: $input) { success }}Variables
{ "input": { "expiresAt": "<RFC3339 timestamp, omit to keep existing expiry>", "tenantId": "<tenant ID>" }}