Class: Infrawrench::DashboardsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::DashboardsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.dashboards
Instance Attribute Summary collapse
-
#default ⇒ DashboardsDefaultNamespace
readonly
client.dashboards.default. -
#pin ⇒ DashboardsPinNamespace
readonly
client.dashboards.pin. -
#widgets ⇒ DashboardsWidgetsNamespace
readonly
client.dashboards.widgets.
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Create a dashboard.
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a dashboard.
-
#get(id:, org_id: nil, request_options: nil) ⇒ Hash
Get a dashboard with its pins.
-
#initialize(transport) ⇒ DashboardsNamespace
constructor
private
A new instance of DashboardsNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List dashboards.
-
#probe(body:, org_id: nil, request_options: nil) ⇒ Hash
Read cached stats/metrics for dashboard cards.
-
#rename(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Rename a dashboard.
-
#reorder(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Reorder dashboard cards.
-
#unpin(body:, org_id: nil, request_options: nil) ⇒ Hash
Unpin a resource.
-
#validate_tabs(body:, org_id: nil, request_options: nil) ⇒ Hash
Validate workspace tab targets still exist.
-
#workflow_pin(body:, org_id: nil, request_options: nil) ⇒ Hash
Pin a workflow's metrics to a dashboard.
-
#workflow_unpin(body:, org_id: nil, request_options: nil) ⇒ Hash
Unpin a workflow from a dashboard.
Constructor Details
#initialize(transport) ⇒ DashboardsNamespace
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 DashboardsNamespace.
1997 1998 1999 2000 2001 2002 |
# File 'lib/infrawrench/client.rb', line 1997 def initialize(transport) @transport = transport @default = DashboardsDefaultNamespace.new(@transport) @pin = DashboardsPinNamespace.new(@transport) @widgets = DashboardsWidgetsNamespace.new(@transport) end |
Instance Attribute Details
#default ⇒ DashboardsDefaultNamespace (readonly)
Returns client.dashboards.default.
1989 1990 1991 |
# File 'lib/infrawrench/client.rb', line 1989 def default @default end |
#pin ⇒ DashboardsPinNamespace (readonly)
Returns client.dashboards.pin.
1991 1992 1993 |
# File 'lib/infrawrench/client.rb', line 1991 def pin @pin end |
#widgets ⇒ DashboardsWidgetsNamespace (readonly)
Returns client.dashboards.widgets.
1993 1994 1995 |
# File 'lib/infrawrench/client.rb', line 1993 def @widgets end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Create a dashboard
Requires permission: dashboards:write.
POST /api/org/orgId/dashboards
2016 2017 2018 2019 2020 2021 2022 2023 2024 |
# File 'lib/infrawrench/client.rb', line 2016 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a dashboard
Cannot delete the default dashboard.
Requires permission: dashboards:write.
DELETE /api/org/orgId/dashboards/id
Raises on 400: Bad request
Raises on 404: Not found
2044 2045 2046 2047 2048 2049 2050 2051 |
# File 'lib/infrawrench/client.rb', line 2044 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/dashboards/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#get(id:, org_id: nil, request_options: nil) ⇒ Hash
Get a dashboard with its pins
Requires permission: dashboards:read.
GET /api/org/orgId/dashboards/id
Raises on 404: Not found
2067 2068 2069 2070 2071 2072 2073 2074 |
# File 'lib/infrawrench/client.rb', line 2067 def get(id:, org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/dashboards/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List dashboards
Requires permission: dashboards:read.
GET /api/org/orgId/dashboards
2088 2089 2090 2091 2092 2093 2094 2095 |
# File 'lib/infrawrench/client.rb', line 2088 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/dashboards", path_params: { "orgId" => org_id }, request_options: ) end |
#probe(body:, org_id: nil, request_options: nil) ⇒ Hash
Read cached stats/metrics for dashboard cards
Requires permission: dashboards:read.
POST /api/org/orgId/dashboards/probe
2109 2110 2111 2112 2113 2114 2115 2116 2117 |
# File 'lib/infrawrench/client.rb', line 2109 def probe(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/probe", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#rename(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Rename a dashboard
Requires permission: dashboards:write.
POST /api/org/orgId/dashboards/id/rename
2132 2133 2134 2135 2136 2137 2138 2139 2140 |
# File 'lib/infrawrench/client.rb', line 2132 def rename(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/{id}/rename", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |
#reorder(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Reorder dashboard cards
Persists the order of a dashboard's grid. Pass cards to order resource
pins, workflow pins, and widgets as one sequence; resourceIds orders
resource pins alone.
Requires permission: dashboards:write.
POST /api/org/orgId/dashboards/id/reorder
Raises on 404: Not found
2161 2162 2163 2164 2165 2166 2167 2168 2169 |
# File 'lib/infrawrench/client.rb', line 2161 def reorder(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/{id}/reorder", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |
#unpin(body:, org_id: nil, request_options: nil) ⇒ Hash
Unpin a resource
Requires permission: dashboards:write.
POST /api/org/orgId/dashboards/unpin
Raises on 404: Not found
2185 2186 2187 2188 2189 2190 2191 2192 2193 |
# File 'lib/infrawrench/client.rb', line 2185 def unpin(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/unpin", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#validate_tabs(body:, org_id: nil, request_options: nil) ⇒ Hash
Validate workspace tab targets still exist
Requires permission: dashboards:read.
POST /api/org/orgId/dashboards/validate-tabs
2208 2209 2210 2211 2212 2213 2214 2215 2216 |
# File 'lib/infrawrench/client.rb', line 2208 def validate_tabs(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/validate-tabs", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#workflow_pin(body:, org_id: nil, request_options: nil) ⇒ Hash
Pin a workflow's metrics to a dashboard
POST /api/org/orgId/dashboards/workflow-pin
Raises on 404: Not found
2230 2231 2232 2233 2234 2235 2236 2237 2238 |
# File 'lib/infrawrench/client.rb', line 2230 def workflow_pin(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/workflow-pin", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#workflow_unpin(body:, org_id: nil, request_options: nil) ⇒ Hash
Unpin a workflow from a dashboard
POST /api/org/orgId/dashboards/workflow-unpin
Raises on 404: Not found
2252 2253 2254 2255 2256 2257 2258 2259 2260 |
# File 'lib/infrawrench/client.rb', line 2252 def workflow_unpin(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/workflow-unpin", path_params: { "orgId" => org_id }, body: body, request_options: ) end |