Skip to content

Latest commit

 

History

History
3081 lines (2397 loc) · 204 KB

README.md

File metadata and controls

3081 lines (2397 loc) · 204 KB

Incidents

(Incidents)

Overview

Operations related to Incidents

Available Operations

GetAiSummaryVoteStatus

Get the vote status for an AI-generated incident summary

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.GetAiSummaryVoteStatus(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
generatedSummaryID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetIncidentAiSummaryVoteStatusResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

List

List all of the incidents in the organization

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/operations"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.List(ctx, operations.ListIncidentsRequest{})
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.ListIncidentsRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

*operations.ListIncidentsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

Create

Create a new incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.Create(ctx, components.PostV1Incidents{
        Name: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request components.PostV1Incidents ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

Get

Retrieve a single incident from its ID

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.Get(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetIncidentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

Archive

Archives an incident which will hide it from lists and metrics

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.Archive(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.ArchiveIncidentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

Update

Updates an incident with provided parameters

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.Update(ctx, "<id>", components.PatchV1IncidentsIncidentID{})
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
patchV1IncidentsIncidentID components.PatchV1IncidentsIncidentID ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteAlert

Remove an alert from an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteAlert(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentAlertID string ✔️ N/A
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentAlertResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

SetAlertAsPrimary

Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.SetAlertAsPrimary(ctx, "<id>", "<id>", components.PatchV1IncidentsIncidentIDAlertsIncidentAlertIDPrimary{
        Primary: false,
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsAlertEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentAlertID string ✔️ N/A
incidentID string ✔️ N/A
patchV1IncidentsIncidentIDAlertsIncidentAlertIDPrimary components.PatchV1IncidentsIncidentIDAlertsIncidentAlertIDPrimary ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.SetIncidentAlertAsPrimaryResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListAttachments

List attachments for an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListAttachments(ctx, "<id>", nil, nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
attachableType *string N/A
page *int N/A
perPage *int N/A
opts []operations.Option The options for this request.

Response

*operations.ListIncidentAttachmentsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateAttachment

Allows adding image attachments to an incident

Example Usage

package main

import(
	"firehydrant"
	"os"
	"context"
	"firehydrant/models/operations"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    content, fileErr := os.Open("example.file")
    if fileErr != nil {
        panic(fileErr)
    }

    ctx := context.Background()
    res, err := s.Incidents.CreateAttachment(ctx, "<id>", operations.CreateIncidentAttachmentRequestBody{
        File: operations.File{
            FileName: "example.file",
            Content: content,
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentAttachmentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
requestBody operations.CreateIncidentAttachmentRequestBody ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentAttachmentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

GetChannel

Gives chat channel information for the specified incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.GetChannel(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsChannelEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetIncidentChannelResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

Close

Closes an incident and optionally close all children

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.Close(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CloseIncidentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListEvents

List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListEvents(ctx, "<id>", nil, nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEventEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
types *string A comma separated list of types of events to filter by
page *int N/A
perPage *int N/A
opts []operations.Option The options for this request.

Response

*operations.ListIncidentEventsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

GetEvent

Retrieve a single event for an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.GetEvent(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEventEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
eventID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetIncidentEventResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteEvent

Delete a single event for an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteEvent(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEventEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
eventID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentEventResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateEvent

Update a single event for an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateEvent(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEventEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
eventID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentEventResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateEventVotes

Allows for upvoting or downvoting an event

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateEventVotes(ctx, "<id>", "<id>", components.PatchV1IncidentsIncidentIDEventsEventIDVotes{
        Direction: components.DirectionDig,
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.VotesEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
eventID string ✔️ N/A
patchV1IncidentsIncidentIDEventsEventIDVotes components.PatchV1IncidentsIncidentIDEventsEventIDVotes ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentEventVotesResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

GetEventVoteStatus

Returns the current vote counts for an object

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.GetEventVoteStatus(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.VotesEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
eventID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetIncidentEventVoteStatusResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateGenericChatMessage

Create a new generic chat message on an incident timeline. These are independent of any specific chat provider.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateGenericChatMessage(ctx, "<id>", components.PostV1IncidentsIncidentIDGenericChatMessages{
        Body: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.EventGenericChatMessageEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDGenericChatMessages components.PostV1IncidentsIncidentIDGenericChatMessages ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentGenericChatMessageResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteChatMessage

Delete an existing generic chat message on an incident.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteChatMessage(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.EventGenericChatMessageEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
messageID string ✔️ N/A
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentChatMessageResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateChatMessage

Update an existing generic chat message on an incident.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateChatMessage(ctx, "<id>", "<id>", components.PatchV1IncidentsIncidentIDGenericChatMessagesMessageID{
        Body: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.EventGenericChatMessageEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
messageID string ✔️ N/A
incidentID string ✔️ N/A
patchV1IncidentsIncidentIDGenericChatMessagesMessageID components.PatchV1IncidentsIncidentIDGenericChatMessagesMessageID ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentChatMessageResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateImpacts

Allows updating an incident's impacted infrastructure, with the option to move the incident into a different milestone and provide a note to update the incident timeline and any attached status pages. If this method is requested with the PUT verb, impacts will be completely replaced with the information in the request body, even if not provided (effectively clearing all impacts). If this method is requested with the PATCH verb, the provided impacts will be added or updated, but no impacts will be removed.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateImpacts(ctx, "<id>", components.PutV1IncidentsIncidentIDImpact{})
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
putV1IncidentsIncidentIDImpact components.PutV1IncidentsIncidentIDImpact ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentImpactsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

PartialUpdateImpacts

Allows updating an incident's impacted infrastructure, with the option to move the incident into a different milestone and provide a note to update the incident timeline and any attached status pages. If this method is requested with the PUT verb, impacts will be completely replaced with the information in the request body, even if not provided (effectively clearing all impacts). If this method is requested with the PATCH verb, the provided impacts will be added or updated, but no impacts will be removed.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.PartialUpdateImpacts(ctx, "<id>", components.PatchV1IncidentsIncidentIDImpact{})
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
patchV1IncidentsIncidentIDImpact components.PatchV1IncidentsIncidentIDImpact ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.PartialUpdateIncidentImpactsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListImpact

List impacted infrastructure on an incident by specifying type

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/operations"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListImpact(ctx, "<id>", operations.PathParamTypeEnvironments)
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentImpactEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
type_ operations.PathParamType ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.ListIncidentImpactResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateImpact

Add impacted infrastructure to an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/operations"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateImpact(ctx, "<id>", operations.CreateIncidentImpactPathParamTypeServices, components.PostV1IncidentsIncidentIDImpactType{
        ID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentImpactEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
type_ operations.CreateIncidentImpactPathParamType ✔️ N/A
postV1IncidentsIncidentIDImpactType components.PostV1IncidentsIncidentIDImpactType ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentImpactResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.ErrorEntity 400 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.BadRequest 413, 414, 415, 422, 431, 510 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteImpact

Remove impacted infrastructure on an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/operations"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteImpact(ctx, "<id>", operations.DeleteIncidentImpactPathParamTypeServices, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
type_ operations.DeleteIncidentImpactPathParamType ✔️ N/A
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentImpactResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.ErrorEntity 400 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.BadRequest 413, 414, 415, 422, 431, 510 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListLinks

List all the editable, external incident links attached to an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListLinks(ctx, "<id>", nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.AttachmentsLinkEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
page *int N/A
perPage *int N/A
opts []operations.Option The options for this request.

Response

*operations.ListIncidentLinksResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateLink

Allows adding adhoc links to an incident as an attachment

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateLink(ctx, "<id>", components.PostV1IncidentsIncidentIDLinks{
        Href: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.AttachmentsLinkEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDLinks components.PostV1IncidentsIncidentIDLinks ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentLinkResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateLink

Updates the external incident link attributes

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateLink(ctx, "<id>", "<id>", components.PutV1IncidentsIncidentIDLinksLinkID{})
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
linkID string ✔️ N/A
incidentID string ✔️ N/A
putV1IncidentsIncidentIDLinksLinkID components.PutV1IncidentsIncidentIDLinksLinkID ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentLinkResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteLink

Deletes the external incident link

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteLink(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
linkID string ✔️ N/A
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentLinkResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListMilestones

List times and durations for each milestone on an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListMilestones(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsMilestoneEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.ListIncidentMilestonesResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateMilestonesBulk

Update milestone times in bulk for a given incident. All milestone times for an incident must occur in chronological order corresponding to the configured order of milestones. If the result of this request would cause any milestone(s) to appear out of place, a 422 response will instead be returned. This includes milestones not explicitly submitted or updated in this request.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/types"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateMilestonesBulk(ctx, "<id>", components.PutV1IncidentsIncidentIDMilestonesBulkUpdate{
        Milestones: []components.PutV1IncidentsIncidentIDMilestonesBulkUpdateMilestones{
            components.PutV1IncidentsIncidentIDMilestonesBulkUpdateMilestones{
                Type: "<value>",
                OccurredAt: types.MustTimeFromString("2023-05-22T05:39:43.411Z"),
            },
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsMilestoneEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
putV1IncidentsIncidentIDMilestonesBulkUpdate components.PutV1IncidentsIncidentIDMilestonesBulkUpdate ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentMilestonesBulkResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateNote

Create a new note on for an incident. The visibility field on a note determines where it gets posted.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateNote(ctx, "<id>", components.PostV1IncidentsIncidentIDNotes{
        Body: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.EventNoteEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDNotes components.PostV1IncidentsIncidentIDNotes ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentNoteResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateNote

Updates the body of a note

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateNote(ctx, "<id>", "<id>", components.PatchV1IncidentsIncidentIDNotesNoteID{
        Body: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.EventNoteEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
noteID string ✔️ N/A
incidentID string ✔️ N/A
patchV1IncidentsIncidentIDNotesNoteID components.PatchV1IncidentsIncidentIDNotesNoteID ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentNoteResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListRelatedChangeEvents

List related changes that have been attached to an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListRelatedChangeEvents(ctx, "<id>", nil, nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRelatedChangeEventEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
page *int N/A
perPage *int N/A
type_ *operations.QueryParamType The type of the relation to the incident
opts []operations.Option The options for this request.

Response

*operations.ListIncidentRelatedChangesResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateRelatedChange

Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateRelatedChange(ctx, "<id>", components.PostV1IncidentsIncidentIDRelatedChangeEvents{
        ChangeEventID: "<id>",
        Type: components.PostV1IncidentsIncidentIDRelatedChangeEventsTypeFixed,
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRelatedChangeEventEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDRelatedChangeEvents components.PostV1IncidentsIncidentIDRelatedChangeEvents ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentRelatedChangeResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.ErrorEntity 400, 409 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.BadRequest 413, 414, 415, 422, 431, 510 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

UpdateRelatedChangeEvent

Update a change attached to an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.UpdateRelatedChangeEvent(ctx, "<id>", "<id>", components.PatchV1IncidentsIncidentIDRelatedChangeEventsRelatedChangeEventID{})
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRelatedChangeEventEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
relatedChangeEventID string ✔️ N/A
incidentID string ✔️ N/A
patchV1IncidentsIncidentIDRelatedChangeEventsRelatedChangeEventID components.PatchV1IncidentsIncidentIDRelatedChangeEventsRelatedChangeEventID ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UpdateIncidentRelatedChangeEventResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.ErrorEntity 400, 409 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.BadRequest 413, 414, 415, 422, 431, 510 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

GetRelationships

List any parent/child relationships for an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.GetRelationships(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRelationshipsEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetIncidentRelationshipsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

Resolve

Resolves a currently active incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.Resolve(ctx, "<id>", nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
requestBody *operations.ResolveIncidentRequestBody N/A
opts []operations.Option The options for this request.

Response

*operations.ResolveIncidentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListRoleAssignments

Retrieve a list of all of the current role assignments for the incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListRoleAssignments(ctx, "<id>", nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRoleAssignmentEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
status *operations.Status Filter on status of the role assignment
opts []operations.Option The options for this request.

Response

*operations.ListIncidentRoleAssignmentsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateRoleAssignment

Assign a role to a user for this incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateRoleAssignment(ctx, "<id>", components.PostV1IncidentsIncidentIDRoleAssignments{
        UserID: "<id>",
        IncidentRoleID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRoleAssignmentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDRoleAssignments components.PostV1IncidentsIncidentIDRoleAssignments ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentRoleAssignmentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteRoleAssignment

Unassign a role from a user

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteRoleAssignment(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRoleAssignmentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
roleAssignmentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentRoleAssignmentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListSimilar

List similar incidents

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListSimilar(ctx, "<id>", nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
threshold *float32 N/A
limit *int N/A
opts []operations.Option The options for this request.

Response

*operations.GetSimilarIncidentsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

ListStatusPages

List status pages that are attached to an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.ListStatusPages(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsStatusPageEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.ListIncidentStatusPagesResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

AddStatusPage

Add a status page to an incident.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.AddStatusPage(ctx, "<id>", components.PostV1IncidentsIncidentIDStatusPages{
        IntegrationSlug: "<value>",
        IntegrationID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsStatusPageEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDStatusPages components.PostV1IncidentsIncidentIDStatusPages ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentStatusPageResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateTaskList

Add all tasks from list to incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateTaskList(ctx, "<id>", components.PostV1IncidentsIncidentIDTaskLists{
        TaskListID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.TaskEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDTaskLists components.PostV1IncidentsIncidentIDTaskLists ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentTaskListResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

CreateTeamAssignment

Assign a team for this incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"firehydrant/models/components"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.CreateTeamAssignment(ctx, "<id>", components.PostV1IncidentsIncidentIDTeamAssignments{
        TeamID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
postV1IncidentsIncidentIDTeamAssignments components.PostV1IncidentsIncidentIDTeamAssignments ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.CreateIncidentTeamAssignmentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteTeamAssignment

Unassign a team from an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteTeamAssignment(ctx, "<id>", "<id>", nil)
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
teamAssignmentID string ✔️ N/A
requestBody *operations.DeleteIncidentTeamAssignmentRequestBody N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentTeamAssignmentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

GetTranscript

Retrieve the transcript for a specific incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.GetTranscript(ctx, "<id>", nil, nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.PublicApiv1IncidentsTranscriptEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
after *string The ID of the transcript entry to start after.
before *string The ID of the transcript entry to start before.
sort *operations.QueryParamSort The order to sort the transcript entries.
opts []operations.Option The options for this request.

Response

*operations.GetIncidentTranscriptResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

DeleteTranscript

Delete a transcript from an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.DeleteTranscript(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
transcriptID string ✔️ N/A
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.DeleteIncidentTranscriptResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

Unarchive

Unarchives an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.Unarchive(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.UnarchiveIncidentResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*

GetUserRole

Retrieve a user with current roles for an incident

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Incidents.GetUserRole(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IncidentsRoleAssignmentEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
incidentID string ✔️ N/A
userID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetIncidentUserRoleResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.BadRequest 400, 413, 414, 415, 422, 431, 510 application/json
sdkerrors.Unauthorized 401, 403, 407, 511 application/json
sdkerrors.NotFound 404, 501, 505 application/json
sdkerrors.Timeout 408, 504 application/json
sdkerrors.RateLimited 429 application/json
sdkerrors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
sdkerrors.SDKError 4XX, 5XX */*