Docs API reference

neoserver 0.1.2

Create claim mapping

POST /api/v1/workspaces/{workspace}/claim-mappings · Claim Mappings

← All operations and schemas
POST /api/v1/workspaces/{workspace}/claim-mappings

Creates a mapping from an OIDC/JWT claim to a role for this workspace.

Operation ID: createClaimMapping

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

workspace path required

Workspace ID

string

Request body

Required

Claim mapping to create

Content type application/json

object
claim_name string required

JWT claim name (e.g., groups, roles)

claim_value string required

Claim value to match

priority integer

Priority (higher = checked first)

role_id string required

Role to assign

Responses

201 Created claim mapping

Content type application/json

400 Bad Request

Content type application/json

401 Unauthorized

Content type application/json

403 Forbidden

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": "Creates a mapping from an OIDC/JWT claim to a role for this workspace.",
  "operationId": "createClaimMapping",
  "parameters": [
    {
      "description": "Workspace ID",
      "in": "path",
      "name": "workspace",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "claim_name": {
              "description": "JWT claim name (e.g., groups, roles)",
              "type": "string"
            },
            "claim_value": {
              "description": "Claim value to match",
              "type": "string"
            },
            "priority": {
              "description": "Priority (higher = checked first)",
              "type": "integer"
            },
            "role_id": {
              "description": "Role to assign",
              "type": "string"
            }
          },
          "required": [
            "claim_name",
            "claim_value",
            "role_id"
          ],
          "type": "object"
        }
      }
    },
    "description": "Claim mapping to create",
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ClaimMapping"
          }
        }
      },
      "description": "Created claim mapping"
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Bad Request"
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Unauthorized"
    },
    "403": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Forbidden"
    },
    "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": "Create claim mapping",
  "tags": [
    "Claim Mappings"
  ]
}

Search documentation

Type to search guides and reference pages.