SigNoz role API

The role API from SigNoz — 3 operation(s) for role.

OpenAPI Specification

signoz-role-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    email: support@signoz.io
    name: SigNoz Support
    url: https://signoz.io
  description: OpenTelemetry-Native Logs, Metrics and Traces in a single pane
  termsOfService: https://signoz.io/terms-of-service/
  title: SigNoz alerts role API
  version: ''
servers:
- description: The fully qualified URL to the SigNoz APIServer.
  url: https://{host}:{port}{base_path}
  variables:
    base_path:
      default: /
      description: The base path of the SigNoz APIServer
    host:
      default: localhost
      description: The host of the SigNoz APIServer
    port:
      default: '8080'
      description: The port of the SigNoz APIServer
tags:
- name: role
paths:
  /api/v1/roles:
    get:
      deprecated: false
      description: This endpoint lists all roles
      operationId: ListRoles
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/AuthtypesRole'
                    type: array
                  status:
                    type: string
                required:
                - status
                - data
                type: object
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: List roles
      tags:
      - role
    post:
      deprecated: false
      description: This endpoint creates a role
      operationId: CreateRole
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthtypesPostableRole'
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/TypesIdentifiable'
                  status:
                    type: string
                required:
                - status
                - data
                type: object
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Conflict
        '451':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unavailable For Legal Reasons
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Implemented
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Create role
      tags:
      - role
  /api/v1/roles/{id}:
    delete:
      deprecated: false
      description: This endpoint deletes a role
      operationId: DeleteRole
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          content:
            application/json:
              schema:
                type: string
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Found
        '451':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unavailable For Legal Reasons
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Implemented
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Delete role
      tags:
      - role
    get:
      deprecated: false
      description: This endpoint gets a role
      operationId: GetRole
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/AuthtypesRole'
                  status:
                    type: string
                required:
                - status
                - data
                type: object
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Get role
      tags:
      - role
    patch:
      deprecated: false
      description: This endpoint patches a role
      operationId: PatchRole
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthtypesPatchableRole'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: string
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Found
        '451':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unavailable For Legal Reasons
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Implemented
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Patch role
      tags:
      - role
  /api/v1/roles/{id}/relations/{relation}/objects:
    get:
      deprecated: false
      description: Gets all objects connected to the specified role via a given relation type
      operationId: GetObjects
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      - in: path
        name: relation
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/AuthtypesGettableObjects'
                    type: array
                  status:
                    type: string
                required:
                - status
                - data
                type: object
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Found
        '451':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unavailable For Legal Reasons
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Implemented
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Get objects for a role by relation
      tags:
      - role
    patch:
      deprecated: false
      description: Patches the objects connected to the specified role via a given relation type
      operationId: PatchObjects
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      - in: path
        name: relation
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthtypesPatchableObjects'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: string
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Found
        '451':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Unavailable For Legal Reasons
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Not Implemented
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Patch objects for a role by relation
      tags:
      - role
components:
  schemas:
    AuthtypesPostableRole:
      properties:
        description:
          type: string
        name:
          type: string
      required:
      - name
      type: object
    AuthtypesGettableObjects:
      properties:
        resource:
          $ref: '#/components/schemas/AuthtypesResource'
        selectors:
          items:
            type: string
          type: array
      required:
      - resource
      - selectors
      type: object
    RenderErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorsJSON'
        status:
          type: string
      required:
      - status
      - error
      type: object
    AuthtypesPatchableObjects:
      properties:
        additions:
          items:
            $ref: '#/components/schemas/AuthtypesGettableObjects'
          nullable: true
          type: array
        deletions:
          items:
            $ref: '#/components/schemas/AuthtypesGettableObjects'
          nullable: true
          type: array
      required:
      - additions
      - deletions
      type: object
    AuthtypesResource:
      properties:
        name:
          type: string
        type:
          type: string
      required:
      - name
      - type
      type: object
    ErrorsJSON:
      properties:
        code:
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorsResponseerroradditional'
          type: array
        message:
          type: string
        url:
          type: string
      required:
      - code
      - message
      type: object
    AuthtypesPatchableRole:
      properties:
        description:
          type: string
      required:
      - description
      type: object
    ErrorsResponseerroradditional:
      properties:
        message:
          type: string
      type: object
    AuthtypesRole:
      properties:
        createdAt:
          format: date-time
          type: string
        description:
          type: string
        id:
          type: string
        name:
          type: string
        orgId:
          type: string
        type:
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
      - id
      - name
      - description
      - type
      - orgId
      type: object
    TypesIdentifiable:
      properties:
        id:
          type: string
      required:
      - id
      type: object
  securitySchemes:
    api_key:
      description: API Keys
      in: header
      name: SigNoz-Api-Key
      type: apiKey
    tokenizer:
      bearerFormat: Tokenizer
      description: Tokens generated by the tokenizer
      scheme: bearer
      type: http