Class: Infrawrench::StatusNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.status

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ StatusNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of StatusNamespace.

Parameters:



13881
13882
13883
# File 'lib/infrawrench/client.rb', line 13881

def initialize(transport)
  @transport = transport
end

Instance Method Details

#get(slug:, request_options: nil) ⇒ Hash

Read a public status page

Unauthenticated. The only endpoint in this API that takes no credentials — a status page exists for people with no account. The payload carries labels, states and uptime history only: probe URLs, resource and account ids, the organization id and error detail are never included. An unpublished page and an unknown slug both answer 404, so the endpoint cannot be used to confirm that a slug is real.

GET /api/status/slug

Raises on 404: Not found

Parameters:

  • slug (String)
  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • slug: (String)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as PublicStatusPage — see sig/infrawrench/sdk.rbs.

Raises:



13902
13903
13904
13905
13906
13907
13908
13909
# File 'lib/infrawrench/client.rb', line 13902

def get(slug:, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/status/{slug}",
    path_params: { "slug" => slug },
    request_options: request_options
  )
end