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 a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

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

Introduction As the financial services sector continues to evolve, Loan Management Software (LMS) plays a pivotal role in helping businesses streamline their loan operations, from origination to…

Read More

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

Introduction In 2026, AI presentation design tools have become indispensable for professionals, educators, and students aiming to create visually stunning and impactful slide decks with minimal effort….

Read More

Top 10 Web Design Software Tools in 2026: Features, Pros, Cons & Comparison

Introduction Web design software is a vital tool for both professionals and businesses looking to create visually appealing and functional websites. In 2026, with the increase in…

Read More

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

Introduction In 2026, AI graphic design tools have transformed the creative landscape, empowering designers, marketers, and business owners to produce stunning visuals with unprecedented speed and efficiency….

Read More

Top 10 AI Poster & Flyer Design Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI-powered poster and flyer design tools have revolutionized the way businesses, marketers, educators, and creators produce visually stunning promotional materials. These tools leverage artificial…

Read More

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

Introduction Artificial Intelligence is powering everything from personalized marketing to autonomous systems. But with great power comes greater responsibilityโ€”especially when it comes to privacy compliance. In 2026,…

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