ZonesResource

Reads zones.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.24+fa54770
public final class ZonesResource

Reads zones. Get it from SlimResource.zones().

Methods

list

public Page<JsonNode> list(
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException

Lists zones (GET /v1/slim/zones).

Parameters:

  • query: query parameters; null values are skipped
  • options: per-request options, such as the timeout

Returns: the first page; iterating it loads the next pages

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

retrieve

public JsonNode retrieve(String id, RequestOptions options) throws IOException, InterruptedException

Gets one zone (GET /v1/slim/zones/{id}).

Parameters:

  • id: the zone ID
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

deviceCounts

public JsonNode deviceCounts(
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException

Counts devices per zone (GET /v1/slim/zones/device-counts).

Parameters:

  • query: query parameters; null values are skipped
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Last updated on

On this page