JFrog Artifactory · Arazzo Workflow

Artifactory AQL Find and Delete Artifact

Version 1.0.0

Run an AQL query to find an artifact, then delete the first match if any.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArtifactsDevOpsCI/CDdocker-registryMavenPackage ManagementRepositoryArazzoWorkflows

Provider

artifactory

Workflows

aql-find-and-delete-artifact
Find artifacts via AQL and delete the first match when one exists.
Executes an AQL query, and when at least one item is returned, deletes the first matching artifact identified by its repo and path.
2 steps inputs: accessToken, aqlQuery outputs: deleteStatus, matchedName
1
runAql
Execute the AQL query to locate candidate artifacts for deletion.
2
deleteMatch
Delete the first matching artifact using the repository and path returned by the AQL query.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Artifactory AQL Find and Delete Artifact
  summary: Run an AQL query to find an artifact, then delete the first match if any.
  description: >-
    A cleanup-by-query flow for JFrog Artifactory. The workflow executes an
    Artifactory Query Language (AQL) query to locate artifacts, branches on
    whether any results were returned, and when a match exists deletes the first
    matching artifact by its repository and path. 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: aqlSearchApi
  url: ../openapi/artifactory-aql-search-api-openapi.yml
  type: openapi
- name: artifactsStorageApi
  url: ../openapi/artifactory-artifacts-storage-api-openapi.yml
  type: openapi
workflows:
- workflowId: aql-find-and-delete-artifact
  summary: Find artifacts via AQL and delete the first match when one exists.
  description: >-
    Executes an AQL query, and when at least one item is returned, deletes the
    first matching artifact identified by its repo and path.
  inputs:
    type: object
    required:
    - accessToken
    - aqlQuery
    properties:
      accessToken:
        type: string
        description: Bearer access token for authenticating with Artifactory.
      aqlQuery:
        type: string
        description: >-
          The AQL query string to execute (e.g.
          items.find({"repo":"libs-release-local","name":{"$match":"*.tmp"}})).
  steps:
  - stepId: runAql
    description: >-
      Execute the AQL query to locate candidate artifacts for deletion.
    operationId: executeAqlQuery
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    requestBody:
      contentType: text/plain
      payload: $inputs.aqlQuery
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedRepo: $response.body#/results/0/repo
      matchedPath: $response.body#/results/0/path
      matchedName: $response.body#/results/0/name
    onSuccess:
    - name: hasMatch
      type: goto
      stepId: deleteMatch
      criteria:
      - context: $response.body
        condition: $.results.length > 0
        type: jsonpath
    - name: noMatch
      type: end
      criteria:
      - context: $response.body
        condition: $.results.length == 0
        type: jsonpath
  - stepId: deleteMatch
    description: >-
      Delete the first matching artifact using the repository and path returned
      by the AQL query.
    operationId: deleteArtifact
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: repoKey
      in: path
      value: $steps.runAql.outputs.matchedRepo
    - name: itemPath
      in: path
      value: $steps.runAql.outputs.matchedPath
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      deleteStatus: $statusCode
  outputs:
    matchedName: $steps.runAql.outputs.matchedName
    deleteStatus: $steps.deleteMatch.outputs.deleteStatus

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/artifactory-aql-find-and-delete-artifact-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.