Select the tab
ESET Connect – Table of Contents

POST Create role

Relative path: /v2/roles

Creates a new custom [Role].
The role name must be unique within the scope in which the role is created.

Info:
For EPC, name must be unique within the EPC Instance.

Roles created via POST /v2/roles appear in the ESET PROTECT Web Console under More > Permission Sets.

Request body

Display Schema instead of an Example or vice-versa

Type

Required

Example

Schema

application/json

No

{
  "role": {
    "description": "string",
    "displayName": "string",
    "name": "string",
    "permissionNames": [
      "string"
    ]
  }
}
{
  "$ref": "v2CreateRoleRequest",
  "role": {
    "$ref": "v2Role",
    "description": {
      "type": "string",
      "description": "A human-readable description of the role definition."
    },
    "displayName": {
      "type": "string",
      "description": "A human-readable name of the Role."
    },
    "name": {
      "type": "string",
      "description": "The role name. It is a unique ID of the role in the defined scope. It must be a URL-safe identifier. It must consist only of alphanumeric characters (a-z, A-Z, 0-9), dashes (-), and underscores (_). Spaces and special characters are not allowed."
    },
    "permissionNames": [
      {
        "type": "string"
      }
    ]
  }
}


Responses

Display Schema instead of an Example or vice-versa

Code

Description

Example

Schema

200

Successful response.

{
  "role": {
    "description": "string",
    "displayName": "string",
    "name": "string",
    "permissionNames": [
      "string"
    ]
  }
}
{
  "$ref": "v2CreateRoleResponse",
  "role": {
    "$ref": "v2Role",
    "description": {
      "type": "string",
      "description": "A human-readable description of the role definition."
    },
    "displayName": {
      "type": "string",
      "description": "A human-readable name of the Role."
    },
    "name": {
      "type": "string",
      "description": "The role name. It is a unique ID of the role in the defined scope. It must be a URL-safe identifier. It must consist only of alphanumeric characters (a-z, A-Z, 0-9), dashes (-), and underscores (_). Spaces and special characters are not allowed."
    },
    "permissionNames": [
      {
        "type": "string"
      }
    ]
  }
}

202

Response took too long; request cached. Response can be retrieved later using the response-id header.

null
[]

400

One of the errors: 1. Bad or missing authorization. 2. Validation error. Invalid argument provided.

null
[]

401

Token has expired or is invalid.

null
[]

403

Access denied. Check permissions.

null
[]

404

Requested resource not found.

null
[]

429

Rate limit reached. Try again later.

null
[]

500

Internal server failure. Try again later.

null
[]

502

Internal server failure. Try again later.

null
[]

503

Environment under maintenance. Try again later.

null
[]

504

Action took too long; timeout reached

null
[]