---
title: "GET /archives/rules"
method: GET
path: "/archives/rules"
tags: ["Archives"]
---

# GET /archives/rules

`GET /archives/rules`

## Query parameters

- `system_global` boolean

## Response `200`

Archive transition rules

- AnalysisArchiveTransitionRule[] — Rule set for automatic archiving of system objects and flushing of archived objects (permament delete).
  - `selector` ImageSelector — A set of selection criteria to match an image by a tagged pullstring based on its components, with regex support in each field
    - `registry` string — The registry section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "docker.io"
    - `repository` string — The repository section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "anchore/anchore-engine"
    - `tag` string — The tag-only section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "latest"
  - `rule_id` string — Unique identifier for archive rule
  - `tag_versions_newer` integer — Number of images mapped to the tag that are newer
  - `analysis_age_days` integer — Matches if the analysis is strictly older than this number of days
  - `transition` 'archive' | 'delete', required — The type of transition to make. If "archive", then archive an image from the working set and remove it from the working set. If "delete", then match against archived images and delete from the archive if match.
  - `system_global` boolean — True if the rule applies to all accounts in the system. This is only available to admin users to update/modify, but all users with permission to list rules can see them
  - `created_at` string, date-time
  - `last_updated` string, date-time
  - `exclude` AnalysisArchiveTransitionRuleExclude — Which Images to exclude from auto-archiving logic
    - `selector` ImageSelector — A set of selection criteria to match an image by a tagged pullstring based on its components, with regex support in each field
      - `registry` string — The registry section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "docker.io"
      - `repository` string — The repository section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "anchore/anchore-engine"
      - `tag` string — The tag-only section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "latest"
    - `expiration_days` integer — How long the image selected will be excluded from the archive transition
  - `max_images_per_account` integer — This is the maximum number of image analyses an account can have. Can only be set on system_global rules

## Other responses

- `500` — Internal error

---

[API](https://skmtc.net/anchore/apis/anchore-engine-api-server.md) · [All operations](https://skmtc.net/anchore/apis/anchore-engine-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anchore/anchore-engine-api-server/revisions/afb4f60ab44a/schema)
