Skip to Content
Xeonr Developer Docs
API SpecificationPRIVATEApplications

Update Role

POST
/xeonr.auth.private.v1.ApplicationsService/UpdateRole

Updates an existing role's properties (e.g. iac_managed) without requiring delete and recreate.

Required scopes: auth:roles:edit (organisation-wide) or auth:apps:edit:own (applications owned by a team you belong to)

Authorization

BearerAuth
AuthorizationBearer <token>

JWT access token for internal API access. Requires 'private' scope for most endpoints, 'admin' scope for administrative operations.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

targetRoleType?string

Disambiguates same-name roles across types; unspecified targets the application role. Changing an existing role's type is not supported.

Value in"ROLE_TYPE_UNSPECIFIED" | "ROLE_TYPE_APPLICATION" | "ROLE_TYPE_TEAM"
applicationId?string
Length1 <= length <= 64
roleName?string
Length1 <= length <= 64
iacManaged?|
roleType?|
description?|
Lengthlength <= 255
defaultOwnerRole?|
displayName?|

Renames the role for humans only — role_name still identifies it and is still what tokens carry. Set it to the empty string to fall back to role_name.

Lengthlength <= 128
teamRank?|

Sets Role.team_rank. Team roles only: a non-zero rank on an application-typed role is refused.

Formatint32
Range0 <= value <= 1000
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.private.v1.ApplicationsService/UpdateRole" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "application": {
    "applicationId": "app_prod_myapp",
    "name": "My Application",
    "slug": "my-application",
    "websiteUrl": "https://myapp.example.com",
    "createdAt": "2023-01-15T01:30:15.01Z",
    "updatedAt": "2023-01-15T01:30:15.01Z",
    "enabledIdps": [
      "github",
      "discord"
    ],
    "scopes": [
      {
        "name": "read:users",
        "description": "Read access to user data",
        "isInternal": true,
        "isSensitive": true,
        "role": {
          "name": "admin",
          "iacManaged": true,
          "roleType": "ROLE_TYPE_UNSPECIFIED",
          "description": "string",
          "defaultOwnerRole": true,
          "displayName": "Administrator",
          "teamRank": 0,
          "ownerInherited": true
        },
        "isDelegatable": true,
        "isServiceAccountOnly": true,
        "isOrgOnly": true,
        "iacManaged": true,
        "dynamicCanGrant": true,
        "tier": "SCOPE_TIER_UNSPECIFIED"
      }
    ],
    "automaticEnrollment": true,
    "audience": [
      "https://api.example.com"
    ],
    "roles": [
      {
        "name": "admin",
        "iacManaged": true,
        "roleType": "ROLE_TYPE_UNSPECIFIED",
        "description": "string",
        "defaultOwnerRole": true,
        "displayName": "Administrator",
        "teamRank": 0,
        "ownerInherited": true
      }
    ],
    "supportsScopedRequests": true,
    "applicationCustomConfig": {
      "jsonSchema": {
        "property1": {},
        "property2": {}
      },
      "uiSchema": {
        "property1": {},
        "property2": {}
      }
    },
    "public": true,
    "resourceTypes": [
      {
        "type": "bucket",
        "jsonSchema": {
          "property1": {},
          "property2": {}
        },
        "displayTitleField": "title",
        "displayDescriptionField": "description",
        "iacManaged": true,
        "parents": [
          "string"
        ],
        "actions": [
          "string"
        ],
        "scopedEnforcement": true
      }
    ],
    "validationCallbackUrl": "https://uploads.example.com/api/auth/validate",
    "iacManaged": true,
    "supportsTeams": true,
    "automaticTeamBinding": true,
    "allowDynamicClients": true,
    "console": {
      "product": true,
      "origin": "string",
      "icon": "string",
      "colour": "string",
      "category": "string",
      "blurb": "string",
      "status": "string",
      "scopes": [
        "string"
      ],
      "pinnedByDefault": true,
      "docsUrl": "string",
      "supportUrl": "string",
      "displayName": "string"
    },
    "ownerTeam": "urn:xeonr:auth:team:6f1a…",
    "ownerTeamSlug": "string",
    "platform": true,
    "signInMode": "SIGN_IN_MODE_UNSPECIFIED",
    "teamEnablement": "TEAM_ENABLEMENT_UNSPECIFIED",
    "tokenClaimsByReference": true
  }
}