Docs API reference

neoserver 0.1.2

Delete role

DELETE /api/v1/roles/{roleId} · Roles

← All operations and schemas
DELETE /api/v1/roles/{roleId}

Deletes an unassigned custom role and its policies atomically. Remove credential and publication assignments first. System roles cannot be deleted. Requires super_admin role.

Operation ID: deleteRole

Authentication

Use one of the following authentication options. Permissions and workspace scope still apply. See authentication and access control.

  • Authorization: Bearer YOUR_ACCESS_TOKEN
  • X-API-Key: YOUR_API_KEY

Parameters

roleId path required

Role ID

string

Responses

204 No Content

No response body is specified.

400 Cannot delete system role

Content type application/json

401 Unauthorized

Content type application/json

403 Forbidden - requires super_admin role

Content type application/json

404 Role not found

Content type application/json

409 Role still has assignments; inspect its deletion plan

Content type application/json

413 Request body exceeds the configured limit

Content type application/json

426 HTTPS required

Content type application/json

429 Request rate exceeded

Content type application/json

503 Service temporarily unavailable

Content type application/json

OpenAPI operation definition
{
  "description": "Deletes an unassigned custom role and its policies atomically. Remove credential and publication assignments first. System roles cannot be deleted. Requires super_admin role.",
  "operationId": "deleteRole",
  "parameters": [
    {
      "description": "Role ID",
      "in": "path",
      "name": "roleId",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": "No Content"
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Cannot delete system role"
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Unauthorized"
    },
    "403": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Forbidden - requires super_admin role"
    },
    "404": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Role not found"
    },
    "409": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Role still has assignments; inspect its deletion plan"
    },
    "413": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Request body exceeds the configured limit"
    },
    "426": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "HTTPS required"
    },
    "429": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Request rate exceeded"
    },
    "503": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Service temporarily unavailable"
    }
  },
  "summary": "Delete role",
  "tags": [
    "Roles"
  ]
}

Search documentation

Type to search guides and reference pages.