openapi: 3.1.0 info: title: JFrog Artifactory Query Language (AQL) AQL Search Build Management API description: Advanced search API using Artifactory Query Language (AQL), a SQL-like query language for finding and filtering artifacts, builds, and entries in JFrog Artifactory. AQL provides powerful querying capabilities including domain queries, field filtering, sorting, limiting, and inclusion of related entities. version: 7.x contact: name: JFrog Support url: https://jfrog.com/support/ email: support@jfrog.com license: name: Proprietary url: https://jfrog.com/terms-of-service/ termsOfService: https://jfrog.com/terms-of-service/ servers: - url: https://{server}/artifactory description: JFrog Artifactory Server variables: server: default: myserver.jfrog.io description: Your JFrog Platform deployment URL security: - BearerAuth: [] - ApiKeyAuth: [] - BasicAuth: [] tags: - name: Build Management description: List, delete, and manage builds paths: /api/build/{buildName}: delete: operationId: deleteBuild summary: Delete Build description: Deletes a build and all its runs. Optionally deletes the associated build artifacts. tags: - Build Management parameters: - $ref: '#/components/parameters/BuildName' - name: deleteAll in: query description: If 1, delete all build numbers. If 0, requires buildNumbers param. schema: type: integer enum: - 0 - 1 default: 1 - name: buildNumbers in: query description: Comma-separated list of build numbers to delete schema: type: string - name: artifacts in: query description: If 1, also delete associated build artifacts from repositories schema: type: integer enum: - 0 - 1 default: 0 responses: '200': description: Build deleted successfully '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /api/build/rename/{buildName}: post: operationId: renameBuild summary: Rename Build description: Renames an existing build to a new name. tags: - Build Management parameters: - $ref: '#/components/parameters/BuildName' - name: to in: query required: true description: New name for the build schema: type: string responses: '200': description: Build renamed successfully '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /api/build/retention/{buildName}: post: operationId: setBuildRetention summary: Set Build Retention description: Configures retention policies for a build, specifying how many builds to keep, minimum build date, and patterns for builds to exclude from cleanup. tags: - Build Management parameters: - $ref: '#/components/parameters/BuildName' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BuildRetentionConfig' responses: '200': description: Retention configuration applied '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' get: operationId: getBuildRetention summary: Get Build Retention description: Returns the retention configuration for a specific build. tags: - Build Management parameters: - $ref: '#/components/parameters/BuildName' responses: '200': description: Retention configuration content: application/json: schema: $ref: '#/components/schemas/BuildRetentionConfig' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: schemas: BuildRetentionConfig: type: object properties: deleteBuildArtifacts: type: boolean description: Whether to delete artifacts when the build is cleaned up default: false count: type: integer description: Maximum number of builds to keep (-1 means unlimited) example: 100 minimumBuildDate: type: string format: date-time description: Delete builds older than this date buildNumbersNotToBeDiscarded: type: array items: type: string description: Build numbers that should never be deleted example: - 1.0.0 - 2.0.0 ErrorResponse: type: object properties: errors: type: array items: type: object properties: status: type: integer description: HTTP status code message: type: string description: Error message responses: Unauthorized: description: Unauthorized - authentication required content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' BadRequest: description: Bad request - invalid input content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' parameters: BuildName: name: buildName in: path required: true description: The name of the build schema: type: string example: my-application securitySchemes: BearerAuth: type: http scheme: bearer description: Access token authentication ApiKeyAuth: type: apiKey in: header name: X-JFrog-Art-Api description: API key authentication via header BasicAuth: type: http scheme: basic description: HTTP Basic authentication externalDocs: description: Artifactory Query Language Documentation url: https://jfrog.com/help/r/jfrog-artifactory-documentation/artifactory-query-language