Documentation Index
Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt
Use this file to discover all available pages before exploring further.
Archive flags and segments when they’re no longer needed instead of deleting them.
See Archiving Flags in the reference for details on what happens when you archive, when to archive, and best practices.
Archive a Flag
Archive a flag that’s no longer needed:
curl -X POST "https://flags.confidence.dev/v1/flags/example-flag:archive" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Archive a Segment
Archive a segment that’s no longer needed:
curl -X POST "https://flags.confidence.dev/v1/segments/my-segment:archive" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Verify Archive Status
Check if a flag is archived:
curl -X GET "https://flags.confidence.dev/v1/flags/example-flag" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
The response includes an archived field set to true.
Archive Multiple Resources
Archive multiple flags or segments in sequence:
#!/bin/bash
# Archive multiple flags
for flag in "old-feature" "test-flag" "deprecated-config"; do
curl -X POST "https://flags.confidence.dev/v1/flags/$flag:archive" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
echo "Archived flag: $flag"
done
# Archive multiple segments
for segment in "experiment-1" "experiment-2" "test-segment"; do
curl -X POST "https://flags.confidence.dev/v1/segments/$segment:archive" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
echo "Archived segment: $segment"
done
Find Archival Candidates
List all flags to find archival candidates:
curl -X GET "https://flags.confidence.dev/v1/flags" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
List all segments to find archival candidates:
curl -X GET "https://flags.confidence.dev/v1/segments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Next Steps
After archiving resources:
- Remove feature flag code from your application
- Update documentation to reflect production behavior
- Review analytics from the archived experiment
- Plan next experiments based on learnings