Applying Configuration Changes
Once you have configured your YAML file to include all the configuration changes needed, you can apply them by sending a PATCH request to
curl -u<username>:<password> -X PATCH "http://localhost:8081/artifactory/api/system/configuration" -H "Content-Type: application/yaml" -T configuration.yml
You must supply a user with Admin privileges through the REST API.
Do not set the yaml to not contain any elements, as this will delete all the local/remote/virtual repositories.
Deleting an Existing Element
The YAML file can also be configured to delete elements, such as deleting a value for an existing field or removing an existing repository, using the following format: (e.g. some local repository) / deleting the value of an existing field (e.g. remove the “RnD maven repository” is as follows
Replication (push and pull)
General (General, Property Sets, Proxy, Mail)
Security (General Security, Password Policy, LDAP, SAML, OAuth, HTTP SSO, Crowd)
Service Configurations (Backups, Maven Indexer)
Enabling and Disabling Xray
token: refresh-expiry: 86400 # grace period (seconds) during which an expired token can still be refreshed. Must be positive. default-expiry: 31536000 # default expiry period (seconds) when token expiry is set to null. When set to zero, default expiry is not forced. Must be non-negative. Must comply with ('max-expiry' >= 'default-expiry'). max-expiry: 0 # max expiry period (seconds) When max expiry is bigger than zero, non-expirable tokens are forbidden and the user's token expiry will be limited to the max expiry value. When set to zero,the user's token can be non-expirable and the expiry will not be limited with a higher boundary. Must be non negative. Must comply with ('max-expiry' >= 'default-expiry'). allow-refreshable: true # when disabled, all the user tokens will be created as non refreshable.