Run Artifact Retention

Apply run-count, age and manual-pin retention rules to artifact groups and total the bytes eligible for deletion.

Custom requests cost 0.04 USDC on Base.

Download example JSON · OpenAPI · Source and usage

Pay with a browser wallet · Open example in checkout

POST a JSON request to /run-artifact-retention/v1/check with an x402 V2 client.

Worked example

Request

{
  "as_of": 500,
  "minimum_newest": 1,
  "keep_seconds": 100,
  "runs": [
    {
      "id": "A1",
      "group": "main",
      "created_at": 200,
      "bytes": 10,
      "pinned": false
    },
    {
      "id": "A2",
      "group": "main",
      "created_at": 300,
      "bytes": 20,
      "pinned": false
    },
    {
      "id": "A3",
      "group": "main",
      "created_at": 400,
      "bytes": 30,
      "pinned": false
    },
    {
      "id": "B1",
      "group": "docs",
      "created_at": 100,
      "bytes": 15,
      "pinned": false
    },
    {
      "id": "A0",
      "group": "main",
      "created_at": 150,
      "bytes": 5,
      "pinned": true
    }
  ]
}

Result

{
  "retained": [
    {
      "id": "A3",
      "reasons": [
        "newest",
        "age"
      ]
    },
    {
      "id": "A0",
      "reasons": [
        "pinned"
      ]
    },
    {
      "id": "B1",
      "reasons": [
        "newest"
      ]
    }
  ],
  "eligible": [
    "A2",
    "A1"
  ],
  "eligible_bytes": 30
}

Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter