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
tenantId
string

Describes the client ID or msp ID of the tenant.

categoryId
string

Defined category id

Responses

OK

Endpoint
/api/v2/tenants/{tenantId}/rba/categories/{categoryId}/scripts

A list of scripts is retrieved within a category.

Path Parameters
tenantId
string

Describes the client ID or msp ID of the tenant.

categoryId
string

Defined category id

Responses

OK

attachment
object

attachment.contentURL
attachment.id
attachment.name
category
object

category.id
category.name
description
string

executionType
string

id
integer

installTimeout
integer

name
string

parameters
array

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.
platforms
array

processName
string

registryPath
string

registryValue
string

scriptVersion
string

serviceName
string

{
  "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
tenantId
string

Describes the client ID or msp ID of the tenant.

categoryId
string

Defined category id

attachment
object

If executionType is COMMAND, then command is needed else attachment file is needed.

attachment.file
attachment.name
command
string

description
string

Description for the script.

executionType
string

Script execution type.Supported Values: BATCHFILE, COMMAND, DOWNLOAD, EXE, MSI, POWERSHELL, PYTHON, PERL, PHP, SHELL, VBS

installTimeout
integer

Maximum time for installation.

name
string

Script name.

outputDirectory
string

Output directory supported required only when executionType is DOWNLOAD, EXE, MSI.

outputFile
string

Output file supported required only when executionType is DOWNLOAD, EXE, MSI.

parameters
array

Parameter data.

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.
platforms
array

OS platforms.Example: WINDOWS, LINUX

processName
string

Process name for sanity check.

registryPath
string

Registry path for sanity check after execution.

registryValue
string

Registry Value for sanity check after execution.

serviceName
string

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"
}
{
  "attachment": {
    "file": "string",
    "name": "string"
  },
  "command": "string",
  "description": "string",
  "executionType": "BATCHFILE",
  "installTimeout": 0,
  "name": "string",
  "outputDirectory": "string",
  "outputFile": "string",
  "parameters": [
    {
      "dataType": "STRING",
      "defaultValue": "string",
      "description": "string",
      "name": "string",
      "type": "string"
    }
  ],
  "platforms": [
    "string"
  ],
  "processName": "string",
  "registryPath": "string",
  "registryValue": "string",
  "serviceName": "string"
}

Responses

OK

attachment
object

attachment.contentURL
attachment.id
attachment.name
category
object

category.id
category.name
description
string

executionType
string

id
integer

installTimeout
integer

name
string

parameters
array

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.
platforms
array

processName
string

registryPath
string

registryValue
string

scriptVersion
string

serviceName
string

{
  "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"
}