ServiceManager API for automation Follow
How to Export / Import from the Service Manager using an API
From time to time Administrators would like to access admin functions from the Service Manager from an API.
AuraPlayer offers a REST API to access admin functions in an easy way.
To perform a Service Manager backup we can run the REST API:
curl -o <filename> http://<host>:<port>/ServiceManager/Macro/Backup
Example: curl -o b.zip e.g. http://localhost:8080/ServiceManager/Macro/Backup
To perform a Service Manager backup of sepecif items we can run the REST API:
Available Item types: "services" for services, "apps" for applications, "processes" for RPAs, "testCases" for Tests, "testGroups" for test groups.
Note: The JSON data (the highlighted part above) must be URL encoded. For that you may use any online URL encoder (for example: https://www.urlencoder.org/https://meyerweb.com/eric/tools/dencoder/)
Encoded example:
curl -o backup.zip http://localhost:8080/ServiceManager/Macro/Backup?data=%7B"services"%3A%5B"iExpense_downloadAttachment"%2C"test_workflow"%5D%7D"
To perform a Service Manager restore from an Import from a backup file:
Request performed in curl:
curl -F "file=@<filename>" http://<host>:<port>/ServiceManager/Macro/Restore
Where <host> is the hostname of the server where the Service manager is installed
example:
curl -F "file=@test_backup.zip" http://localhost:8080/ServiceManager/Macro/Restore
Get List of URLs of Forms/HTML/DB that the Services are pointing to an existing server
Change URLs of Forms/HTML/DB that the Services are pointing to
Update System Properties
This API sets the properties to the newly provided content.
It doesn't perform merge of any kind, no logic of any kind, not keeping old values - just replaces the file with the provided content as is.
POST http://<server>:<port>/ServiceManager/Macro/SystemProperties
## ===== Directories ===== #USER_HOME = C:/ServiceManager #DAILY_BACKUPS = C:/ServiceManager/daily_backups ## ===== DB configuration ===== DB_SHOW_SQL= false DB_CONNECTION_POOL_SIZE= 5 ... |
Update/merge specific properties
If a property exists it will be updated to the new value, otherwise it will be appended; Properties not specified in the request won't be affected.
PATCH http://<server>:<port>/ServiceManager/Macro/SystemProperties
FORM_TIMEOUT = 12000 HTML_TIMEOUT = 12000 append.keys = resp,icx_ticket,config,server module append.fields = resp,icx_ticket,config,servermodule
append.defaults =config=%2Ftest1%2Fapplmgr%2F1200%2Ffnd%2F12.0.0%2Fforms%2FUS%2FFNDSCSGN%26servermodule=%27TEST1%27 |
*append.defaults - special parameter settings: value should be: key1=value1&key2=value2 AND it should be URI encoded. for example:
config=/test1/applmgr/1200/fnd/12.0.0/forms/US/FNDSCSGN&servermodule='TEST1' is encoded to: config=%2Ftest1%2Fapplmgr%2F1200%2Ffnd%2F12.0.0%2Fforms%2FUS%2FFNDSCSGN%26servermodule=%27TEST1%27 append.defaults =config=%2Ftest1%2Fapplmgr%2F1200%2Ffnd%2F12.0.0%2Fforms%2FUS%2FFNDSCSGN%26servermodule=%27TEST1%27 |
Change default value of Input field
If you want to change the default input field with specific name across all services.
For example: change default username of all DB services when you move to production.
POST http://<server>:<port>/ServiceManager/Macro/Services/Params
{
"action":"SET_DEFAULT_VALUE",
"paramName":"SIGNON_USERNAME_0",
"newValue":"NEWPASSWORD"
}
Comments
0 comments
Please sign in to leave a comment.