Class: Infrawrench::DashboardsPinNamespace
- Inherits:
-
Object
- Object
- Infrawrench::DashboardsPinNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.dashboards.pin
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Pin a resource to a dashboard.
-
#get(pin_id:, org_id: nil, request_options: nil) ⇒ Hash
Full enriched pin data + cached probe status.
-
#initialize(transport) ⇒ DashboardsPinNamespace
constructor
private
A new instance of DashboardsPinNamespace.
-
#range(pin_id:, org_id: nil, from_ms: nil, to_ms: nil, request_options: nil) ⇒ Hash
Historical metric series for a pinned resource.
Constructor Details
#initialize(transport) ⇒ DashboardsPinNamespace
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 DashboardsPinNamespace.
1850 1851 1852 |
# File 'lib/infrawrench/client.rb', line 1850 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Pin a resource to a dashboard
Requires permission: dashboards:write.
POST /api/org/orgId/dashboards/pin
Raises on 404: Not found
1868 1869 1870 1871 1872 1873 1874 1875 1876 |
# File 'lib/infrawrench/client.rb', line 1868 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/dashboards/pin", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#get(pin_id:, org_id: nil, request_options: nil) ⇒ Hash
Full enriched pin data + cached probe status
Requires permission: dashboards:read.
GET /api/org/orgId/dashboards/pin/pinId
Raises on 404: Not found
1892 1893 1894 1895 1896 1897 1898 1899 |
# File 'lib/infrawrench/client.rb', line 1892 def get(pin_id:, org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/dashboards/pin/{pinId}", path_params: { "orgId" => org_id, "pinId" => pin_id }, request_options: ) end |
#range(pin_id:, org_id: nil, from_ms: nil, to_ms: nil, request_options: nil) ⇒ Hash
Historical metric series for a pinned resource
Returns per-series metric points between fromMs and toMs. The backend auto-routes between raw, 1-minute, and 1-hour rollups based on span: ≤2h raw, ≤7d 1m, >7d 1h.
GET /api/org/orgId/dashboards/pin/pinId/range
Raises on 400: Bad request
Raises on 404: Not found
1921 1922 1923 1924 1925 1926 1927 1928 1929 |
# File 'lib/infrawrench/client.rb', line 1921 def range(pin_id:, org_id: nil, from_ms: nil, to_ms: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/dashboards/pin/{pinId}/range", path_params: { "orgId" => org_id, "pinId" => pin_id }, query: { "fromMs" => from_ms, "toMs" => to_ms }, request_options: ) end |