AdminApi

interface AdminApi

Methods reserved to instance administrators.

See also

Functions

Link copied to clipboard
abstract suspend fun approvePendingAccount(accountId: String): AdminAccount

Approves the given local account if it is currently pending approval.

Link copied to clipboard
abstract suspend fun assignReportToSelf(reportId: String): AdminReport

Assigns the handling of this report to the current account.

Link copied to clipboard
abstract suspend fun getAccount(accountId: String): AdminAccount?

Gets a specific account with admin-level information.

Link copied to clipboard
abstract suspend fun getAccounts(local: Boolean?, remote: Boolean?, active: Boolean?, pending: Boolean?, disabled: Boolean?, silenced: Boolean?, suspended: Boolean?, staff: Boolean?, domain: String?, username: String?, displayName: String?, email: String?, ip: String?): AdminAccount

Gets a list of accounts matching certain criteria.

Link copied to clipboard
abstract suspend fun getReport(reportId: String): AdminReport?

Gets information about a specific report.

Link copied to clipboard
abstract suspend fun getReports(isResolved: Boolean? = null, accountId: String? = null, targetAccountId: String? = null): List<AdminReport>

Gets a list of reports matching the given criteria.

Link copied to clipboard
abstract suspend fun performAction(accountId: String, action: AccountAction)

Performs an action against an account and logs this action in the moderation history.

Link copied to clipboard
abstract suspend fun reenableAccount(accountId: String): AdminAccount

Re-enable a local account whose login is currently disabled.

Link copied to clipboard
abstract suspend fun rejectPendingAccount(accountId: String): AdminAccount

Rejects the given local account if it is currently pending approval.

Link copied to clipboard
abstract suspend fun reopenReport(reportId: String): AdminReport

Re-opens a currently closed report.

Link copied to clipboard
abstract suspend fun resolveReport(reportId: String): AdminReport

Marks a report as resolved.

Link copied to clipboard
abstract suspend fun unassignReport(reportId: String): AdminReport

Un-assigns a report, so that another account may be assigned to it.

Link copied to clipboard
abstract suspend fun unsilenceAccount(accountId: String): AdminAccount

Unsilence a currently silenced account.

Link copied to clipboard
abstract suspend fun unsuspendAccount(accountId: String): AdminAccount

Unsuspend a currently suspended account.