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

# List ports

> List all ports in the specified project and region.
Results can be filtered by network, subnet, IP address, or port ID,
and sorted by `created_at` or `network_id`.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/cloud_api.yaml get /cloud/v1/ports/{project_id}/{region_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 2e769ad691db
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
  - name: Container as a Service
  - name: Cost Reports
  - name: DDoS Protection
  - name: Everywhere Inference
  - name: Everywhere Inference Apps
  - name: File Shares
  - name: Floating IPs
  - name: Function as a Service
  - name: GPU Bare Metal
  - name: GPU Virtual
  - name: IP Ranges
  - name: Images
  - name: Instances
  - name: Load Balancers
  - name: Logging
  - name: Managed Kubernetes
  - name: Managed PostgreSQL
  - name: Networks
  - name: Placement Groups
  - name: Ports
  - name: Projects
  - name: Quotas
  - name: Regions
  - name: Registry
  - name: Reservations
  - name: Reserved IPs
  - name: Routers
  - name: SSH Keys
  - name: Secrets
  - name: Security Groups
  - name: Snapshot Schedules
  - name: Snapshots
  - name: Tasks
  - name: User Actions
  - name: User Role Assignments
  - name: Volumes
paths:
  /cloud/v1/ports/{project_id}/{region_id}:
    get:
      tags:
        - Ports
      summary: List ports
      description: |-
        List all ports in the specified project and region.
        Results can be filtered by network, subnet, IP address, or port ID,
        and sorted by `created_at` or `network_id`.
      operationId: PortListView.get
      parameters:
        - in: path
          name: project_id
          required: true
          description: Project ID
          schema:
            description: Project ID
            example: 1
            examples:
              - 1
            title: Project Id
            type: integer
        - in: path
          name: region_id
          required: true
          description: Region ID
          schema:
            description: Region ID
            example: 1
            examples:
              - 1
            title: Region Id
            type: integer
        - in: query
          name: ids
          required: false
          description: Filter by port ID(s). Exact match.
          schema:
            description: Filter by port ID(s). Exact match.
            items:
              format: uuid4
              type: string
            title: Ids
            type: array
        - in: query
          name: ip_addresses
          required: false
          description: Filter by IP address(es). Exact match.
          schema:
            description: Filter by IP address(es). Exact match.
            items:
              format: ipvanyaddress
              type: string
            title: Ip Addresses
            type: array
        - in: query
          name: limit
          required: false
          description: Optional. Limit the number of returned items
          schema:
            default: 100
            description: Optional. Limit the number of returned items
            example: 100
            examples:
              - 100
            exclusiveMinimum: 0
            maximum: 1000
            title: Limit
            type: integer
        - in: query
          name: network_ids
          required: false
          description: Filter by network ID(s). Exact match.
          schema:
            description: Filter by network ID(s). Exact match.
            items:
              format: uuid4
              type: string
            title: Network Ids
            type: array
        - in: query
          name: offset
          required: false
          description: >-
            Optional. Offset value is used to exclude the first set of records
            from the result
          schema:
            default: 0
            description: >-
              Optional. Offset value is used to exclude the first set of records
              from the result
            example: 0
            examples:
              - 0
            minimum: 0
            title: Offset
            type: integer
        - in: query
          name: order_by
          required: false
          description: Sort field and direction, e.g. `created_at`.desc or `network_id`.asc
          schema:
            $ref: '#/components/schemas/PortListOrderByChoices'
            default: created_at.desc
            description: >-
              Sort field and direction, e.g. `created_at`.desc or
              `network_id`.asc
        - in: query
          name: subnet_ids
          required: false
          description: Filter by subnet ID(s). Exact match.
          schema:
            description: Filter by subnet ID(s). Exact match.
            items:
              format: uuid4
              type: string
            title: Subnet Ids
            type: array
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortListSerializer'
components:
  schemas:
    PortListOrderByChoices:
      enum:
        - created_at.asc
        - created_at.desc
        - network_id.asc
        - network_id.desc
      title: PortListOrderByChoices
      type: string
    PortListSerializer:
      properties:
        count:
          description: Number of objects
          example: 1
          examples:
            - 1
          minimum: 0
          title: Count
          type: integer
        results:
          description: Objects
          items:
            $ref: '#/components/schemas/PortDetailSerializer'
          title: Results
          type: array
      required:
        - count
        - results
      title: PortListSerializer
      type: object
    PortDetailSerializer:
      properties:
        allowed_address_pairs:
          description: >-
            List of allowed address pairs. Sorted by `ip_address` for stable
            client refreshes.
          items:
            $ref: '#/components/schemas/AllowedAddressPairsResponseSerializer'
          title: Allowed Address Pairs
          type: array
        capabilities:
          anyOf:
            - $ref: '#/components/schemas/PortCapabilitiesSerializer'
            - type: 'null'
          description: >-
            What the driver enforces. null when the port is unattached (driver
            unknown).
        created_at:
          description: Datetime when the port was created.
          example: '2024-01-15T10:30:00Z'
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          title: Created At
          type: string
        id:
          description: Port ID
          example: 1f0ca628-a73b-42c0-bdac-7b10d023e097
          examples:
            - 1f0ca628-a73b-42c0-bdac-7b10d023e097
          format: uuid4
          title: Id
          type: string
        ip_assignments:
          description: List of IP addresses assigned to the port.
          items:
            $ref: '#/components/schemas/IpAssignmentSerializer'
          title: Ip Assignments
          type: array
        mac_address:
          description: MAC address of the port
          example: fa:16:3e:f2:87:16
          examples:
            - fa:16:3e:f2:87:16
          title: Mac Address
          type: string
        managed_by:
          $ref: '#/components/schemas/PortManagedBy'
          description: >-
            Who manages this port: 'user' (full CRUD allowed) or 'system'
            (read-only)
          examples:
            - user
        network_id:
          description: ID of the network the port belongs to
          example: bc688791-f1b0-44eb-97d4-07697294b1e1
          examples:
            - bc688791-f1b0-44eb-97d4-07697294b1e1
          format: uuid4
          title: Network Id
          type: string
        port_security_enabled:
          description: >-
            When true, the driver enforces port security on this port
            (anti-spoofing checks and security-group filtering apply). When
            false, all traffic is allowed and security groups are not applied.
          example: true
          examples:
            - true
          title: Port Security Enabled
          type: boolean
        security_group_ids:
          description: >-
            List of security group IDs applied to the port. Sorted
            lexicographically for stable client refreshes.
          example:
            - bc688791-f1b0-44eb-97d4-07697294b1e1
          examples:
            - - bc688791-f1b0-44eb-97d4-07697294b1e1
          items:
            format: uuid4
            type: string
          title: Security Group Ids
          type: array
        tags:
          additionalProperties:
            type: string
          description: Key-value tags on the port
          example:
            env: prod
            team: platform
          examples:
            - env: prod
              team: platform
          title: Tags
          type: object
        updated_at:
          description: Datetime when the port was last updated.
          example: '2025-11-18T10:22:00Z'
          examples:
            - '2025-11-18T10:22:00Z'
          format: date-time
          title: Updated At
          type: string
      required:
        - id
        - mac_address
        - network_id
        - ip_assignments
        - port_security_enabled
        - security_group_ids
        - allowed_address_pairs
        - tags
        - managed_by
        - capabilities
        - created_at
        - updated_at
      title: PortDetailSerializer
      type: object
    AllowedAddressPairsResponseSerializer:
      properties:
        ip_address:
          anyOf:
            - format: ipvanyaddress
              type: string
            - format: ipvanynetwork
              type: string
          description: Subnet mask or IP address of the allowed address pair
          examples:
            - 192.168.123.20
          title: Ip Address
      required:
        - ip_address
      title: AllowedAddressPairsResponseSerializer
      type: object
    PortCapabilitiesSerializer:
      properties:
        allowed_address_pairs:
          description: Whether the driver enforces allowed address pairs on this port
          title: Allowed Address Pairs
          type: boolean
        port_security:
          description: Whether the driver enforces port security on this port
          title: Port Security
          type: boolean
        security_groups:
          description: Whether the driver enforces security groups on this port
          title: Security Groups
          type: boolean
      required:
        - security_groups
        - port_security
        - allowed_address_pairs
      title: PortCapabilitiesSerializer
      type: object
    IpAssignmentSerializer:
      properties:
        ip_address:
          anyOf:
            - format: ipv4
              type: string
            - format: ipv6
              type: string
          description: IP address assigned to the port
          examples:
            - 192.168.123.20
          title: Ip Address
        subnet_id:
          description: ID of the subnet
          example: 351b0dd7-ca09-431c-be53-935db3785067
          examples:
            - 351b0dd7-ca09-431c-be53-935db3785067
          format: uuid4
          title: Subnet Id
          type: string
      required:
        - subnet_id
        - ip_address
      title: IpAssignmentSerializer
      type: object
    PortManagedBy:
      enum:
        - system
        - user
      title: PortManagedBy
      type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````