JFrog · Arazzo Workflow

JFrog Cleanup Stale Artifacts

Version 1.0.0

Run an AQL search for stale artifacts and delete the first match.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArtifactoryCI/CDContainer RegistryDevOpsMLOpsPackage ManagementSecuritySoftware Supply ChainArazzoWorkflows

Provider

jfrog

Workflows

cleanup-stale-artifacts
Find artifacts via AQL and delete the first matching item.
Runs the supplied AQL query, and if at least one artifact is returned deletes the first result by repo and path.
2 steps inputs: aql outputs: deletedPath, deletedRepo
1
search
Execute the AQL search to find candidate artifacts for cleanup.
2
deleteArtifact
Delete the first matched artifact using its repository and path.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: JFrog Cleanup Stale Artifacts
  summary: Run an AQL search for stale artifacts and delete the first match.
  description: >-
    Storage hygiene via Artifactory Query Language. The workflow executes an AQL
    query to find candidate artifacts, then branches: when results are returned
    it deletes the first matched artifact and confirms the deletion, and when no
    results are returned it ends without deleting anything. Every step spells out
    its request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: artifactsStorageApi
  url: ../openapi/jfrog-artifacts-storage-api-openapi.yml
  type: openapi
- name: searchesApi
  url: ../openapi/jfrog-searches-api-openapi.yml
  type: openapi
workflows:
- workflowId: cleanup-stale-artifacts
  summary: Find artifacts via AQL and delete the first matching item.
  description: >-
    Runs the supplied AQL query, and if at least one artifact is returned
    deletes the first result by repo and path.
  inputs:
    type: object
    required:
    - aql
    properties:
      aql:
        type: string
        description: >-
          The AQL query string (e.g.
          items.find({"repo":"my-repo","modified":{"$before":"30d"}})).
  steps:
  - stepId: search
    description: >-
      Execute the AQL search to find candidate artifacts for cleanup.
    operationId: executeAqlSearch
    requestBody:
      contentType: text/plain
      payload: $inputs.aql
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      results: $response.body#/results
      firstRepo: $response.body#/results/0/repo
      firstPath: $response.body#/results/0/path
      firstName: $response.body#/results/0/name
    onSuccess:
    - name: hasResults
      type: goto
      stepId: deleteArtifact
      criteria:
      - context: $response.body
        condition: $.results.length > 0
        type: jsonpath
    - name: noResults
      type: end
      criteria:
      - context: $response.body
        condition: $.results.length == 0
        type: jsonpath
  - stepId: deleteArtifact
    description: >-
      Delete the first matched artifact using its repository and path.
    operationId: deleteArtifact
    parameters:
    - name: repoKey
      in: path
      value: $steps.search.outputs.firstRepo
    - name: itemPath
      in: path
      value: $steps.search.outputs.firstPath
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      deletedRepo: $steps.search.outputs.firstRepo
      deletedPath: $steps.search.outputs.firstPath
  outputs:
    deletedRepo: $steps.deleteArtifact.outputs.deletedRepo
    deletedPath: $steps.deleteArtifact.outputs.deletedPath

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/jfrog-cleanup-stale-artifacts-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.