Endpoint
/api/v2/tenants/{tenantId}/rba/categories/{categoryId}/scripts
Partners can delete client or partner scripts. A client can only delete client-specific scripts.
Path Parameters
tenantIdstring
categoryIdstring
Responses
OK
Endpoint
/api/v2/tenants/{tenantId}/rba/categories/{categoryId}/scripts
A list of scripts is retrieved within a category.
Path Parameters
tenantIdstring
categoryIdstring
Responses
OK
descriptionstring
executionTypestring
idinteger
installTimeoutinteger
namestring
parametersobject
Child Parameters
- parameters.dataType
- Data Type of the parameter.
- parameters.defaultValue
- Default Value for the parameter.
- parameters.description
- Description for parameter.
- parameters.name
- Name of parameter.
- parameters.type
- Parameter is mandatory or optional.
processNamestring
registryPathstring
registryValuestring
scriptVersionstring
serviceNamestring
{
"attachment": {
"contentURL": "https://localhost:8443/downloadScript.do?action=downloadAgent\u0026fileName=apache-restart.sh\u0026version=5.00",
"id": 0,
"name": "apache-restart.sh"
},
"category": {
"id": 28,
"name": "CLIENT-Category"
},
"description": "Restart Apache Service",
"executionType": "SHELL",
"id": 73,
"installTimeout": 50,
"name": "Restart Apache Service",
"parameters": [
{
"dataType": "INTEGER",
"defaultValue": "10",
"description": "Testing please ignore",
"id": 94,
"name": "Test Param - 1",
"type": "REQUIRED"
},
{
"dataType": "STRING",
"defaultValue": "50",
"description": "Testing please ignore",
"id": 95,
"name": "Test Param - 2",
"type": "OPTIONAL"
},
{
"dataType": "STRING",
"defaultValue": "50",
"description": "Testing please ignore",
"id": 96,
"name": "New param - 3",
"type": "OPTIONAL"
}
],
"platforms": [
"WINDOWS",
"LINUX"
],
"processName": "cmd.exe",
"registryPath": "HKEY_CURRENT_USER/Control Panel/Desktop",
"registryValue": "dword:00000001",
"scriptVersion": "5.00",
"serviceName": "OpsRampAgent"
}
Endpoint
/api/v2/tenants/{tenantId}/rba/categories/{categoryId}/scripts
When creating a script:
- Attachment files must be converted to byte stream and base64-encoded. Always include a name and file.
- To get the list of available categories, invoke the Get Categories endpoint.
Path Parameters
tenantIdstring
categoryIdstring
attachmentobject
If executionType is COMMAND, then command is needed else attachment file is needed.
Child Parameters
- attachment.file
- attachment.name
commandstring
descriptionstring
Description for the script.
executionTypestring
Script execution type.Supported Values: BATCHFILE, COMMAND, DOWNLOAD, EXE, MSI, POWERSHELL, PYTHON, PERL, PHP, SHELL, VBS
installTimeoutinteger
(Optional) Maximum time for installation.
namestring
Script name.
outputDirectorystring
(Optional) Output directory supported required only when executionType is DOWNLOAD, EXE, MSI.
outputFilestring
(Optional) Output file supported required only when executionType is DOWNLOAD, EXE, MSI.
parametersarray
(Optional) Parameter data.
Child Parameters
- parameters.dataType
- Data Type of the parameter.
- parameters.defaultValue
- Default Value for the parameter.
- parameters.description
- Description for parameter.
- parameters.name
- Name of parameter.
- parameters.type
- Parameter is mandatory or optional.
processNamestring
(Optional) Process name for sanity check.
registryPathstring
(Optional) Registry path for sanity check after execution.
registryValuestring
(Optional) Registry Value for sanity check after execution.
serviceNamestring
(Optional) Service name for sanity check.
{
"attachment": {
"file": "UkVTVEFSVD0iL3NiaW4vc2VydmljZSBodHRwZCByZXN0YXJ0Ig0KUEdSRVA9Ii91c3IvYmluL3BncmVwIg0KSFRUUEQ9Imh0dHBkIg0KJFBHUkVQICR7SFRUUER9DQppZiBbICQ/IC1uZSAwIF0NCnRoZW4NCiAkUkVTVEFSVA0KZmk=",
"name": "apache-restart.sh"
},
"description": "Restart Apache using Shell",
"executionType": "SHELL",
"installTimeout": "50",
"name": "Restart Apache",
"parameters": [
{
"dataType": "INTEGER",
"defaultValue": "10",
"description": "Testing please ignore",
"name": "Test Param - 1",
"type": "REQUIRED"
},
{
"dataType": "STRING",
"defaultValue": "50",
"description": "Testing please ignore",
"name": "Test Param - 2",
"type": "OPTIONAL"
}
],
"platforms": [
"WINDOWS",
"LINUX"
],
"processName": "cmd.exe",
"registryPath": "HKEY_CURRENT_USER/Control Panel/Desktop",
"registryValue": "dword:00000001",
"serviceName": "OpsRampAgent"
}
Responses
OK
descriptionstring
executionTypestring
idinteger
installTimeoutinteger
namestring
parametersobject
Child Parameters
- parameters.dataType
- Data Type of the parameter.
- parameters.defaultValue
- Default Value for the parameter.
- parameters.description
- Description for parameter.
- parameters.name
- Name of parameter.
- parameters.type
- Parameter is mandatory or optional.
processNamestring
registryPathstring
registryValuestring
scriptVersionstring
serviceNamestring
{
"attachment": {
"contentURL": "https://localhost:8443/downloadScript.do?action=downloadAgent\u0026fileName=apache-restart.sh\u0026version=0.00",
"id": 0,
"name": "apache-restart.sh"
},
"category": {
"id": 28,
"name": "CLIENT-Category"
},
"description": "Restart Service",
"executionType": "SHELL",
"id": 78,
"installTimeout": 50,
"name": "Restart Service",
"parameters": [
{
"dataType": "INTEGER",
"defaultValue": "10",
"description": "Testing please ignore",
"id": 102,
"name": "Test Param - 1",
"type": "REQUIRED"
},
{
"dataType": "STRING",
"defaultValue": "50",
"description": "Testing please ignore",
"id": 103,
"name": "Test Param - 2",
"type": "OPTIONAL"
}
],
"platforms": [
"WINDOWS",
"LINUX"
],
"processName": "cmd.exe",
"registryPath": "HKEY_CURRENT_USER/Control Panel/Desktop",
"registryValue": "dword:00000001",
"scriptVersion": "0.00",
"serviceName": "OpsRampAgent"
}