Class: Infrawrench::SearchNamespace

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

Overview

client.search

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ SearchNamespace

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 SearchNamespace.

Parameters:



3039
3040
3041
# File 'lib/infrawrench/client.rb', line 3039

def initialize(transport)
  @transport = transport
end

Instance Method Details

#list(org_id: nil, q: nil, request_options: nil) ⇒ Array<Hash>

Search resources (capped at 50 hits) and workflows across the org

Requires permission: resources:read.

GET /api/org/orgId/search

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

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

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

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

Returns:

  • (Array<Hash>)

    Parsed JSON, shaped as Array<SearchHit> — see sig/infrawrench/sdk.rbs.

Raises:



3056
3057
3058
3059
3060
3061
3062
3063
3064
# File 'lib/infrawrench/client.rb', line 3056

def list(org_id: nil, q: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/search",
    path_params: { "orgId" => org_id },
    query: { "q" => q },
    request_options: request_options
  )
end