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.
1533 1534 1535 1536 1537 1538 |
# File 'lib/infrawrench/client.rb', line 1533 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.
1525 1526 1527 |
# File 'lib/infrawrench/client.rb', line 1525 def default @default end |
#pin ⇒ DashboardsPinNamespace (readonly)
Returns client.dashboards.pin.
1527 1528 1529 |
# File 'lib/infrawrench/client.rb', line 1527 def pin @pin end |
#widgets ⇒ DashboardsWidgetsNamespace (readonly)
Returns client.dashboards.widgets.
1529 1530 1531 |
# File 'lib/infrawrench/client.rb', line 1529 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
1552 1553 1554 1555 1556 1557 1558 1559 1560 |
# File 'lib/infrawrench/client.rb', line 1552 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
1580 1581 1582 1583 1584 1585 1586 1587 |
# File 'lib/infrawrench/client.rb', line 1580 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
1603 1604 1605 1606 1607 1608 1609 1610 |
# File 'lib/infrawrench/client.rb', line 1603 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
1624 1625 1626 1627 1628 1629 1630 1631 |
# File 'lib/infrawrench/client.rb', line 1624 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
1645 1646 1647 1648 1649 1650 1651 1652 1653 |
# File 'lib/infrawrench/client.rb', line 1645 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
1668 1669 1670 1671 1672 1673 1674 1675 1676 |
# File 'lib/infrawrench/client.rb', line 1668 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
1697 1698 1699 1700 1701 1702 1703 1704 1705 |
# File 'lib/infrawrench/client.rb', line 1697 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
1721 1722 1723 1724 1725 1726 1727 1728 1729 |
# File 'lib/infrawrench/client.rb', line 1721 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
1744 1745 1746 1747 1748 1749 1750 1751 1752 |
# File 'lib/infrawrench/client.rb', line 1744 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
1766 1767 1768 1769 1770 1771 1772 1773 1774 |
# File 'lib/infrawrench/client.rb', line 1766 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
1788 1789 1790 1791 1792 1793 1794 1795 1796 |
# File 'lib/infrawrench/client.rb', line 1788 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 |