Table of Contents

Interface IApiKey

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Represents an API key with associated metadata.

public interface IApiKey

Properties

AccessLevel

Access level assigned to this API key. Null defaults to Administrator.

AccessLevel? AccessLevel { get; }

Property Value

AccessLevel?

ApiKey

The raw API key value (only populated on creation; otherwise empty).

string ApiKey { get; }

Property Value

string

CreatedAt

When the key was created. Reset when the key is recycled (refreshed).

DateTime? CreatedAt { get; }

Property Value

DateTime?

CreatedBy

User who created this key (identity/display name). Null if not recorded.

string CreatedBy { get; }

Property Value

string

ExpiryDate

Expiry date, or null if no expiry.

DateTime? ExpiryDate { get; }

Property Value

DateTime?

Key

Unique identifier for this API key entry.

string Key { get; }

Property Value

string

LastUsedAt

When the key was last used to authenticate, or null if never used. Reset when the key is recycled (refreshed).

DateTime? LastUsedAt { get; }

Property Value

DateTime?

Name

Human-readable name for this API key.

string Name { get; }

Property Value

string

Roles

Roles assigned to this API key.

string[] Roles { get; }

Property Value

string[]

ScopeOverrides

Scope overrides for this API key.

string[] ScopeOverrides { get; }

Property Value

string[]

SystemScopes

Explicit scopes granted to a system key at creation time. Null/empty for team keys.

string[] SystemScopes { get; }

Property Value

string[]

Tags

System-set key-value tags on this API key. A list (not a map), so a key may repeat. Set only at creation via the service; immutable thereafter and not editable from the UI. Each tag is surfaced as a tag.{Key} claim on the authenticated principal.

IReadOnlyList<Tag> Tags { get; }

Property Value

IReadOnlyList<Tag>

TeamKey

Team that owns this API key. Null for system keys (not bound to a team).

string TeamKey { get; }

Property Value

string