> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ck-itsolutions.nl/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Flowrule

> Creates a new flowrule



## OpenAPI

````yaml POST /flowrule
openapi: 3.0.1
info:
  title: Ck IT Solutions API
  description: An API that can be used to mange Ck IT Solutions products and services.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.ck-itsolutions.nl/v1
security:
  - ApiKeyAuth: []
paths:
  /flowrule:
    post:
      description: Creates a new flowrule
      requestBody:
        description: Plant to add to the store
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/new_flowrule'
        required: true
      responses:
        '200':
          description: Returns newly created flowrule with uuid as json.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list_rules'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    new_flowrule:
      allOf:
        - $ref: '#/components/schemas/list_rules'
        - required:
            - dst
            - protocol
            - layer4
            - rate
          type: object
          properties:
            dst:
              description: >-
                Destination IP the flowrule needs to be created for (subnets
                supported).
              type: string
              example: false
            port:
              type: object
              properties:
                match:
                  type: boolean
                  example: false
                src:
                  type: object
                  properties:
                    start:
                      type: integer
                      description: Start port number for source port range
                      example: 0
                    end:
                      type: integer
                      description: End port number for source port range
                      example: 0
                dst:
                  type: object
                  properties:
                    start:
                      type: integer
                      description: Start port number for destination port range
                      example: 0
                    end:
                      type: integer
                      description: End port number for destination port range
                      example: 0
            protocol:
              description: Protocol type (e.g., tcp, udp).
              type: string
            packetlength:
              type: object
              properties:
                start:
                  type: integer
                  description: Start length for packet length range
                  example: 0
                end:
                  type: integer
                  description: End length for packet length range
                  example: 0
            rate:
              type: object
              properties:
                mbit:
                  type: integer
                  description: Rate limit in megabits per second
                  example: 0
                kpps:
                  type: integer
                  description: Rate limit in kilopackets per second
                  example: 0
            threshold:
              type: object
              properties:
                set:
                  type: boolean
                  description: Whether threshold is set
                  example: false
                mbit:
                  type: integer
                  description: Threshold in megabits per second
                  example: 0
                kpps:
                  type: integer
                  description: Threshold in kilopackets per second
                  example: 0
            layer4:
              description: Indicates if layer 4 filtering is applied
              type: boolean
              example: false
            layer7:
              description: Indicates if layer 7 filtering is applied
              type: boolean
              example: false
            priority:
              description: Rule priority with 1 being highest priority.
              type: integer
    list_rules:
      required:
        - name
      type: object
    Error:
      required:
        - error
        - message
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````