{% extends "base.html" %} {% from "components/ui.html" import page_header, breadcrumb_nav, button, filter_badge %} {% block title %}API Tokens - Admin{% endblock %} {% block content %} {% set breadcrumbs = [ {'text': 'Admin', 'url': url_for('admin.admin_dashboard')}, {'text': 'API Tokens'} ] %} {{ page_header( icon_class='fas fa-key', title_text='API Tokens', subtitle_text='Manage REST API authentication tokens', breadcrumbs=breadcrumbs, actions_html='' ) }}

API Documentation

View the complete REST API documentation at /api/docs

{% for token in tokens %} {% endfor %}
Name User Token Prefix Scopes Status Last Used Actions
{{ token.name }}
{% if token.description %}
{{ token.description }}
{% endif %}
{{ token.user.username }} {{ token.token_prefix }}...
{% for scope in token.scopes.split(',') if token.scopes %} {{ scope.strip() }} {% endfor %}
{% if token.is_active and (not token.expires_at or token.expires_at > now) %} Active {% elif token.expires_at and token.expires_at < now %} Expired {% else %} Inactive {% endif %} {% if token.last_used_at %} {{ token.last_used_at|user_datetime('%Y-%m-%d %H:%M') }}
{{ token.usage_count }} uses
{% else %} Never {% endif %}
{% if not tokens %}

No API tokens created yet

Create your first token to start using the REST API

{% endif %}
{% endblock %}