Skip to main content

setAuditSettings

TenantAuditSettingsWrapper setAuditSettings(TenantAuditSettingsRequestDto)

POST /api/2.0/security/audit/settings/lifetime

Set audit lifetime settings

Sets how long this portal keeps its login history and its audit trail, in days, and returns the pair as it was stored. The caller needs the portal-settings right of a DocSpace administrator plus the audit option of the portal's pricing plan, otherwise the call is answered with 402. Send both numbers inside settings: each has to be between 1 and 180 days, and a value outside that range is refused with 400 without either number being saved, so read the current pair from GET api/2.0/security/audit/settings/lifetime and resend the one that should stay as it is. The call replaces the stored settings rather than merging them, is idempotent, and takes effect at once: the period covered by GET api/2.0/security/audit/events/last and by both audit reports shrinks or grows with it, and events older than the new lifetime stop being reported. The change is itself recorded in the audit trail.

Parameters​

NameInTypeDescriptionNotes
TenantAuditSettingsRequestDtobodyTenantAuditSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The login history and audit trail lifetimes as they were storedTenantAuditSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no settings, or a lifetime is outside the allowed range of 1 to 180 days--
402The portal's pricing plan has no audit option, or the login history and audit trail section is not enabled--
403The caller does not have the portal-settings right of a DocSpace administrator--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

TenantAuditSettingsWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json