Docs API reference

neoserver 0.1.2

Grant a service or operation

POST /api/v1/roles/{roleId}/policies · Roles

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

Operation ID: addRolePolicy

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
string

Request body

Required

Operation policy

Content type application/json

Responses

201 Granted

No response body is specified.

401 Authentication required or credential rejected

Content type application/json

403 Insufficient permission, disabled login, or invalid CSRF

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
{
  "operationId": "addRolePolicy",
  "parameters": [
    {
      "in": "path",
      "name": "roleId",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RolePolicy"
        }
      }
    },
    "description": "Operation policy",
    "required": true
  },
  "responses": {
    "201": {
      "description": "Granted"
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Authentication required or credential rejected"
    },
    "403": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Insufficient permission, disabled login, or invalid CSRF"
    },
    "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": "Grant a service or operation",
  "tags": [
    "Roles"
  ]
}

Search documentation

Type to search guides and reference pages.