> ## 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] Retrieve a leased IPv4 block

> Retrieve a leased block with its GRE tunnel (for `gre` blocks, `null` otherwise) and its last observation of the global routing table: announcing origins, RIS visibility, RPKI status of the expected origin, RIPE route objects and reverse DNS delegations. `ip_intelligence` is the last ipdata.co lookup of the block's representative address (its first usable host): location, organization, threat flags, trust score and ipdata blocklists, `null` until the first lookup. `trust_score` and `trust_level` are `null` when ipdata returned no score.



## OpenAPI

````yaml https://api.onetsolutions.net/schema get /v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}
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-blocks/{block_id}:
    get:
      tags:
        - Network
      summary: '[IPv4 leases] Retrieve a leased IPv4 block'
      description: >-
        Retrieve a leased block with its GRE tunnel (for `gre` blocks, `null`
        otherwise) and its last observation of the global routing table:
        announcing origins, RIS visibility, RPKI status of the expected origin,
        RIPE route objects and reverse DNS delegations. `ip_intelligence` is the
        last ipdata.co lookup of the block's representative address (its first
        usable host): location, organization, threat flags, trust score and
        ipdata blocklists, `null` until the first lookup. `trust_score` and
        `trust_level` are `null` when ipdata returned no score.
      operationId: retrieve_ipv4_block
      parameters:
        - in: path
          name: block_id
          schema:
            type: string
          description: The unique identifier (UUID) of the leased IPv4 block
          required: true
        - in: path
          name: organization_id
          schema:
            type: string
          description: The unique identifier (UUID) of the organization
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeasedBlockDetail'
          description: The leased block
        '401':
          description: Authentication credentials were not provided or are invalid
        '403':
          description: Your role on this organization cannot read its network resources
        '404':
          description: No such block in this organization
      security:
        - BearerAuth: []
components:
  schemas:
    LeasedBlockDetail:
      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
        expected_origin:
          type: integer
          readOnly: true
        expected_origin_name:
          type: string
          nullable: true
          readOnly: true
        status:
          enum:
            - active
            - suspended
            - released
          type: string
          description: |-
            * `active` - Active
            * `suspended` - Suspended
            * `released` - Released
          x-spec-enum-id: 18d59a3d2767c5b7
          readOnly: true
        lease_id:
          type: string
          format: uuid
          readOnly: true
        whmcs_service_id:
          type: integer
          readOnly: true
        gre:
          allOf:
            - $ref: '#/components/schemas/GreTunnel'
          readOnly: true
          nullable: true
        observation:
          allOf:
            - $ref: '#/components/schemas/BlockObservation'
          readOnly: true
          nullable: true
        blocklist:
          allOf:
            - $ref: '#/components/schemas/BlocklistSummary'
          nullable: true
          readOnly: true
        ip_intelligence:
          allOf:
            - $ref: '#/components/schemas/BlockIpIntelligence'
          readOnly: true
          nullable: true
      required:
        - blocklist
        - cidr
        - customer_asn
        - expected_origin
        - expected_origin_name
        - gre
        - id
        - ip_intelligence
        - lease_id
        - mode
        - observation
        - status
        - whmcs_service_id
    GreTunnel:
      type: object
      properties:
        our_endpoint_ip:
          type: string
          format: ipv4
          readOnly: true
        remote_ip:
          type: string
          format: ipv4
          readOnly: true
        local_internal_ip:
          type: string
          readOnly: true
        peer_internal_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_checked_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        last_check_ok:
          type: boolean
          readOnly: true
          nullable: true
      required:
        - desired_state
        - last_check_ok
        - last_checked_at
        - local_internal_ip
        - our_endpoint_ip
        - peer_internal_ip
        - remote_ip
    BlockObservation:
      type: object
      properties:
        observed_at:
          type: string
          format: date-time
          readOnly: true
        origins:
          type: array
          items:
            type: integer
          readOnly: true
        visibility_percent:
          type: number
          format: double
          maximum: 1000
          minimum: -1000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
          nullable: true
        rpki_status:
          type: string
          readOnly: true
        route_objects:
          type: array
          items:
            $ref: '#/components/schemas/RouteObject'
          readOnly: true
        rdns:
          type: array
          items:
            $ref: '#/components/schemas/ReverseDelegation'
          readOnly: true
        roas:
          type: array
          items:
            $ref: '#/components/schemas/ObservedRoa'
          readOnly: true
        as_names:
          type: object
          additionalProperties:
            type: string
          readOnly: true
      required:
        - as_names
        - observed_at
        - origins
        - rdns
        - roas
        - route_objects
        - rpki_status
        - visibility_percent
    BlocklistSummary:
      type: object
      properties:
        checked_at:
          type: string
          format: date-time
          readOnly: true
        listed_ip_count:
          type: integer
          readOnly: true
        lists:
          type: array
          items:
            $ref: '#/components/schemas/BlocklistState'
          readOnly: true
      required:
        - checked_at
        - listed_ip_count
        - lists
    BlockIpIntelligence:
      type: object
      properties:
        ip:
          type: string
          format: ipv4
          readOnly: true
        country_code:
          type: string
          nullable: true
          readOnly: true
        country_name:
          type: string
          nullable: true
          readOnly: true
        continent_code:
          type: string
          nullable: true
          readOnly: true
        continent_name:
          type: string
          nullable: true
          readOnly: true
        currency_code:
          type: string
          nullable: true
          readOnly: true
        time_zone:
          type: string
          nullable: true
          readOnly: true
        organization:
          type: string
          nullable: true
          readOnly: true
        asn:
          type: integer
          readOnly: true
          nullable: true
        asn_name:
          type: string
          nullable: true
          readOnly: true
        threats:
          allOf:
            - $ref: '#/components/schemas/IpIntelligenceThreats'
          readOnly: true
        threat_count:
          type: integer
          readOnly: true
        trust_score:
          type: integer
          readOnly: true
          nullable: true
        trust_level:
          enum:
            - low
            - medium
            - high
            - null
          type: string
          description: |-
            * `low` - Low risk
            * `medium` - Medium risk
            * `high` - High risk
          x-spec-enum-id: 44de8f668a1b998a
          nullable: true
          readOnly: true
        blocklists:
          type: array
          items:
            $ref: '#/components/schemas/IpIntelligenceBlocklist'
          readOnly: true
        fetched_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - asn
        - asn_name
        - blocklists
        - continent_code
        - continent_name
        - country_code
        - country_name
        - currency_code
        - fetched_at
        - ip
        - organization
        - threat_count
        - threats
        - time_zone
        - trust_level
        - trust_score
    RouteObject:
      type: object
      properties:
        prefix:
          type: string
          readOnly: true
        origin:
          type: integer
          readOnly: true
      required:
        - origin
        - prefix
    ReverseDelegation:
      type: object
      properties:
        zone:
          type: string
          readOnly: true
        nameservers:
          type: array
          items:
            type: string
          readOnly: true
      required:
        - nameservers
        - zone
    ObservedRoa:
      type: object
      properties:
        prefix:
          type: string
          readOnly: true
        asn:
          type: integer
          readOnly: true
        max_length:
          type: integer
          readOnly: true
      required:
        - asn
        - max_length
        - prefix
    BlocklistState:
      type: object
      properties:
        code:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        category:
          enum:
            - spam
            - malware
            - attack
            - policy
            - reported
          type: string
          description: |-
            * `spam` - Spam
            * `malware` - Malware or exploited host
            * `attack` - Attacks (brute force, scanning, abuse)
            * `policy` - Policy (informational)
            * `reported` - Reported below the listing threshold (informational)
          x-spec-enum-id: 830e5941023162b6
          readOnly: true
        status:
          enum:
            - ok
            - not_checked
            - error
          type: string
          description: |-
            * `ok` - Checked
            * `not_checked` - Not checked
            * `error` - Error
          x-spec-enum-id: cef67c26d551000e
          readOnly: true
        checked_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - category
        - checked_at
        - code
        - name
        - status
    IpIntelligenceThreats:
      type: object
      properties:
        tor:
          type: boolean
          readOnly: true
          nullable: true
        vpn:
          type: boolean
          readOnly: true
          nullable: true
        icloud_relay:
          type: boolean
          readOnly: true
          nullable: true
        datacenter:
          type: boolean
          readOnly: true
          nullable: true
        proxy:
          type: boolean
          readOnly: true
          nullable: true
        anonymous:
          type: boolean
          readOnly: true
          nullable: true
        attacker:
          type: boolean
          readOnly: true
          nullable: true
        abuser:
          type: boolean
          readOnly: true
          nullable: true
        threat:
          type: boolean
          readOnly: true
          nullable: true
        bogon:
          type: boolean
          readOnly: true
          nullable: true
      required:
        - abuser
        - anonymous
        - attacker
        - bogon
        - datacenter
        - icloud_relay
        - proxy
        - threat
        - tor
        - vpn
    IpIntelligenceBlocklist:
      type: object
      properties:
        name:
          type: string
          readOnly: true
        site:
          type: string
          readOnly: true
        type:
          type: string
          readOnly: true
      required:
        - name
        - site
        - type
  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.