openapi: 3.2.0
info:
version: 1.0.0
title: OneRail Operation Dashboard Role API
description: Defines Operations Dashboard APIs
license:
name: UNLICENSED
url: ''
servers:
- url: /
description: Default relative server URL
security:
- bearer: []
tags:
- name: Role
paths:
/v1/role:
post:
x-exegesis-controller: Role
summary: Creates a new Role
operationId: createRole
tags:
- Role
requestBody:
required: true
content:
application/json:
schema:
type: object
description: Role
required:
- name
- permissions
- organizationId
properties:
name:
type: string
permissions:
type: array
description: array of permission ids
items:
$ref: '#/paths/~1v1~1user~1%7BuserId%7D~1permissions/get/responses/200/content/application~1json/schema/items'
organizationId:
type: string
format: uuid
responses:
'200':
description: Role record
content:
application/json:
schema:
type: object
description: Role
required:
- name
- permissions
properties:
id:
type: string
format: uuid
name:
type: string
organizationId:
type: string
format: uuid
permissions:
type: array
description: array of permissions
items:
$ref: '#/paths/~1v1~1user~1%7BuserId%7D~1permissions/get/responses/200/content/application~1json/schema/items'
updatedAt:
type: string
format: date-time
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
/v1/role/{roleId}:
parameters:
- name: roleId
in: path
required: true
description: role id
schema:
type: string
get:
x-exegesis-controller: Role
summary: Get Role's record
operationId: getRole
tags:
- Role
responses:
'200':
description: Role record
content:
application/json:
schema:
$ref: '#/paths/~1v1~1role/post/responses/200/content/application~1json/schema'
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
put:
x-exegesis-controller: Role
summary: Update Role's record
operationId: updateRole
tags:
- Role
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/paths/~1v1~1role/post/requestBody/content/application~1json/schema'
responses:
'200':
description: Role record
content:
application/json:
schema:
$ref: '#/paths/~1v1~1role/post/responses/200/content/application~1json/schema'
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
delete:
x-exegesis-controller: Role
summary: Deletes Role
operationId: removeRole
tags:
- Role
responses:
'200':
description: Success.
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
components:
securitySchemes:
bearer:
type: http
scheme: bearer
description: 'Standard JWT bearer token used for authenticated OmniPoint users
and internal service-to-service calls. Clients send `Authorization: Bearer <jwt>`
and the token is validated using the shared Core access token secret.
'
ApiKey:
type: apiKey
in: header
name: X-ONERAIL-API-KEY
description: 'Shared secret key used for machine-to-machine integrations. Must be sent
together with `X-ONERAIL-APP-ID` and is validated against the stored ApiAuth
record for that application.
'
AppId:
type: apiKey
in: header
name: X-ONERAIL-APP-ID
description: 'Application identifier (UUID) that pairs with `X-ONERAIL-API-KEY` for
machine-to-machine integrations. Both headers are required for ApiKey-based
authentication.
'
OAuth:
type: oauth2
description: 'OAuth 2.0 access token validated by the Operations service (e.g. Okta-backed
integrations). Clients obtain tokens from their own IdP outside of this API
and call endpoints with `Authorization: OAuth <access_token>`. The
`authorizationUrl` and `tokenUrl` values below are placeholders only to
satisfy the OpenAPI schema; this service does not call them directly and the
real IdP URLs are configured via environment and introspection logic in code.
'
flows:
authorizationCode:
authorizationUrl: https://dummy-unused-url.com
tokenUrl: https://dummy-unused-url.com
scopes: {}