To perform some Xray REST API action we do not have restrictions that the user needs admin access, in such cases we can use this method. Based on the requirement we can provide the manage resources, policies and watches level of access. If you want to restrict any existing user in an Artifactory from accessing UI you can simply disable UI access for that particular user. Go to administration → Identity and Access → Users → Click on the user and can select Disable UI Access.
Example to use username and password for REST API authentication.
Example to use username and password for REST API authentication.
curl -u<USERNAME>:<PASSWORD> <Xray url>/xray/api/v2/watches