Class: Infrawrench::StatusPagesNamespace
- Inherits:
-
Object
- Object
- Infrawrench::StatusPagesNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.status_pages
Instance Method Summary collapse
-
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Create a status page.
-
#delete(id:, org_id: nil, request_options: nil) ⇒ nil
Delete a status page.
-
#get(org_id: nil, request_options: nil) ⇒ Hash
List status pages.
-
#initialize(transport) ⇒ StatusPagesNamespace
constructor
private
A new instance of StatusPagesNamespace.
-
#rotate_slug(id:, org_id: nil, request_options: nil) ⇒ Hash
Issue a new public link.
-
#update(id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update a status page.
Constructor Details
#initialize(transport) ⇒ StatusPagesNamespace
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 StatusPagesNamespace.
14011 14012 14013 |
# File 'lib/infrawrench/client.rb', line 14011 def initialize(transport) @transport = transport end |
Instance Method Details
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Create a status page
Creates a page with a freshly generated slug. published defaults to
false, so creating a page never exposes anything — publish it as a
separate, deliberate step.
Requires permission: resources:write.
POST /api/org/orgId/status-pages
Raises on 400: Bad request
Raises on 404: Not found
14035 14036 14037 14038 14039 14040 14041 14042 14043 |
# File 'lib/infrawrench/client.rb', line 14035 def create(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/status-pages", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ nil
Delete a status page
The page's link stops working. The probes it published are untouched.
Requires permission: resources:write.
DELETE /api/org/orgId/status-pages/id
Raises on 404: Not found
14061 14062 14063 14064 14065 14066 14067 14068 14069 |
# File 'lib/infrawrench/client.rb', line 14061 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/status-pages/{id}", path_params: { "orgId" => org_id, "id" => id }, accept: :empty, request_options: ) end |
#get(org_id: nil, request_options: nil) ⇒ Hash
List status pages
Every status page in the organization, with the probes each publishes and whether it is currently reachable.
Requires permission: resources:read.
GET /api/org/orgId/status-pages
14086 14087 14088 14089 14090 14091 14092 14093 |
# File 'lib/infrawrench/client.rb', line 14086 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/status-pages", path_params: { "orgId" => org_id }, request_options: ) end |
#rotate_slug(id:, org_id: nil, request_options: nil) ⇒ Hash
Issue a new public link
Replaces the slug, revoking the current public URL immediately — the reroll for a link that ended up somewhere unintended. The page stays published.
Requires permission: resources:write.
POST /api/org/orgId/status-pages/id/rotate-slug
Raises on 404: Not found
14113 14114 14115 14116 14117 14118 14119 14120 |
# File 'lib/infrawrench/client.rb', line 14113 def rotate_slug(id:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/status-pages/{id}/rotate-slug", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#update(id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update a status page
Omitted fields keep their value. components, when present, replaces the
whole ordered set — which is also how a reorder is expressed.
Requires permission: resources:write.
PUT /api/org/orgId/status-pages/id
Raises on 400: Bad request
Raises on 404: Not found
14142 14143 14144 14145 14146 14147 14148 14149 14150 |
# File 'lib/infrawrench/client.rb', line 14142 def update(id:, org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/status-pages/{id}", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |