| name | JFrog Artifactory |
| description | Use when working with JFrog Artifactory -- managing repositories, deploying/downloading artifacts, querying with AQL, configuring builds, replication, or federation. Triggers on mentions of artifactory, repository, artifact, deploy, docker registry, build info, AQL, replication, or federation. |
API transport: Prefer jf api (JFrog CLI 2.100.0+). See jf-api-patterns.md (path-only URLs; auth from jf config). Examples using curl with $JFROG_URL + bearer token are fallback when the CLI is missing or below 2.100.0.
JFrog Artifactory Skill
Authentication
All Artifactory REST API calls require authentication via the Authorization header:
Authorization: Bearer $JFROG_ACCESS_TOKEN
Base URL: https://$JFROG_URL/artifactory/api/...
When authentication is needed, follow the login-flow.md procedure to resolve the active JFrog environment. The jf CLI is required and will be installed automatically if missing. The agent checks saved credentials via jf config show and asks which environment to use if multiple are saved. If none exist, the agent drives the web login flow and saves credentials via jf config add.
Core Concepts
Repository Types
| Type | Purpose | Example |
|---|
| Local | Store your own artifacts (1st-party binaries, builds) | libs-release-local |
| Remote | Cache/proxy external registries (npm, Maven Central, Docker Hub) | npm-remote |
| Virtual | Single URL that routes to multiple local & remote repos with priority order | npm |
| Federated | Bi-directional mirror across JFrog Platform Deployments (JPDs) | shared-docker-federated |
Build Info
Structured metadata collected by JFrog CLI during CI. Contains: build name/number, artifacts produced, dependencies consumed, environment variables, VCS info. Published with jf rt build-publish. Enables: Xray scanning of builds, promotion, release bundle creation.
Package Types
Artifactory supports 40+ package types. See package-types-reference.md for repo config per type.
Key API Operations
Repository Management
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" "$JFROG_URL/artifactory/api/repositories"
curl -X PUT -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key":"my-docker-local","rclass":"local","packageType":"docker"}' \
"$JFROG_URL/artifactory/api/repositories/my-docker-local"
curl -X PUT -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key":"docker-remote","rclass":"remote","packageType":"docker","url":"https://registry-1.docker.io/"}' \
"$JFROG_URL/artifactory/api/repositories/docker-remote"
curl -X PUT -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key":"docker","rclass":"virtual","packageType":"docker","repositories":["my-docker-local","docker-remote"],"defaultDeploymentRepo":"my-docker-local"}' \
"$JFROG_URL/artifactory/api/repositories/docker"
Artifact Operations
curl -X PUT -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-T ./myapp-1.0.jar \
"$JFROG_URL/artifactory/libs-release-local/com/example/myapp/1.0/myapp-1.0.jar"
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-O "$JFROG_URL/artifactory/libs-release-local/com/example/myapp/1.0/myapp-1.0.jar"
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
"$JFROG_URL/artifactory/api/storage/libs-release-local/com/example/myapp/1.0/myapp-1.0.jar"
curl -X PUT -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
"$JFROG_URL/artifactory/api/storage/libs-release-local/com/example/myapp/1.0/myapp-1.0.jar?properties=build.name=myapp;build.number=42"
curl -X DELETE -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
"$JFROG_URL/artifactory/libs-release-local/com/example/myapp/1.0/myapp-1.0.jar"
Search
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
"$JFROG_URL/artifactory/api/search/artifact?name=myapp&repos=libs-release-local"
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
"$JFROG_URL/artifactory/api/search/gavc?g=com.example&a=myapp&v=1.0"
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
"$JFROG_URL/artifactory/api/search/prop?build.name=myapp&repos=libs-release-local"
For complex queries use AQL -- see aql-reference.md.
Build Info
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
"$JFROG_URL/artifactory/api/build/myapp/42"
curl -X POST -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"buildName":"myapp","buildNumbers":["42"],"deleteAll":false}' \
"$JFROG_URL/artifactory/api/build/delete"
curl -X POST -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status":"released","targetRepo":"libs-release-local","copy":false}' \
"$JFROG_URL/artifactory/api/build/promote/myapp/42"
System
curl "$JFROG_URL/artifactory/api/system/ping"
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" "$JFROG_URL/artifactory/api/system/version"
curl -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" "$JFROG_URL/artifactory/api/storageinfo"
Parallelization
When creating multiple repositories (e.g., per-environment or per-team), run the creation calls in parallel using concurrent subagents or background shell jobs. Repository creation calls are independent and do not depend on each other. The same applies to batch artifact uploads and property-setting operations.
Replication
- Push replication: pushes artifacts from local repo to another Artifactory instance
- Pull replication: pulls artifacts from a remote Artifactory into a local repo
- Event-based replication: triggers on artifact deploy/delete (real-time sync)
- Cron-based replication: scheduled sync
curl -X PUT -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"https://<TARGET_JFROG_URL>/artifactory/libs-release-local","username":"$TARGET_USER","password":"$TARGET_TOKEN","enabled":true,"cronExp":"0 0 * * * ?","enableEventReplication":true}' \
"$JFROG_URL/artifactory/api/replications/libs-release-local"
Federation
Federated repositories are mirrored across multiple JPDs with full bi-directional sync. All members are equal peers.
curl -X POST -H "Authorization: Bearer $JFROG_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
"$JFROG_URL/artifactory/api/federation/migrate/libs-release-local"
Reference Files
Related Patterns
repositories-basic-repository-setup -- Single-endpoint repo setup
repositories-dependency-resolution-from-multiple-upstream-sources -- Virtual repo with prioritized remotes
repositories-setup-for-cross-team-collaboration -- Multi-team shared virtual repos
builds-ci-integration -- CI pipeline with Build Info
After completing an action, check the Artifactory Actions section of skills/jfrog-patterns/flow-suggestions.md for flow context and offer the next step.
Official Documentation
Related skills
For manifest-driven repo creation (project onboarding with ecosystems and custom repos), see onboarding-workflows (jfrog-create-repos).