Panther global API

The global api handles all operations for globals

OpenAPI Specification

panther-global-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Panther REST alert global API
  version: '1.0'
  description: The alert api handles all operations for alerts
servers:
- url: https://{api_host}
  variables:
    api_host:
      default: your-api-host
security:
- ApiKeyAuth: []
tags:
- name: global
  description: The global api handles all operations for globals
paths:
  /globals:
    get:
      tags:
      - global
      summary: list globals
      operationId: global#list
      parameters:
      - name: cursor
        in: query
        description: the pagination token
        allowEmptyValue: true
        schema:
          type: string
          description: the pagination token
      - name: limit
        in: query
        description: the maximum results to return
        allowEmptyValue: true
        schema:
          type: integer
          description: the maximum results to return
          default: 100
          format: int64
      - name: name-contains
        in: query
        description: Substring search by name (case-insensitive)
        allowEmptyValue: true
        schema:
          type: string
          description: Substring search by name (case-insensitive)
      - name: created-by
        in: query
        description: Only include rules whose creator matches this user ID or actor ID
        allowEmptyValue: true
        schema:
          type: string
          description: Only include rules whose creator matches this user ID or actor ID
      - name: last-modified-by
        in: query
        description: Only include rules last modified by this user ID or actor ID
        allowEmptyValue: true
        schema:
          type: string
          description: Only include rules last modified by this user ID or actor ID
      responses:
        '200':
          description: OK response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.ListResp'
    post:
      tags:
      - global
      summary: create global
      operationId: global#create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GlobalAPI.ModifyGlobal'
      responses:
        '200':
          description: OK response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.Global'
        '400':
          description: 'bad_request: Bad Request response.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.BadRequestError'
        '409':
          description: 'exists: Conflict response.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.ExistsError'
  /globals/{id}:
    delete:
      tags:
      - global
      summary: delete global
      operationId: global#delete
      parameters:
      - name: id
        in: path
        description: ID of the global to delete
        required: true
        schema:
          type: string
          description: ID of the global to delete
      responses:
        '204':
          description: No Content response.
        '400':
          description: 'bad_request: Bad Request response.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.BadRequestError'
        '404':
          description: 'not_found: Not Found response.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.NotFoundError'
    get:
      tags:
      - global
      summary: get global
      operationId: global#get
      parameters:
      - name: id
        in: path
        description: ID of the global to fetch
        required: true
        schema:
          type: string
          description: ID of the global to fetch
      responses:
        '200':
          description: OK response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.Global'
        '404':
          description: 'not_found: Not Found response.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.NotFoundError'
    put:
      tags:
      - global
      summary: put global
      description: put creates or updates a global
      operationId: global#put
      parameters:
      - name: id
        in: path
        description: The id of the global
        required: true
        schema:
          type: string
          description: The id of the global
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GlobalAPI.ModifyGlobal2'
      responses:
        '200':
          description: 200 returned if the item already existed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.PutGlobalResp'
        '201':
          description: 201 returned if the item was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.PutGlobalResp'
        '400':
          description: 'bad_request: Bad Request response.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAPI.BadRequestError'
components:
  schemas:
    GlobalAPI.ModifyGlobal2:
      type: object
      properties:
        body:
          type: string
          description: The python body of the global
        description:
          type: string
          description: The description of the global
        tags:
          type: array
          items:
            type: string
          description: The tags for the global
      required:
      - body
    GlobalAPI.ModifyGlobal:
      type: object
      properties:
        body:
          type: string
          description: The python body of the global
        description:
          type: string
          description: The description of the global
        id:
          type: string
          description: The id of the global
        tags:
          type: array
          items:
            type: string
          description: The tags for the global
      required:
      - id
      - body
    GlobalAPI.BadRequestError:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    GlobalAPI.NotFoundError:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    GlobalAPI.PutGlobalResp:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/GlobalAPI.Global'
    GlobalAPI.ListResp:
      type: object
      properties:
        next:
          type: string
          description: pagination token for the next page of results
        results:
          type: array
          items:
            $ref: '#/components/schemas/GlobalAPI.Global'
    GlobalAPI.Global:
      type: object
      properties:
        body:
          type: string
          description: The python body of the global
        createdAt:
          type: string
        description:
          type: string
          description: The description of the global
        id:
          type: string
          description: The id of the global
        lastModified:
          type: string
        tags:
          type: array
          items:
            type: string
          description: The tags for the global
    GlobalAPI.ExistsError:
      type: object
      properties:
        message:
          type: string
      required:
      - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-API-Key
      in: header