Skip to content

Latest commit

 

History

History
826 lines (640 loc) · 55.9 KB

File metadata and controls

826 lines (640 loc) · 55.9 KB

Retrospectives

(Retrospectives)

Overview

Operations related to Retrospectives

Available Operations

ListQuestions

List the questions configured to be provided and filled out on each retrospective report.

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.Retrospectives.ListQuestions(ctx, nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsQuestionTypeEntityPaginated != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.ListRetrospectiveQuestionsResponse, 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 */*

UpdateQuestions

Update the questions configured to be provided and filled out on future retrospective reports.

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.Retrospectives.UpdateQuestions(ctx, components.PutV1PostMortemsQuestions{})
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsQuestionTypeEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.UpdateRetrospectiveQuestionsResponse, 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 */*

GetQuestion

Get an incident retrospective question

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.Retrospectives.GetQuestion(ctx, "<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.
questionID string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetRetrospectiveQuestionResponse, 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 */*

ListReports

List all reports

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.Retrospectives.ListReports(ctx, nil, nil, nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsPostMortemReportEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
page *int N/A
perPage *int N/A
incidentID *string Filter the reports by an incident ID
updatedSince *time.Time Filter for reports updated after the given ISO8601 timestamp
opts []operations.Option The options for this request.

Response

*operations.ListRetrospectiveReportsResponse, 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 */*

CreateReport

Create a report

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.Retrospectives.CreateReport(ctx, components.PostV1PostMortemsReports{
        IncidentID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsPostMortemReportEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.CreateRetrospectiveReportResponse, 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 */*

GetReport

Get a report

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.Retrospectives.GetReport(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsPostMortemReportEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.GetPostMortemReportResponse, 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 */*

UpdateReport

Update a report

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.Retrospectives.UpdateReport(ctx, "<id>", components.PatchV1PostMortemsReportsReportID{})
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsPostMortemReportEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.UpdatePostMortemReportResponse, 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 */*

UpdateField

Update a field value on a post mortem report

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.Retrospectives.UpdateField(ctx, "<id>", "<id>", components.PatchV1PostMortemsReportsReportIDFieldsFieldID{
        Value: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsSectionFieldEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.UpdateRetrospectiveFieldResponse, 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 */*

PublishReport

Marks an incident retrospective as published and emails all of the participants in the report the summary

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.Retrospectives.PublishReport(ctx, "<id>", components.PostV1PostMortemsReportsReportIDPublish{})
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsPostMortemReportEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.PublishRetrospectiveReportResponse, 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 */*

ListReportReasons

List all contributing factors 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.Retrospectives.ListReportReasons(ctx, "<id>", nil, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsReasonEntityPaginated != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.ListRetrospectiveReportReasonsResponse, 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 */*

CreateReason

Add a new contributing factor 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.Retrospectives.CreateReason(ctx, "<id>", components.PostV1PostMortemsReportsReportIDReasons{
        Summary: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsReasonEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.CreateRetrospectiveReportReasonResponse, 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 */*

UpdateReportReasonOrder

Reorder a contributing factor

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.Retrospectives.UpdateReportReasonOrder(ctx, "<id>", components.PutV1PostMortemsReportsReportIDReasonsOrder{
        OldPosition: 868580,
        NewPosition: 521651,
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsReasonEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.UpdateRetrospectiveReportReasonOrderResponse, 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 */*

DeleteReason

Delete a contributing factor

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.Retrospectives.DeleteReason(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsReasonEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.DeleteRetrospectiveReasonResponse, 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 */*

UpdateReason

Update a contributing factor

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.Retrospectives.UpdateReason(ctx, "<id>", "<id>", components.PatchV1PostMortemsReportsReportIDReasonsReasonID{})
    if err != nil {
        log.Fatal(err)
    }
    if res.PostMortemsReasonEntity != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.UpdateRetrospectiveReasonResponse, 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 */*