github.com/clly/consul@v1.4.5/website/source/api/operator/segment.html.md (about)

     1  ---
     2  layout: api
     3  page_title: Network Segments - Operator - HTTP API
     4  sidebar_current: api-operator-segment
     5  description: |-
     6    The /operator/segment endpoint exposes the network segment information via
     7    Consul's HTTP API.
     8  ---
     9  
    10  # Network Areas - Operator HTTP API
    11  
    12  The `/operator/segment` endpoint provides tools to manage network segments via
    13  Consul's HTTP API.
    14  
    15  ~> **Enterprise-only!** This API endpoint and functionality only exists in
    16  Consul Enterprise. This is not present in the open source version of Consul.
    17  
    18  The network area functionality described here is available only in
    19  [Consul Enterprise](https://www.hashicorp.com/products/consul/) version 0.9.3 and
    20  later. Network segments are operator-defined sections of agents on the LAN, typically
    21  isolated from other segments by network configuration.
    22  
    23  Please see the [Network Segments Guide](/docs/guides/segments.html) for more details.
    24  
    25  ## List Network Segments
    26  
    27  This endpoint lists all network areas.
    28  
    29  | Method | Path                         | Produces                   |
    30  | ------ | ---------------------------- | -------------------------- |
    31  | `GET`  | `/operator/segment`     | `application/json`         |
    32  
    33  The table below shows this endpoint's support for
    34  [blocking queries](/api/index.html#blocking-queries),
    35  [consistency modes](/api/index.html#consistency-modes),
    36  [agent caching](/api/index.html#agent-caching), and
    37  [required ACLs](/api/index.html#acls).
    38  
    39  | Blocking Queries | Consistency Modes | Agent Caching | ACL Required    |
    40  | ---------------- | ----------------- | ------------- | --------------- |
    41  | `NO`             | `none`            | `none`        | `operator:read` |
    42  
    43  ### Parameters
    44  
    45  - `dc` `(string: "")` - Specifies the datacenter to query. This will default to
    46    the datacenter of the agent being queried. This is specified as a URL query
    47    parameter.
    48  
    49  ### Sample Request
    50  
    51  ```text
    52  $ curl \
    53      http://127.0.0.1:8500/v1/operator/segment
    54  ```
    55  
    56  ### Sample Response
    57  
    58  ```json
    59  ["","alpha","beta"]
    60  ```