v1

latestOpenAPI 3.0.1Apache 2.02026-07-17111176225.7 KB
Archives

post/archives/rules

Request body

rule_idstring

Unique identifier for archive rule

tag_versions_newerinteger

Number of images mapped to the tag that are newer

analysis_age_daysinteger

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_globalboolean

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_atstring date-time
last_updatedstring date-time
max_images_per_accountinteger

This is the maximum number of image analyses an account can have. Can only be set on system_global rules

Example request

{
  "rule_id": "rule_id",
  "max_images_per_account": 5,
  "tag_versions_newer": 0,
  "last_updated": "2000-01-23T04:56:07.000+00:00",
  "created_at": "2000-01-23T04:56:07.000+00:00",
  "selector": {
    "registry": "registry",
    "tag": "tag",
    "repository": "repository"
  },
  "exclude": {
    "expiration_days": 1,
    "selector": {
      "registry": "registry",
      "tag": "tag",
      "repository": "repository"
    }
  },
  "analysis_age_days": 6,
  "system_global": true,
  "transition": "archive"
}

Response

Archive transition rule

rule_idstring

Unique identifier for archive rule

tag_versions_newerinteger

Number of images mapped to the tag that are newer

analysis_age_daysinteger

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_globalboolean

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_atstring date-time
last_updatedstring date-time
max_images_per_accountinteger

This is the maximum number of image analyses an account can have. Can only be set on system_global rules

Example response

{
  "rule_id": "rule_id",
  "max_images_per_account": 5,
  "tag_versions_newer": 0,
  "last_updated": "2000-01-23T04:56:07.000+00:00",
  "created_at": "2000-01-23T04:56:07.000+00:00",
  "selector": {
    "registry": "registry",
    "tag": "tag",
    "repository": "repository"
  },
  "exclude": {
    "expiration_days": 1,
    "selector": {
      "registry": "registry",
      "tag": "tag",
      "repository": "repository"
    }
  },
  "analysis_age_days": 6,
  "system_global": true,
  "transition": "archive"
}