---
updatedAt: 2026-07-10T17:11:53.000Z
---

# Create/Update Commands for a Command Group

Create or update multiple command RBP entities for a host and respective command group.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "This API provides access to control BeyondTrust software for Endpoint Privilege Management Linux.",
    "title": "Endpoint Privilege Management Linux API",
    "version": "25.1.6"
  },
  "security": [
    {
      "nomine-authorizer": []
    }
  ],
  "paths": {
    "/api/pbul/{hostid}/rbp/cmdgrps/{cmdgrpid}/commands": {
      "post": {
        "description": "Create or update multiple command RBP entities for a host and respective command group.",
        "tags": [
          "RBP",
          "saas"
        ],
        "summary": "Create/Update Commands for a Command Group",
        "operationId": "rbpUpdateCommands",
        "deprecated": true,
        "parameters": [
          {
            "x-go-name": "HostID",
            "description": "The Host ID to perform this operation on",
            "name": "hostid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "x-go-name": "Reason",
            "description": "An optional string that describes the reason for this change",
            "name": "reason",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "x-go-name": "ID",
            "description": "The ID for the command group (cmdgrp)",
            "name": "cmdgrpid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "cmd": {
                      "type": "string",
                      "x-go-name": "Command"
                    },
                    "runcommand": {
                      "type": "string",
                      "x-go-name": "Rewrite"
                    }
                  }
                },
                "maxItems": 500
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/rbpEntities"
          },
          "400": {
            "$ref": "#/components/responses/TextError"
          }
        },
        "x-amazon-apigateway-integration": {
          "type": "aws_proxy",
          "httpMethod": "POST",
          "uri": "${biulInvocationArn}"
        }
      }
    }
  },
  "components": {
    "responses": {
      "TextError": {
        "description": "TextError An unknown error occurred, details provided in body"
      },
      "rbpEntities": {
        "description": "RBPEntitiesResponse is a JSON object containing information for a set of RBP entities",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RBPEntities"
            }
          }
        }
      }
    },
    "schemas": {
      "RBPEntities": {
        "description": "RBPEntities is a collection of all entities' identifying information (ID, name, ...) returned in updates\nTODO remove once UpdateMultiple wrapper function is removed",
        "type": "object",
        "properties": {
          "cmdgrp": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "CommandGroups",
            "maxItems": 500
          },
          "cmdlist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "CommandList",
            "maxItems": 500
          },
          "hostgrp": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "HostGroups",
            "maxItems": 500
          },
          "hostlist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "HostList",
            "maxItems": 500
          },
          "role": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "Roles",
            "maxItems": 500
          },
          "rolecmds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "RoleCommands",
            "maxItems": 500
          },
          "rolehosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "RoleHosts",
            "maxItems": 500
          },
          "roletmdates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "RoleTimeDates",
            "maxItems": 500
          },
          "roleusers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "RoleUsers",
            "maxItems": 500
          },
          "tmdategrp": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "TimeDateGroups",
            "maxItems": 500
          },
          "tmdatelist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "TimeDateList",
            "maxItems": 500
          },
          "usergrp": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "UserGroups",
            "maxItems": 500
          },
          "userlist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RBPEntityIdentifier"
            },
            "x-go-name": "UserList",
            "maxItems": 500
          }
        },
        "x-go-package": "pbsmc/remote/pbrest"
      },
      "RBPEntityIdentifier": {
        "description": "RBPEntityIdentifier is structure returned in updates indicating the IDs of created/updated items",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "x-go-name": "ID"
          },
          "name": {
            "type": "string",
            "x-go-name": "Name"
          }
        },
        "x-go-package": "pbsmc/remote/pbrest"
      }
    },
    "securitySchemes": {
      "nomine-authorizer": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-amazon-apigateway-authtype": "custom",
        "x-amazon-apigateway-authorizer": {
          "type": "request",
          "authorizerUri": "${authorizerInvokeArn}",
          "authorizerResultTtlInSeconds": 300,
          "identitySource": "method.request.header.Authorization"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.beyondtrust.io/site/{siteid}/epm/linux"
    }
  ],
  "x-readme": {}
}
```