For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Get started
    • Overview
    • Onboarding
    • Get started
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • AgentControl
    • AgentControl
    • Manage AgentControl
  • Feature flags
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
    • Contexts
      • An introduction to contexts
      • The Contexts list
      • Context kinds
        • Viewing context kinds
        • Creating and editing context kinds
        • Archiving context kinds
      • Context attributes
      • Multi-contexts
      • Anonymous contexts
    • Segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
    • Applications and app versions
    • Change history
    • Restoring previous flag versions
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • Observability metrics
    • Product analytics events
    • LLM observability
    • Alerts
    • Dashboards
    • Service map
    • Vega for auto-remediation
    • Observability MCP server
    • Search specification
    • Observability settings
    • Observability integrations
  • Experimentation
    • Experimentation
    • Experiment metric types
    • Experiment configuration
    • Managing experiments
    • Analyzing experiments
    • Multi-armed bandits
    • Holdouts
  • Metrics and events
    • Metrics in LaunchDarkly
    • Creating metrics
    • Metric groups
    • Events
    • Autogenerated metrics
  • Warehouse native
    • Warehouse native metrics
    • Setting up external warehouses
    • Creating experiments using warehouse native metrics
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Feature previews
    • Billing and usage
    • Changelog
Sign inTry it free
LogoLogo
On this page
  • Archive context kinds
  • Archive the user context kind
  • Restore archived context kinds
Feature flagsContextsContext kinds

Archiving context kinds

Was this page helpful?
Previous

Context attributes

Next
Built with

This topic explains how to archive and restore archived context kinds.

Archive context kinds

Archiving a context kind makes it unavailable for flag and segment targeting and unavailable for use in experiments.

To archive a context kind:

  1. Navigate to the Contexts list.
  2. Click the gear icon on the right. The context kinds list appears.
  3. Click the three-dotoverflow menu icon next to the context kind you want to archive. The “Edit context kind” dialog appears.
  4. Click Archive.

The context kind is now hidden from the contexts kinds list and is not available in flag and segment targeting rules.

Archive the user context kind

If you need to, you can archive the user context kind. The process for doing so is slightly different than archiving other context kinds.

  1. In the left sidebar, click Code. The CodeControl menu appears.
  2. Click Contexts.
  3. Click the gear icon on the right. The context kinds list appears.
  4. Click the three-dot overflow menu icon next to the user context kind. The “Edit context kind” dialog appears.
  5. Deselect the “Available for experiments and guarded rollouts” checkbox.
  6. Click Save.
  7. Return to the “Edit context kind” dialog for the user context kind. The “Archive” option is now enabled.

Restore archived context kinds

To restore an archived context kind:

  1. In the left sidebar, click Code. The CodeControl menu appears.
  2. Click Contexts.
  3. Click the gear icon on the right. The context kinds list appears.
  4. Check the Show archived context kinds checkbox at the top of the context kinds list.
  5. Click the three-dot overflow menu icon next to the context kind you want to restore. The “Edit context kind” dialog appears.
  6. Click Restore.

The context kind displays on the context kinds list and is available for targeting.

You can also use the REST API: Create or update context kind