{{define "content"}}

{{.Eyebrow}}

{{.Heading}}

{{.Description}}

{{if .APIKey}}
{{if .APIKey.IsActive}}Active{{else}}Revoked{{end}}

{{.APIKey.KeyPrefix}}

{{end}}
{{if .Form.RevealKey}}

Copy this API key now: {{.Form.RevealKey}}

This is the only time the full raw key will be shown. Only the hash and short prefix are stored.

{{end}} {{if .Form.Error}}

{{.Form.Error}}

{{end}}

Key Details

Choose a stable label, minimum permissions, and one scope mode for this key.

{{template "csrf_field" .}}
Permissions
Project rules

Used only for project_allow_list and project_deny_list.

{{if .ProjectChoices}}
{{range .ProjectChoices}} {{end}}
{{else}}

No projects exist yet.

{{end}}
Tag rules

Used only for tag_allow_list and tag_deny_list.

{{if .TagChoices}}
{{range .TagChoices}} {{end}}
{{else}}

No tags exist yet.

{{end}}
Back to API keys
{{if .APIKey}}

Lifecycle

Disabled or expired keys are rejected before any project scope checks happen.

Created: {{.APIKey.CreatedAt.Format "2006-01-02 15:04 UTC"}}

Updated: {{.APIKey.UpdatedAt.Format "2006-01-02 15:04 UTC"}}

Last used: {{if .APIKey.LastUsedAt}}{{.APIKey.LastUsedAt.Format "2006-01-02 15:04 UTC"}}{{else}}Never{{end}}

Expires: {{if .APIKey.ExpiresAt}}{{.APIKey.ExpiresAt.Format "2006-01-02 15:04 UTC"}}{{else}}No expiry{{end}}

{{template "csrf_field" .}}
{{end}}
{{if .APIKey}}

Effective Access Preview

This preview shows the active projects currently reachable after scope mode evaluation.

{{if .AccessibleProjects}}
{{range .AccessibleProjects}}

{{.Name}}

{{.Slug}}

Active

{{if .Description}}{{.Description}}{{else}}No description yet.{{end}}

{{end}}
{{else}}

No active projects currently match this key.

{{end}}

Client API Quick Start

Clients should authenticate with a bearer API key and then discover projects before requesting metadata or downloading an artifact.

Bearer header: Authorization: Bearer {{if .Form.RevealKey}}{{.Form.RevealKey}}{{else}}<paste-api-key>{{end}}

Accessible projects: {{.BaseURL}}/api/v1/projects

curl -H "Authorization: Bearer {{if .Form.RevealKey}}{{.Form.RevealKey}}{{else}}<paste-api-key>{{end}}" \
  {{.BaseURL}}/api/v1/projects
{{if .AccessibleProjects}}
{{range .AccessibleProjects}}

{{.Name}} latest metadata: {{printf "%s/api/v1/projects/%s/releases/latest" $.BaseURL .Slug}}

{{end}}
{{else}}

This key does not currently expose any active projects, so client metadata and download lookups will return no accessible resources.

{{end}}
{{end}} {{end}}