Manage API keys for client access and authentication
| Name | Key Prefix | Permissions | Status | Last Used | Created | Actions |
|---|---|---|---|---|---|---|
|
<%= api_key.name %>
|
<%= api_key.key_prefix %>...
|
<% perms = api_key.permissions || {} %>
<% perms = {} unless perms.is_a?(Hash) %>
<% if perms.any? %>
<% perms.select { |_, v| v }.keys.each do |perm| %>
<%= perm.to_s.humanize %>
<% end %>
<% else %>
None
<% end %>
|
<% if api_key.active_and_valid? %> Active <% elsif !api_key.active %> Revoked <% else %> Expired <% end %> | <% if api_key.last_used_at %> <%= time_ago_in_words(api_key.last_used_at) %> ago <% else %> Never <% end %> | <%= api_key.created_at.strftime("%Y-%m-%d") %> | <% if api_key.active %> <%= button_to admin_api_key_path(api_key), method: :delete, class: "inline-flex items-center gap-1 text-red-600 hover:text-red-900", data: { confirm: "Are you sure you want to revoke this API key?" } do %> Revoke <% end %> <% end %> |
Get started by creating a new API key.