SigNoz preferences API

The preferences API from SigNoz — 4 operation(s) for preferences.

OpenAPI Specification

signoz-preferences-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 preferences 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: preferences
paths:
  /api/v1/org/preferences:
    get:
      deprecated: false
      description: This endpoint lists all org preferences
      operationId: ListOrgPreferences
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/PreferencetypesPreference'
                    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 org preferences
      tags:
      - preferences
  /api/v1/org/preferences/{name}:
    get:
      deprecated: false
      description: This endpoint returns the org preference by name
      operationId: GetOrgPreference
      parameters:
      - in: path
        name: name
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/PreferencetypesPreference'
                  status:
                    type: string
                required:
                - status
                - data
                type: object
          description: OK
        '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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Get org preference
      tags:
      - preferences
    put:
      deprecated: false
      description: This endpoint updates the org preference by name
      operationId: UpdateOrgPreference
      parameters:
      - in: path
        name: name
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreferencetypesUpdatablePreference'
      responses:
        '204':
          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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Update org preference
      tags:
      - preferences
  /api/v1/user/preferences:
    get:
      deprecated: false
      description: This endpoint lists all user preferences
      operationId: ListUserPreferences
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/PreferencetypesPreference'
                    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:
        - VIEWER
      - tokenizer:
        - VIEWER
      summary: List user preferences
      tags:
      - preferences
  /api/v1/user/preferences/{name}:
    get:
      deprecated: false
      description: This endpoint returns the user preference by name
      operationId: GetUserPreference
      parameters:
      - in: path
        name: name
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/PreferencetypesPreference'
                  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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - VIEWER
      - tokenizer:
        - VIEWER
      summary: Get user preference
      tags:
      - preferences
    put:
      deprecated: false
      description: This endpoint updates the user preference by name
      operationId: UpdateUserPreference
      parameters:
      - in: path
        name: name
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreferencetypesUpdatablePreference'
      responses:
        '204':
          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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - VIEWER
      - tokenizer:
        - VIEWER
      summary: Update user preference
      tags:
      - preferences
components:
  schemas:
    RenderErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorsJSON'
        status:
          type: string
      required:
      - status
      - error
      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
    PreferencetypesUpdatablePreference:
      properties:
        value: {}
      type: object
    ErrorsResponseerroradditional:
      properties:
        message:
          type: string
      type: object
    PreferencetypesValue:
      type: object
    PreferencetypesPreference:
      properties:
        allowedScopes:
          items:
            type: string
          nullable: true
          type: array
        allowedValues:
          items:
            type: string
          nullable: true
          type: array
        defaultValue:
          $ref: '#/components/schemas/PreferencetypesValue'
        description:
          type: string
        name:
          type: string
        value:
          $ref: '#/components/schemas/PreferencetypesValue'
        valueType:
          type: string
      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