Class: Infrawrench::IncidentsNotesNamespace
- Inherits:
-
Object
- Object
- Infrawrench::IncidentsNotesNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.incidents.notes
Instance Method Summary collapse
-
#create(incident_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Add an operator note.
-
#delete(incident_id:, note_id:, org_id: nil, request_options: nil) ⇒ nil
Delete an operator note.
-
#initialize(transport) ⇒ IncidentsNotesNamespace
constructor
private
A new instance of IncidentsNotesNamespace.
Constructor Details
#initialize(transport) ⇒ IncidentsNotesNamespace
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 IncidentsNotesNamespace.
8083 8084 8085 |
# File 'lib/infrawrench/client.rb', line 8083 def initialize(transport) @transport = transport end |
Instance Method Details
#create(incident_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Add an operator note
The running commentary no join can reconstruct. occurredAt may be
backdated so a note typed at 04:00 lands on the timeline where it belongs.
Requires permission: incidents:write.
POST /api/org/orgId/incidents/incidentId/notes
Raises on 400: Bad request
Raises on 404: Not found
8107 8108 8109 8110 8111 8112 8113 8114 8115 |
# File 'lib/infrawrench/client.rb', line 8107 def create(incident_id:, org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/incidents/{incidentId}/notes", path_params: { "orgId" => org_id, "incidentId" => incident_id }, body: body, request_options: ) end |
#delete(incident_id:, note_id:, org_id: nil, request_options: nil) ⇒ nil
Delete an operator note
Requires permission: incidents:write.
DELETE /api/org/orgId/incidents/incidentId/notes/noteId
Raises on 404: Not found
8132 8133 8134 8135 8136 8137 8138 8139 8140 |
# File 'lib/infrawrench/client.rb', line 8132 def delete(incident_id:, note_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/incidents/{incidentId}/notes/{noteId}", path_params: { "orgId" => org_id, "incidentId" => incident_id, "noteId" => note_id }, accept: :empty, request_options: ) end |