DEV Community

Eldad Assis for JFrog

Posted on

2 1

List Artifactory pro admin users - one liner

When you have many users in Artifactory, you can get all admins with a quick one liner using the REST API from Linux command line.

for name in \
  $(curl -s -uadmin:password https://host/artifactory/api/security/users | jq ".[].name" | tr -d '"'); do \
  echo \
  "$name: $(curl -s -uadmin:password https://host/artifactory/api/security/users/$name | jq '.admin')"; \
done

Easy!

Top comments (1)

Collapse
 
rikwasmus profile image
rikwasmus

Rather than jq ".[].name" | tr -d '"', try jq -r ".[].name"

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay