NexGen Cloud Firewalls API

A firewall is a set of inbound and outbound rules scoped to an environment. Attach a firewall to one or more virtual machines or Kubernetes clusters to control which network traffic each resource can send and receive. Default rules block all inbound traffic, add explicit allow rules for SSH, HTTP, or any service you need to expose.

Operations 6

GET /core/firewalls List firewalls #
POST /core/firewalls Create firewall #
POST /core/firewalls/{firewall_id}/firewall-rules Add firewall rule to firewall #
DELETE /core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id} Delete firewall rules from firewall #
GET /core/firewalls/{id} Retrieve firewall details #
DELETE /core/firewalls/{id} Delete firewall #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nexgen-cloud-firewalls-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nexgen-cloud-firewalls-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Infrahub Firewalls API
  version: '1.0'
  description: Firewalls APIs
servers:
- url: https://infrahub-api.nexgencloud.com/v1
security:
- accessToken: []
- apiKey: []
tags:
- name: Firewalls
  description: Firewalls APIs
paths:
  /core/firewalls:
    get:
      tags:
      - Firewalls
      summary: List firewalls
      description: Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, **click here**.
      operationId: List_existing_firewalls
      parameters:
      - name: page
        in: query
        schema:
          type: integer
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: search
        in: query
        schema:
          type: string
      - name: environment
        in: query
        description: Filter Environment ID or Name
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirewallsListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      security:
      - accessToken: []
      - apiKey: []
    post:
      tags:
      - Firewalls
      summary: Create firewall
      description: Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the **list environments** endpoint.
      operationId: Create_firewall
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFirewallPayload'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirewallResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      security:
      - accessToken: []
      - apiKey: []
      x-codegen-request-body-name: payload
  /core/firewalls/{firewall_id}/firewall-rules:
    post:
      tags:
      - Firewalls
      summary: Add firewall rule to firewall
      description: Creates a **firewall rule** and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
      operationId: Add_rule_to_firewall
      parameters:
      - name: firewall_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Create_Firewall_Rule_Payload'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Firewall_Rule'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      security:
      - accessToken: []
      - apiKey: []
      x-codegen-request-body-name: payload
  /core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id}:
    delete:
      tags:
      - Firewalls
      summary: Delete firewall rules from firewall
      description: Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, **click here**.
      operationId: Delete_rule_from_firewall
      parameters:
      - name: firewall_id
        in: path
        required: true
        schema:
          type: integer
      - name: firewall_rule_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '404':
          description: Not Exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      security:
      - accessToken: []
      - apiKey: []
  /core/firewalls/{id}:
    get:
      tags:
      - Firewalls
      summary: Retrieve firewall details
      description: Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
      operationId: Get_firewall
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirewallDetailResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      security:
      - accessToken: []
      - apiKey: []
    delete:
      tags:
      - Firewalls
      summary: Delete firewall
      description: Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, **click here**.
      operationId: Delete_existing_firewall
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      security:
      - accessToken: []
      - apiKey: []
components:
  schemas:
    FirewallDetailFields:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        environment:
          $ref: '#/components/schemas/FirewallEnvironmentFields'
        status:
          type: string
        created_at:
          type: string
          format: date-time
        rules:
          type: array
          items:
            $ref: '#/components/schemas/SecurityGroupRuleFields'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Firewall_Attachment_Model'
    Firewall_Rule:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
        firewall_rule:
          $ref: '#/components/schemas/SecurityGroupRuleFields'
    FirewallResponse:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
        firewall:
          $ref: '#/components/schemas/FirewallFields'
    FirewallDetailResponse:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
        firewall:
          $ref: '#/components/schemas/FirewallDetailFields'
    FirewallsListResponse:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
        page:
          type: integer
        page_size:
          type: integer
        count:
          type: integer
        firewalls:
          type: array
          items:
            $ref: '#/components/schemas/FirewallDetailFields'
    ErrorResponseModel:
      type: object
      properties:
        status:
          type: boolean
          default: false
        message:
          type: string
        error_reason:
          type: string
    FirewallEnvironmentFields:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        region:
          type: string
    CreateFirewallPayload:
      required:
      - environment_id
      - name
      type: object
      properties:
        name:
          type: string
          description: Name of the firewall.
        description:
          type: string
          description: Description of the firewall.
        environment_id:
          type: integer
          description: ID of the environment.
    SecurityGroupRuleFields:
      type: object
      properties:
        id:
          type: integer
        direction:
          type: string
        protocol:
          type: string
        port_range_min:
          type: integer
        port_range_max:
          type: integer
        ethertype:
          type: string
        remote_ip_prefix:
          type: string
        status:
          type: string
        created_at:
          type: string
          format: date-time
    Firewall_Attachment_Model:
      type: object
      properties:
        id:
          type: integer
        status:
          type: string
        vm:
          $ref: '#/components/schemas/Firewall_Attachment_VM_Model'
        created_at:
          type: string
          format: date-time
    FirewallFields:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        environment:
          $ref: '#/components/schemas/FirewallEnvironmentFields'
        status:
          type: string
        created_at:
          type: string
          format: date-time
    Firewall_Attachment_VM_Model:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        flavor:
          type: string
        environment:
          type: string
        status:
          type: string
        created_at:
          type: string
          format: date-time
    ResponseModel:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
    Create_Firewall_Rule_Payload:
      required:
      - direction
      - ethertype
      - protocol
      - remote_ip_prefix
      type: object
      properties:
        direction:
          type: string
          description: The direction of traffic that the firewall rule applies to.
        protocol:
          type: string
          description: The network protocol associated with the rule. Call the [`GET /core/sg-rules-protocols`](https://infrahub-api-doc.nexgencloud.com/#get-/core/sg-rules-protocols) endpoint to retrieve a list of permitted network protocols.
          example: any
          enum:
          - any
          - ah
          - dccp
          - egp
          - esp
          - gre
          - hopopt
          - icmp
          - igmp
          - ip
          - ipip
          - ipv6-encap
          - ipv6-frag
          - ipv6-icmp
          - icmpv6
          - ipv6-nonxt
          - ipv6-opts
          - ipv6-route
          - ospf
          - pgm
          - rsvp
          - sctp
          - tcp
          - udp
          - udplite
          - vrrp
        port_range_min:
          type: integer
          description: The minimum port number in the range of ports to be allowed by the firewall rule.
        port_range_max:
          type: integer
          description: The maximum port number in the range of ports to be allowed by the firewall rule.
        ethertype:
          type: string
          description: The Ethernet type associated with the rule.
        remote_ip_prefix:
          type: string
          description: The IP address range that is allowed to access the specified port. Use "0.0.0.0/0" to allow any IP address.
  securitySchemes:
    accessToken:
      type: apiKey
      description: Bearer Token
      name: Authorization
      in: header
    apiKey:
      type: apiKey
      description: Send it as api_key in header
      name: api_key
      in: header
x-original-swagger-version: '2.0'