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

# [IPv4 leases] List leased IPv4 blocks

> List the organization's open IPv4 leases (terminated and cancelled leases are left out), each with the blocks it covers. A block is either delivered over a GRE tunnel and announced by AS51269 (`gre`), or announced by the customer's own AS (`asn`).



## OpenAPI

````yaml https://api.onetsolutions.net/schema get /v1/organizations/{organization_id}/network/ipv4-leases
openapi: 3.0.3
info:
  title: OnetSolutions API
  version: v1 (v1)
  description: >

    ## Overview


    The OnetSolutions API provides programmatic access to manage your cloud
    infrastructure, domains, and web hosting services.


    ## Authentication


    All API requests require authentication using one of the following methods:


    - **JWT Token**: Obtain a token via login endpoints and include it in the
    `Authorization: Bearer <token>` header

    - **API Key**: Generate an API key from your account settings and use it as
    `Authorization: Bearer sk-onetsolutions-...`


    ## Rate Limiting


    API requests are rate-limited to ensure fair usage:

    - **Standard**: 1000 requests per minute

    - **Burst**: 100 requests per second


    ## Pagination


    List endpoints return paginated results. Use `page` and `page_size` query
    parameters.


    ## Error Handling


    The API uses standard HTTP status codes:

    - `200` Success

    - `201` Created

    - `400` Bad Request

    - `401` Unauthorized

    - `403` Forbidden

    - `404` Not Found

    - `429` Too Many Requests
servers:
  - url: https://api.onetsolutions.net
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      Login, passwordless authentication, MFA, OAuth providers, and token
      management.
  - name: Organizations
    description: >-
      Organization management, members, roles, modules, audit logs, and
      notification settings.
  - name: Projects
    description: Project management, team members, and project-scoped resources.
  - name: Compute
    description: >-
      Cloud instances, volumes, snapshots, backups, VPCs, firewalls, SSH keys,
      uptime monitors, and instance tasks.
  - name: Billing
    description: >-
      Shopping cart, orders, invoices, payments, payment methods, gateways,
      promo codes, and balance management.
  - name: Domains
    description: >-
      Domain availability, registration, transfers, DNS zones, DNS records, and
      TLD information.
  - name: Web Hosting
    description: >-
      cPanel-based web hosting, emails, databases, subdomains, FTP accounts,
      addon domains, and SSL certificates.
paths:
  /v1/organizations/{organization_id}/network/ipv4-leases:
    get:
      tags:
        - Network
      summary: '[IPv4 leases] List leased IPv4 blocks'
      description: >-
        List the organization's open IPv4 leases (terminated and cancelled
        leases are left out), each with the blocks it covers. A block is either
        delivered over a GRE tunnel and announced by AS51269 (`gre`), or
        announced by the customer's own AS (`asn`).
      operationId: list_ipv4_leases
      parameters:
        - in: path
          name: organization_id
          schema:
            type: string
          description: The unique identifier (UUID) of the organization
          required: true
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: page_size
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedIPv4LeaseList'
          description: The organization's leases
        '401':
          description: Authentication credentials were not provided or are invalid
        '403':
          description: Your role on this organization cannot read its network resources
      security:
        - BearerAuth: []
components:
  schemas:
    PaginatedIPv4LeaseList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/IPv4Lease'
    IPv4Lease:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        whmcs_service_id:
          type: integer
          readOnly: true
        status:
          enum:
            - pending
            - active
            - suspended
            - terminated
            - cancelled
          type: string
          description: |-
            * `pending` - Pending
            * `active` - Active
            * `suspended` - Suspended
            * `terminated` - Terminated
            * `cancelled` - Cancelled
          x-spec-enum-id: a1aba0968e3da3a3
          readOnly: true
        billing_cycle:
          enum:
            - hourly
            - monthly
            - quarterly
            - semi_annually
            - annually
            - biennially
            - triennially
          type: string
          description: |-
            * `hourly` - Hourly
            * `monthly` - Monthly
            * `quarterly` - Quarterly
            * `semi_annually` - Semi-Annually
            * `annually` - Annually
            * `biennially` - Biennially
            * `triennially` - Triennially
          x-spec-enum-id: 39fc1593b115d859
          readOnly: true
        recurring_amount:
          type: string
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          readOnly: true
        next_due_date:
          type: string
          format: date
          readOnly: true
          nullable: true
        blocks:
          type: array
          items:
            $ref: '#/components/schemas/LeasedBlockSummary'
          readOnly: true
      required:
        - billing_cycle
        - blocks
        - id
        - next_due_date
        - recurring_amount
        - status
        - whmcs_service_id
    LeasedBlockSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        cidr:
          type: string
          readOnly: true
        mode:
          enum:
            - gre
            - asn
          type: string
          description: |-
            * `gre` - GRE tunnel (announced by AS51269)
            * `asn` - Customer ASN
          x-spec-enum-id: f63f6343f126ba4e
          readOnly: true
        customer_asn:
          type: integer
          readOnly: true
          nullable: true
        status:
          enum:
            - active
            - suspended
            - released
          type: string
          description: |-
            * `active` - Active
            * `suspended` - Suspended
            * `released` - Released
          x-spec-enum-id: 18d59a3d2767c5b7
          readOnly: true
        expected_origin:
          type: integer
          readOnly: true
        expected_origin_name:
          type: string
          nullable: true
          readOnly: true
        rpki_status:
          type: string
          nullable: true
          readOnly: true
        visibility_percent:
          type: number
          format: double
          readOnly: true
          nullable: true
        observed_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        rdns_delegated:
          type: boolean
          readOnly: true
        route_object_count:
          type: integer
          readOnly: true
        roa_count:
          type: integer
          readOnly: true
        listed_ip_count:
          type: integer
          readOnly: true
          nullable: true
        gre:
          allOf:
            - $ref: '#/components/schemas/GreTunnelSummary'
          readOnly: true
          nullable: true
      required:
        - cidr
        - customer_asn
        - expected_origin
        - expected_origin_name
        - gre
        - id
        - listed_ip_count
        - mode
        - observed_at
        - rdns_delegated
        - roa_count
        - route_object_count
        - rpki_status
        - status
        - visibility_percent
    GreTunnelSummary:
      type: object
      properties:
        remote_ip:
          type: string
          format: ipv4
          readOnly: true
        desired_state:
          enum:
            - up
            - down
          type: string
          description: |-
            * `up` - Up
            * `down` - Down
          x-spec-enum-id: 01dcc15de55e27b5
          readOnly: true
        last_check_ok:
          type: boolean
          readOnly: true
          nullable: true
        last_checked_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - desired_state
        - last_check_ok
        - last_checked_at
        - remote_ip
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Use `Authorization: Bearer <token>` header. Token can be a JWT token or
        an API key (format: `sk-onetsolutions-...`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.