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

# Get range details

> Retrieve more information about a specific range.

Client must be logged in as a user with admin privileges.



## OpenAPI

````yaml /openapi/cluster-api-v2.json get /ranges/{range_id}/
openapi: 3.0.0
info:
  description: >-
    REST API for querying information about CockroachDB cluster health, nodes,
    ranges,

    sessions, and other meta information. For additional details, see
    cockroachlabs.com/docs/stable/cluster-api.
  title: CockroachDB v2 API
  license:
    name: Business Source License
  version: '2.0'
  x-logo:
    url: https://www.cockroachlabs.com/docs/images/cockroachlabs-logo-170.png
    backgroundColor: '#FFFFFF'
    altText: Cockroach Labs logo
servers:
  - url: https://localhost/api/v2
  - url: http://localhost/api/v2
security: []
paths:
  /ranges/{range_id}/:
    get:
      summary: Get range details
      description: |-
        Retrieve more information about a specific range.

        Client must be logged in as a user with admin privileges.
      operationId: listRange
      parameters:
        - name: range_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: List range response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rangeResponse'
      security:
        - api_session: []
      x-codeSamples:
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://localhost/api/v2/ranges/%7Brange_id%7D/ \
              --header 'X-Cockroach-API-Session: REPLACE_KEY_VALUE'
components:
  schemas:
    rangeResponse:
      type: object
      properties:
        responses_by_node_id:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/nodeRangeResponse'
          x-go-name: Responses
      x-go-package: github.com/cockroachdb/cockroach/pkg/server
    nodeRangeResponse:
      type: object
      properties:
        error:
          type: string
          x-go-name: Error
        range_info:
          $ref: '#/components/schemas/rangeInfo'
      x-go-package: github.com/cockroachdb/cockroach/pkg/server
    rangeInfo:
      type: object
      title: Info related to a range.
      properties:
        desc:
          $ref: '#/components/schemas/rangeDescriptorInfo'
        error_message:
          description: |-
            Any error retrieved from the internal range info. For
            internal use only.
          type: string
          x-go-name: ErrorMessage
        lease_history:
          description: For internal use only.
          type: array
          items:
            $ref: '#/components/schemas/Lease'
          x-go-name: LeaseHistory
        problems:
          $ref: '#/components/schemas/RangeProblems'
        quiescent:
          description: For internal use only.
          type: boolean
          x-go-name: Quiescent
        source_node_id:
          description: |-
            The ID of the node where this range info was retrieved
            from.
          type: integer
          format: int32
          x-go-name: SourceNodeID
        source_store_id:
          description: |-
            The ID of the store on the node where this range info was
            retrieved from.
          type: integer
          format: int32
          x-go-name: SourceStoreID
        span:
          $ref: '#/components/schemas/PrettySpan'
        stats:
          $ref: '#/components/schemas/RangeStatistics'
        ticking:
          description: For internal use only.
          type: boolean
          x-go-name: Ticking
      x-go-package: github.com/cockroachdb/cockroach/pkg/server
    rangeDescriptorInfo:
      description: |-
        Contains a subset of fields from the Cockroach-internal
        range descriptor that are safe to be returned from APIs.
      type: object
      properties:
        end_key:
          description: |-
            The resolved Cockroach-internal key that denotes the end of
            this range.
          type: array
          items:
            type: integer
            format: uint8
          x-go-name: EndKey
        queries_per_second:
          description: |-
            The number of queries per second this range is
            serving. Only set for hot ranges.
          type: number
          format: double
          x-go-name: QueriesPerSecond
        range_id:
          description: The integer ID of this range.
          type: integer
          format: int64
          x-go-name: RangeID
        start_key:
          description: |-
            The resolved Cockroach-internal key that denotes the start of
            this range.
          type: array
          items:
            type: integer
            format: uint8
          x-go-name: StartKey
        store_id:
          description: |-
            The ID of the store this hot range is on. Only set for hot
            ranges.
          type: integer
          format: int32
          x-go-name: StoreID
      x-go-package: github.com/cockroachdb/cockroach/pkg/server
    Lease:
      description: |-
        Lease contains information about range leases including the
        expiration and lease holder.
      type: object
      properties:
        acquisition_type:
          $ref: '#/components/schemas/LeaseAcquisitionType'
        deprecated_start_stasis:
          $ref: '#/components/schemas/Timestamp'
        epoch:
          description: >-
            The epoch of the lease holder's node liveness entry. If this value
            is

            non-zero, the expiration field is ignored.
          type: integer
          format: int64
          x-go-name: Epoch
        expiration:
          $ref: '#/components/schemas/Timestamp'
        proposed_ts:
          $ref: '#/components/schemas/ClockTimestamp'
        replica:
          $ref: '#/components/schemas/ReplicaDescriptor'
        sequence:
          $ref: '#/components/schemas/LeaseSequence'
        start:
          $ref: '#/components/schemas/ClockTimestamp'
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
    RangeProblems:
      type: object
      title: Describes issues reported by a range. For internal use only.
      properties:
        leader_not_lease_holder:
          type: boolean
          x-go-name: LeaderNotLeaseHolder
        no_lease:
          type: boolean
          x-go-name: NoLease
        no_raft_leader:
          type: boolean
          x-go-name: NoRaftLeader
        overreplicated:
          type: boolean
          x-go-name: Overreplicated
        quiescent_equals_ticking:
          description: |-
            Quiescent ranges do not tick by definition, but we track this in
            two different ways and suspect that they're getting out of sync.
            If the replica's quiescent flag doesn't agree with the store's
            list of replicas that are ticking, warn about it.
          type: boolean
          x-go-name: QuiescentEqualsTicking
        raft_log_too_large:
          description: When the raft log is too large, it can be a symptom of other issues.
          type: boolean
          x-go-name: RaftLogTooLarge
        unavailable:
          type: boolean
          x-go-name: Unavailable
        underreplicated:
          type: boolean
          x-go-name: Underreplicated
      x-go-package: github.com/cockroachdb/cockroach/pkg/server/serverpb
    PrettySpan:
      type: object
      properties:
        end_key:
          type: string
          x-go-name: EndKey
        start_key:
          type: string
          x-go-name: StartKey
      x-go-package: github.com/cockroachdb/cockroach/pkg/server/serverpb
    RangeStatistics:
      description: |-
        Describes statistics reported by a range. For internal use
        only.
      type: object
      properties:
        queries_per_second:
          description: |-
            Queries per second served by this range.

            Note that queries per second will only be known by the leaseholder.
            All other replicas will report it as 0.
          type: number
          format: double
          x-go-name: QueriesPerSecond
        writes_per_second:
          description: Writes per second served by this range.
          type: number
          format: double
          x-go-name: WritesPerSecond
      x-go-package: github.com/cockroachdb/cockroach/pkg/server/serverpb
    LeaseAcquisitionType:
      description: |-
        The type of lease acquisition event that
        resulted in the current lease.
      type: integer
      format: int32
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
    Timestamp:
      type: object
      title: Timestamp represents a state of the hybrid logical clock.
      properties:
        logical:
          description: >-
            The logical component captures causality for events whose wall times

            are equal. It is effectively bounded by (maximum clock
            skew)/(minimal

            ns between events) and nearly impossible to overflow.


            It is not safe to mutate this field directly. Instead, use one of
            the

            methods on Timestamp, which ensure that the synthetic flag is
            updated

            appropriately.
          type: integer
          format: int32
          x-go-name: Logical
        synthetic:
          description: >-
            Indicates that the Timestamp did not come from an HLC clock
            somewhere

            in the system and, therefore, does not have the ability to update a

            peer's HLC clock. If set to true, the "synthetic timestamp" may be

            arbitrarily disconnected from real time.


            The flag serves as the dynamically typed version of a ClockTimestamp

            (but inverted). Only Timestamps with this flag set to false can be

            downcast to a ClockTimestamp successfully (see TryToClockTimestamp).


            Synthetic timestamps with this flag set to true are central to

            non-blocking transactions, which write "into the future". Setting
            the

            flag to true is also used to disconnect some committed MVCC versions

            from observed timestamps by indicating that those versions were
            moved

            from the timestamp at which they were originally written. Committed

            MVCC versions with synthetic timestamps require observing the full

            uncertainty interval, whereas readings off the leaseholders's clock

            can tighten the uncertainty interval that is applied to MVCC
            versions

            with clock timestamp.


            This flag does not affect the sort order of Timestamps. However, it

            is considered when performing structural equality checks (e.g.,
            using

            the == operator). Consider use of the EqOrdering method when testing

            for equality.
          type: boolean
          x-go-name: Synthetic
        wall_time:
          description: >-
            Holds a wall time, typically a unix epoch time expressed in

            nanoseconds.


            It is not safe to mutate this field directly. Instead, use one of
            the

            methods on Timestamp, which ensure that the synthetic flag is
            updated

            appropriately.
          type: integer
          format: int64
          x-go-name: WallTime
      x-go-package: github.com/cockroachdb/cockroach/pkg/util/hlc
    ClockTimestamp:
      $ref: '#/components/schemas/Timestamp'
    ReplicaDescriptor:
      description: |-
        Describes a replica location by node ID
        (corresponds to a host:port via lookup on gossip network) and store
        ID (identifies the device).
      type: object
      properties:
        node_id:
          $ref: '#/components/schemas/NodeID'
        replica_id:
          $ref: '#/components/schemas/ReplicaID'
        store_id:
          $ref: '#/components/schemas/StoreID'
        type:
          $ref: '#/components/schemas/ReplicaType'
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
    LeaseSequence:
      type: integer
      format: int64
      title: A custom type for a lease sequence number.
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
    NodeID:
      description: |-
        A custom type for a cockroach node ID. (not a raft node ID)
        0 is not a valid NodeID.
      type: integer
      format: int32
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
    ReplicaID:
      type: integer
      format: int32
      title: A custom type for a range replica ID.
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
    StoreID:
      type: integer
      format: int32
      title: StoreID is a custom type for a cockroach store ID.
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
    ReplicaType:
      description: >-
        All VOTER* types indicate a replica that participates in all raft
        activities,

        including voting for leadership and committing entries. Typically, this

        requires a majority of voters to reach a decision. In a joint config,
        two

        separate majorities are required: one from the set of replicas that have

        either type VOTER or VOTER_OUTGOING or VOTER_DEMOTING_{LEARNER,
        NON_VOTER},

        as well as that of the set of types VOTER and VOTER_INCOMING . For
        example,

        when type VOTER_FULL is assigned to replicas 1 and 2, while 3 is

        VOTER_OUTGOING and 4 is VOTER_INCOMING, then the two sets over which
        quorums

        need to be achieved are {1,2,3} and {1,2,4}. Thus, {1,2} is a quorum of
        both,

        {1,3} is a quorum of the first but not the second, {1,4} is a quorum of
        the

        second but not the first, and {3,4} is a quorum of neither.
      type: integer
      format: int32
      title: >-
        Identifies which raft activities a replica participates in. In

        normal operation, VOTER_FULL, NON_VOTER, and LEARNER are the only used

        states. However, atomic replication changes require a transition through
        a

        "joint config"; in this joint config, the VOTER_DEMOTING_{LEARNER,
        NON_VOTER}

        and VOTER_INCOMING types are used as well to denote voters which are
        being

        downgraded to learners and newly added by the change, respectively. When

        being removed, a demoting voter is turning into a learner, which we
        prefer

        over a direct removal, which was used prior to v20.1 and uses the

        VOTER_OUTGOING type instead (see VersionChangeReplicasDemotion for
        details on

        why we're not doing that any more).
      x-go-package: github.com/cockroachdb/cockroach/pkg/roachpb
  securitySchemes:
    api_session:
      description: >-
        Token for logged-in REST session. Use `/login/` to log in and get a
        session token. For additional information, see
        cockroachlabs.com/docs/stable/cluster-api.
      type: apiKey
      name: X-Cockroach-API-Session
      in: header

````