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

# List all private subnets



## OpenAPI

````yaml /api-reference/openapi.yml get /project/{project_id}/private-subnet
openapi: 3.0.3
info:
  description: API for managing resources on Ubicloud
  title: Clover API
  version: 0.1.0
  contact:
    url: https://www.ubicloud.com/
    email: support@ubicloud.com
  license:
    name: GNU Affero General Public License v3.0 (AGPL-3.0)
    url: https://www.gnu.org/licenses/agpl-3.0.en.html
servers:
  - url: https://api.ubicloud.com
security:
  - BearerAuth: []
tags:
  - description: Firewall Operations
    name: Firewall
  - description: Firewall Rule Operations
    name: Firewall Rule
  - description: Inference API Key Operations
    name: Inference Api Key
  - description: Inference Endpoint Operations
    name: Inference Endpoint
  - description: Load Balancer Operations
    name: Load Balancer
  - description: Login Operations
    name: Login
  - description: Machine Image Operations
    name: Machine Image
  - description: Postgres Database Operations
    name: Postgres Database
  - description: Postgres Firewall Rule Operations
    name: Postgres Firewall Rule
  - description: Postgres Metric Destination
    name: Postgres Metric Destination
  - description: Postgres Log Destination
    name: Postgres Log Destination
  - description: Private Subnet Operations
    name: Private Subnet
  - description: Project Operations
    name: Project
  - description: Virtual Machine Operations
    name: Virtual Machine
  - description: Private Location Operations
    name: Private Location
  - description: Kubernetes Cluster Operations
    name: Kubernetes Cluster
  - description: SSH Public Key Operations
    name: SSH Public Key
  - description: GitHub Operations
    name: GitHub
  - description: Audit Log Operations
    name: Audit Log
paths:
  /project/{project_id}/private-subnet:
    get:
      tags:
        - Private Subnet
      summary: List all private subnets
      operationId: listPSs
      parameters:
        - $ref: '#/components/parameters/project_id'
        - $ref: '#/components/parameters/start_after'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/order_column'
      responses:
        '200':
          $ref: '#/components/responses/PrivateSubnets'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    project_id:
      description: ID of the project
      in: path
      name: project_id
      required: true
      schema:
        type: string
        example: pjkkmx0f2vke4h36nk9cm8v8q0
        pattern: ^pj[0-9a-hj-km-np-tv-z]{24}$
    start_after:
      description: Pagination - Start after
      in: query
      name: start_after
      required: false
      schema:
        type: string
    page_size:
      description: Pagination - Page size
      in: query
      name: page_size
      required: false
      schema:
        type: integer
        default: 10
    order_column:
      description: Pagination - Order column
      in: query
      name: order_column
      required: false
      schema:
        type: string
        default: id
  responses:
    PrivateSubnets:
      description: A list of Private Subnets
      content:
        application/json:
          schema:
            type: object
            properties:
              count:
                type: integer
              items:
                type: array
                items:
                  $ref: '#/components/schemas/PrivateSubnet'
            additionalProperties: false
            required:
              - count
              - items
    Error:
      description: An error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    PrivateSubnet:
      type: object
      properties:
        firewalls:
          type: array
          items:
            $ref: '#/components/schemas/Firewall'
        id:
          description: ID of the subnet
          type: string
          example: ps3dngttwvje2kmr2sn8x12x4r
          pattern: ^ps[0-9a-hj-km-np-tv-z]{24}$
        location:
          description: Location of the subnet
          type: string
        name:
          description: Name of the subnet
          type: string
        net4:
          description: IPv4 CIDR of the subnet
          type: string
        net6:
          description: IPv6 CIDR of the subnet
          type: string
        nics:
          description: List of NICs
          type: array
          items:
            $ref: '#/components/schemas/Nic'
        state:
          description: State of the subnet
          type: string
      additionalProperties: false
      required:
        - firewalls
        - id
        - location
        - name
        - net4
        - net6
        - nics
        - state
    Error:
      type: object
      properties:
        error:
          type: object
          additionalProperties: false
          properties:
            code:
              type: integer
              example: 401
            message:
              type: string
              example: There was an error logging in
            type:
              type: string
              example: InvalidCredentials
            details:
              type: object
              nullable: true
          required:
            - code
            - message
            - type
      additionalProperties: false
      required:
        - error
    Firewall:
      type: object
      properties:
        description:
          description: Description of the firewall
          type: string
        firewall_rules:
          description: List of firewall rules
          type: array
          items:
            $ref: '#/components/schemas/FirewallRule'
        id:
          description: ID of the firewall
          type: string
          example: fwfg7td83em22qfw9pq5xyfqb7
          pattern: ^fw[0-9a-hj-km-np-tv-z]{24}$
        location:
          description: Location of the the firewall
          type: string
        name:
          description: Name of the firewall
          type: string
      additionalProperties: false
      required:
        - description
        - firewall_rules
        - id
        - location
        - name
    Nic:
      type: object
      properties:
        id:
          description: ID of the NIC
          type: string
        name:
          description: Name of the NIC
          type: string
        private_ipv4:
          description: Private IPv4 address
          type: string
          format: ipv4
        private_ipv6:
          description: Private IPv6 address
          type: string
          format: ipv6
        vm_name:
          description: Name of the VM
          type: string
          nullable: true
      additionalProperties: false
      required:
        - id
        - name
        - private_ipv4
        - private_ipv6
        - vm_name
    FirewallRule:
      type: object
      properties:
        cidr:
          description: CIDR of the firewall rule
          type: string
        id:
          description: ID of the firewall rule
          type: string
          example: fraz0q3vbrpa7pkg7zbmah9csn
          pattern: ^fr[0-9a-hj-km-np-tv-z]{24}$
        port_range:
          description: Port range of the firewall rule
          type: string
        protocol:
          description: Protocol of the firewall rule (tcp or udp)
          type: string
          enum:
            - tcp
            - udp
        description:
          description: Description of the firewall rule
          type: string
      additionalProperties: false
      required:
        - cidr
        - id
        - port_range
        - protocol
        - description
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````