SigNoz routepolicies API

The routepolicies API from SigNoz — 2 operation(s) for routepolicies.

OpenAPI Specification

signoz-routepolicies-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 routepolicies 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: routepolicies
paths:
  /api/v1/route_policies:
    get:
      deprecated: false
      description: This endpoint lists all route policies for the organization
      operationId: GetAllRoutePolicies
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/AlertmanagertypesGettableRoutePolicy'
                    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 route policies
      tags:
      - routepolicies
    post:
      deprecated: false
      description: This endpoint creates a route policy
      operationId: CreateRoutePolicy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertmanagertypesPostableRoutePolicy'
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/AlertmanagertypesGettableRoutePolicy'
                  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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Create route policy
      tags:
      - routepolicies
  /api/v1/route_policies/{id}:
    delete:
      deprecated: false
      description: This endpoint deletes a route policy by ID
      operationId: DeleteRoutePolicyByID
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderErrorResponse'
          description: Internal Server Error
      security:
      - api_key:
        - ADMIN
      - tokenizer:
        - ADMIN
      summary: Delete route policy
      tags:
      - routepolicies
    get:
      deprecated: false
      description: This endpoint returns a route policy by ID
      operationId: GetRoutePolicyByID
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/AlertmanagertypesGettableRoutePolicy'
                  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 route policy by ID
      tags:
      - routepolicies
    put:
      deprecated: false
      description: This endpoint updates a route policy by ID
      operationId: UpdateRoutePolicy
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertmanagertypesPostableRoutePolicy'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/AlertmanagertypesGettableRoutePolicy'
                  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: Update route policy
      tags:
      - routepolicies
components:
  schemas:
    RenderErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorsJSON'
        status:
          type: string
      required:
      - status
      - error
      type: object
    AlertmanagertypesExpressionKind:
      enum:
      - rule
      - policy
      type: string
    ErrorsJSON:
      properties:
        code:
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorsResponseerroradditional'
          type: array
        message:
          type: string
        url:
          type: string
      required:
      - code
      - message
      type: object
    ErrorsResponseerroradditional:
      properties:
        message:
          type: string
      type: object
    AlertmanagertypesGettableRoutePolicy:
      properties:
        channels:
          items:
            type: string
          nullable: true
          type: array
        createdAt:
          format: date-time
          type: string
        createdBy:
          nullable: true
          type: string
        description:
          type: string
        expression:
          type: string
        id:
          type: string
        kind:
          $ref: '#/components/schemas/AlertmanagertypesExpressionKind'
        name:
          type: string
        tags:
          items:
            type: string
          nullable: true
          type: array
        updatedAt:
          format: date-time
          type: string
        updatedBy:
          nullable: true
          type: string
      required:
      - expression
      - channels
      - name
      - id
      - createdAt
      - updatedAt
      type: object
    AlertmanagertypesPostableRoutePolicy:
      properties:
        channels:
          items:
            type: string
          nullable: true
          type: array
        description:
          type: string
        expression:
          type: string
        kind:
          $ref: '#/components/schemas/AlertmanagertypesExpressionKind'
        name:
          type: string
        tags:
          items:
            type: string
          nullable: true
          type: array
      required:
      - expression
      - channels
      - name
      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