Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

Artifactory: Artifactory 7.x REST API Quickstart

Hereโ€™s a step-by-step practical guide to using the JFrog Artifactory 7.x REST API to manage your instance (create repos, users, etc.) using your server and credentials.


๐ŸŸข Artifactory 7.x REST API Quickstart

Server: http://65.2.152.172:8082/

Username: admin

Password: password


1๏ธโƒฃ Authentication

For scripting/API, you can use:

  • Basic Auth (-u admin:password)
  • (Best practice) Create an API key or access token from the UI and use that instead of a raw password.

But for quick testing, Basic Auth is fine.


2๏ธโƒฃ API Endpoint URLs (7.x)

  • Main APIs are under:
    http://65.2.152.172:8082/artifactory/api/

For access and user/group management:
http://65.2.152.172:8082/access/api/


3๏ธโƒฃ Check Connectivity

curl -u admin:password http://65.2.152.172:8082/artifactory/api/system/ping
Code language: JavaScript (javascript)

Should return OK


4๏ธโƒฃ Create a Local Repository

Example: Create a new local Maven repo named my-maven-local

curl -u admin:password -X PUT \
  -H "Content-Type: application/json" \
  -d '{
        "rclass": "local",
        "packageType": "maven",
        "description": "My Maven local repo"
      }' \
  http://65.2.152.172:8082/artifactory/api/repositories/my-maven-local
Code language: PHP (php)
  • For npm, change "packageType": "npm", etc.

5๏ธโƒฃ Create a Remote Repository

Example: Create a remote Maven Central proxy

curl -u admin:password -X PUT \
  -H "Content-Type: application/json" \
  -d '{
        "rclass": "remote",
        "packageType": "maven",
        "url": "https://repo.maven.apache.org/maven2",
        "description": "Remote Maven Central"
      }' \
  http://65.2.152.172:8082/artifactory/api/repositories/maven-central-remote
Code language: PHP (php)

6๏ธโƒฃ Create a User

curl -u admin:password \
  -H "Content-Type: application/json" \
  -X PUT "http://65.2.152.172:8082/artifactory/api/security/users/jane" \
  -d '{
    "email": "jane@example.com",
    "password": "JanePassword123!",
    "admin": false,
    "groups": []
  }'

curl -u admin:password -X PUT \
  -H "Content-Type: application/json" \
  -d '{
    "email" : "jane1@example.com",
    "password" : "JanePassword123!",
    "admin" : false,
    "profileUpdatable": true
  }' \
  "http://65.2.152.172:8082/artifactory/api/security/users/jane1"
Code language: PHP (php)
  • Set "admin": true if you want to make the user admin.

7๏ธโƒฃ List Repositories

curl -u admin:password http://65.2.152.172:8082/artifactory/api/repositories
Code language: JavaScript (javascript)

List of Users

curl -u admin:password "http://65.2.152.172:8082/artifactory/api/security/users"
Code language: JavaScript (javascript)


8๏ธโƒฃ Get Repository Configuration

curl -u admin:password http://65.2.152.172:8082/artifactory/api/repositories/my-maven-local
Code language: JavaScript (javascript)

9๏ธโƒฃ Delete a Repository

curl -u admin:password -X DELETE http://65.2.152.172:8082/artifactory/api/repositories/my-maven-local
Code language: JavaScript (javascript)

๐Ÿ”Ÿ Create a Group

curl -u admin:password \
  -H "Content-Type: application/json" \
  -X PUT \
  -d '{
        "description": "Developers"
      }' \
  "http://65.2.152.172:8082/artifactory/api/security/groups/developers1"

Code language: PHP (php)

1๏ธโƒฃ1๏ธโƒฃ Assign a User to a Group

curl -u admin:password -X PATCH \
  -H "Content-Type: application/json" \
  -d '{
        "groups": ["developers"]
      }' \
  http://65.2.152.172:8082/access/api/v1/users/raj
Code language: PHP (php)

๐Ÿ“š Official Docs & Swagger


๐Ÿšฆ Tips

  • Use -v with curl to debug requests.
  • Use JFrog CLI for easier scripting and more advanced automation.
  • For production, use access tokens or API keys (never passwords).

๐ŸŸข Summary Table

ActionAPI Endpoint Example
Ping/artifactory/api/system/ping
Create Local Repo/artifactory/api/repositories/<repo>
Create Remote Repo/artifactory/api/repositories/<repo>
Create User/access/api/v1/users/<username>
Create Group/access/api/v1/groups/<group>
Assign User/Group/access/api/v1/users/<username> (PATCH groups)
List Repos/artifactory/api/repositories

Here are several practical examples for uploading artifacts to Artifactory using different methods, including REST API (with curl) and JFrog CLI. These examples will help you quickly upload files from a local system to an Artifactory repository.

1. Upload with REST API and curl

Syntax:

textcurl -u <USERNAME>:<PASSWORD> -X PUT -T <LOCAL_FILE_PATH> "http://<ARTIFACTORY_URL>/artifactory/<REPO>/<PATH>/<FILENAME>"

Example:

textcurl -u admin:password -X PUT -T ./myapp-1.0.0.jar "http://65.2.152.172:8082/artifactory/my-local-repo/myapp/1.0.0/myapp-1.0.0.jar"
  • Replace my-local-repo, myapp/1.0.0/, and the filenames as needed.
  • You can also include artifact properties in the URL: textcurl -u admin:password -X PUT -T ./app.zip "http://65.2.152.172:8082/artifactory/my-local-repo/app.zip;release=true;version=1.0"
  • On success, youโ€™ll see a HTTP 201 response12.

2. Upload Using JFrog CLI

  • Install the CLI:
    Download here and configure it for your server (one-time setup): textjfrog config add my-server --url=http://65.2.152.172:8082 --user=admin --password=password
  • Upload a Single File: textjfrog rt upload "myapp-1.0.0.jar" "my-local-repo/myapp/1.0.0/"
  • Upload All Files in a Folder: textjfrog rt upload "dist/*" "my-local-repo/myapp/1.0.0/"
  • Recursively upload a folder: textjfrog rt upload "my-folder/*" my-local-repo/
  • For advanced usage and options, see the official [JFrog CLI documentation]34.

3. Uploading via Artifactory UI (for small/manual uploads)

  1. In the Artifactory web UI, navigate to your target repository and folder.
  2. Click the “Deploy” or “Upload” button.
  3. Select your file(s) and confirm upload.

4. Upload via CI Tool or Script (Generic)

If automating in CI, your steps would typically use either the REST API (curl, see above), or invoke the JFrog CLI as part of the pipeline.

References for Official Docs and Further Reading:

Tip:
For scripted automation, always prefer access tokens or API keys over basic passwords for improved security.

If you need specific examples for Maven, npm, or other build types, just specify the ecosystem!

Five different ways to upload JAR files to JFrog Artifactory – YouTube

To interact with your JFrog Artifactory server (http://65.2.152.172:8082/) using the API (for example, to create repositories, users, etc.), you will mainly use REST API calls authenticated as your admin user. Hereโ€™s a clear, practical guide:

1. Authentication

For most API calls, you can use Basic Authentication with your username and password (admin/password), or (recommended) generate and use an access token.

  • Basic Auth (not recommended for production scripts):
    Use the -u option with curl: textcurl -u admin:password http://65.2.152.172:8082/artifactory/api/system/ping A response of OK means the API is accessible.
  • Access Token (recommended):
    1. Log in as admin to the UI.
    2. Go to Identity and Access โ†’ Access Tokens and generate a new admin token.
    3. Use that token in an API call: textcurl -H "Authorization: Bearer <YOUR_TOKEN>" http://65.2.152.172:8082/artifactory/api/system/ping
    Tokens are safer and preferred in scripts or automation123.

2. API Base URL

The API base for your instance is:
http://65.2.152.172:8082/

Most API endpoints relevant to Artifactory are under /artifactory/api/
User and group APIs are often under /access/api/ (for Access-based security).

3. Create a Local Repository

REST endpoint:
PUT /artifactory/api/repositories/{repoKey}

Example (create a Maven local repository):

textcurl -u admin:password \
  -H "Content-Type: application/json" \
  -X PUT "http://65.2.152.172:8082/artifactory/api/repositories/my-maven-local" \
  -d '{
    "rclass": "local",
    "packageType": "maven",
    "description": "My Maven repo"
  }'
  • Change my-maven-local and "packageType" as needed (npm, docker, etc.).
  • For more options (remote/virtual/federated), see the official docs45.

Response:
201 Created on success.

4. Create a User

REST endpoint:
POST /access/api/v2/users

Example:

textcurl -u admin:password \
  -H "Content-Type: application/json" \
  -X POST "http://65.2.152.172:8082/access/api/v2/users" \
  -d '{
    "username": "jane",
    "password": "JanePassword123!",
    "email": "jane@example.com",
    "admin": false,
    "groups": [],
    "profile_updatable": true
  }'
  • Adjust parameters as needed for new user (admin privileges, group membership, etc.).
    Requires admin privileges to use this endpoint6.

5. Other Useful API Examples

  • Get All Repositories: textcurl -u admin:password http://65.2.152.172:8082/artifactory/api/repositories
  • Delete a Repository: textcurl -u admin:password -X DELETE http://65.2.152.172:8082/artifactory/api/repositories/my-maven-local
  • List Users: textcurl -u admin:password http://65.2.152.172:8082/access/api/v2/users

6. Best Practices

  • Avoid using admin:password in scriptsโ€”use access tokens where possible.
  • Use appropriate Content-Type headers, usually application/json.
  • For all API calls, check the official Artifactory REST API docs for parameters, endpoint changes, and security notes.
  • For complex JSON payloads (like advanced repo settings), you can export config examples from the UI and modify as needed.

7. References for Official API Docs

In Summary:
You can script any Artifactory actionโ€”repo creation, user management, build upload, and moreโ€”using basic curl REST requests, authenticated with user/password or an access token. Always follow best practices for authentication and automation.416

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Top 10 AI SEO Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI SEO tools have become indispensable for digital marketers, businesses, and content creators aiming to dominate search engine rankings. These tools leverage artificial intelligence…

Read More

Top 10 Product Lifecycle Management (PLM) Tools in 2026: Features, Pros, Cons & Comparison

Introduction Product Lifecycle Management (PLM) is a strategic approach to managing a productโ€™s journey from conception through design, manufacturing, and end-of-life. In 2026, PLM software has evolved…

Read More

Top 10 Patch Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction: The Importance of Patch Management in 2026 In 2026, as cyber threats evolve and technology becomes more complex, patch management tools are critical for maintaining cybersecurity…

Read More

Top 10 Headless CMS Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, Headless Content Management Systems (CMS) have become the go-to solution for businesses seeking flexibility, scalability, and a modern approach to content management. Unlike traditional…

Read More

Top 10 AI Lead Scoring Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI lead scoring tools have become indispensable for B2B and B2C businesses aiming to optimize their sales pipelines. These tools leverage artificial intelligence to…

Read More

Top 10 AI Portfolio Optimization Tools in 2026: Features, Pros, Cons & Comparison

Introduction Investment management has always been about making smart choices at the right time. Traditionally, this required endless hours of research, manual calculations, and intuition. But in…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x