openapi: 3.0.0
info:
  license:
    name: MIT
    url: https://github.com/aziontech/azionapi-openapi/blob/main/LICENSE.md
  title: Edge Functions Instances API
  version: 2.0.0
servers:
- description: Production
  url: https://api.azionapi.net
security:
- tokenAuth: []
paths:
  /edge_firewall/{edge_firewall_id}/functions_instances:
    get:
      parameters:
      - explode: false
        in: path
        name: edge_firewall_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - explode: true
        in: query
        name: page
        required: false
        schema:
          format: int64
          type: integer
        style: form
      - explode: true
        in: query
        name: page_size
        required: false
        schema:
          format: int64
          type: integer
        style: form
      - explode: true
        in: query
        name: sort
        required: false
        schema:
          type: string
        style: form
      - explode: true
        in: query
        name: order_by
        required: false
        schema:
          type: string
        style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEdgeFunctionsInstancesResponse'
          description: A list of Edge Functions Instances
        "400":
          description: Bad Request
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: List all user Edge Functions Instances
    post:
      parameters:
      - explode: false
        in: path
        name: edge_firewall_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEdgeFunctionsInstancesRequest'
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EdgeFunctionsInstanceResponse'
          description: Edge Functions Instance created
        "400":
          description: Bad Request
        "403":
          description: Forbidden
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
      summary: Create an Edge Functions Instance
  /edge_firewall/{edge_firewall_id}/functions_instances/{edge_function_instance_id}:
    delete:
      parameters:
      - explode: false
        in: path
        name: edge_firewall_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - explode: false
        in: path
        name: edge_function_instance_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      responses:
        "204":
          description: Successfully deleted
        "400":
          description: Bad Request
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: Delete an Edge Functions Instance by uuid
    get:
      parameters:
      - explode: false
        in: path
        name: edge_firewall_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - explode: false
        in: path
        name: edge_function_instance_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EdgeFunctionsInstanceResponse'
          description: An Edge Functions Instance object
        "400":
          description: Bad Request
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: Retrieve an Edge Functions Instance set by uuid
    patch:
      parameters:
      - explode: false
        in: path
        name: edge_firewall_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - explode: false
        in: path
        name: edge_function_instance_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEdgeFunctionsInstanceRequest'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EdgeFunctionsInstanceResponse'
          description: Successfully updated
        "400":
          description: Bad Request
        "403":
          description: Forbidden
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
      summary: Update some Edge Functions Instance attributes
    put:
      parameters:
      - explode: false
        in: path
        name: edge_firewall_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - explode: false
        in: path
        name: edge_function_instance_id
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEdgeFunctionsInstanceRequest'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EdgeFunctionsInstanceResponse'
          description: Successfully updated
        "400":
          description: Bad Request
        "403":
          description: Forbidden
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
      summary: Overwrite some Edge Functions Instance attributes
components:
  schemas:
    Links:
      example:
        next: next
        previous: previous
      properties:
        previous:
          type: string
        next:
          type: string
      type: object
    EdgeFunctionsInstance:
      example:
        edge_function: 3254
        name: New Edge Function Instance
        json_args: {}
        id: 1614
      properties:
        id:
          format: int64
          type: integer
        name:
          type: string
        last_editor:
          type: string
        last_modified:
          type: string
        json_args: {}
        edge_function:
          format: int64
          type: integer
      type: object
    ListEdgeFunctionsInstancesResponse:
      example:
        schema_version: 1
        count: 0
        links:
          next: next
          previous: previous
        total_pages: 6
        results:
        - edge_function: 3254
          name: New Edge Function Instance
          json_args: {}
          id: 1614
        - edge_function: 3254
          name: New Edge Function Instance
          json_args: {}
          id: 1614
      properties:
        count:
          format: int64
          type: integer
        total_pages:
          format: int64
          type: integer
        schema_version:
          format: int64
          type: integer
        links:
          $ref: '#/components/schemas/Links'
        results:
          items:
            $ref: '#/components/schemas/EdgeFunctionsInstance'
          type: array
      type: object
    CreateEdgeFunctionsInstancesRequest:
      example:
        edge_function: 0
        name: Edge Functions Instance
        json_args: "{}"
      properties:
        name:
          example: Edge Functions Instance
          type: string
        edge_function:
          format: int64
          type: integer
        json_args:
          $ref: '#/components/schemas/CreateEdgeFunctionsInstancesRequest_json_args'
      type: object
    EdgeFunctionsInstanceResponse:
      example:
        schema_version: 0.8008281904610115
        results:
          edge_function: 3254
          name: New Edge Function Instance
          json_args: {}
          id: 1614
      properties:
        results:
          $ref: '#/components/schemas/EdgeFunctionsInstance'
        schema_version:
          type: number
      type: object
    UpdateEdgeFunctionsInstanceRequest:
      $ref: '#/components/schemas/CreateEdgeFunctionsInstancesRequest'
    CreateEdgeFunctionsInstancesRequest_json_args:
      oneOf:
      - type: object
      - items:
          type: object
        type: array
  securitySchemes:
    tokenAuth:
      description: |
        You must inform a token to auth.
        Usage format: `Token <TOKEN>`
      in: header
      name: Authorization
      type: apiKey
