Skip to content

Latest commit

 

History

History
1571 lines (1216 loc) · 97.1 KB

README.md

File metadata and controls

1571 lines (1216 loc) · 97.1 KB

Signals

(Signals)

Overview

Operations related to Signals

Available Operations

ListGroupedMetrics

Generate a report of grouped metrics for Signals alerts

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.Signals.ListGroupedMetrics(ctx, operations.GetSignalGroupedMetricsRequest{})
    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.
request operations.GetSignalGroupedMetricsRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

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

GetMttxAnalytics

Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts

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.Signals.GetMttxAnalytics(ctx, operations.GetSignalsMttxAnalyticsRequest{})
    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.
request operations.GetSignalsMttxAnalyticsRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

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

GetAnalyticsTimeseries

Generate a timeseries-based report of metrics for Signals alerts

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.Signals.GetAnalyticsTimeseries(ctx, operations.GetSignalsAnalyticsTimeseriesRequest{})
    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.
request operations.GetSignalsAnalyticsTimeseriesRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

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

Debug

Debug a signal

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.Signals.Debug(ctx, components.PostV1SignalsDebugger{
        Expression: "<value>",
        Signals: []components.Signals{
            components.Signals{},
        },
    })
    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.
request components.PostV1SignalsDebugger ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

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

ListEmailTargets

List all Signals email targets for a team.

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.Signals.ListEmailTargets(ctx, 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.
query *string A query string to search the list of targets by.
opts []operations.Option The options for this request.

Response

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

CreateEmailTarget

Create a Signals email target for a team.

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.Signals.CreateEmailTarget(ctx, components.PostV1SignalsEmailTargets{
        Name: "<value>",
    })
    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.
request components.PostV1SignalsEmailTargets ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

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

GetEmailTarget

Get a Signals email target by 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.Signals.GetEmailTarget(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.
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

DeleteEmailTarget

Delete a Signals email target by 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.Signals.DeleteEmailTarget(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.
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

UpdateEmailTarget

Update a Signals email target by ID

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.Signals.UpdateEmailTarget(ctx, "<id>", components.PatchV1SignalsEmailTargetsID{})
    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.
id string ✔️ N/A
patchV1SignalsEmailTargetsID components.PatchV1SignalsEmailTargetsID ✔️ N/A
opts []operations.Option The options for this request.

Response

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

ListEventSources

List event sources for signals

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.Signals.ListEventSources(ctx, nil, 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.
teamID *string Team ID to send signals to directly
escalationPolicyID *string Escalation policy ID to send signals to directly. team_id is required if this is provided.
onCallScheduleID *string On-call schedule ID to send signals to directly. team_id is required if this is provided.
userID *string User ID to send signals to directly
opts []operations.Option The options for this request.

Response

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

GetIngestURL

Retrieve the url for ingesting signals for your organization

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

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
teamID *string Team ID to send signals to directly
escalationPolicyID *string Escalation policy ID to send signals to directly. team_id is required if this is provided.
onCallScheduleID *string On-call schedule ID to send signals to directly. team_id is required if this is provided.
userID *string User ID to send signals to directly
opts []operations.Option The options for this request.

Response

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

ListTransposers

List signal transposers

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.Signals.ListTransposers(ctx)
    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.
opts []operations.Option The options for this request.

Response

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

ListWebhookTargets

List all Signals webhook targets.

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.Signals.ListWebhookTargets(ctx, 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.
query *string A query string for searching through the list of webhook targets.
page *int N/A
perPage *int N/A
opts []operations.Option The options for this request.

Response

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

CreateWebhookTarget

Create a Signals webhook target.

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.Signals.CreateWebhookTarget(ctx, components.PostV1SignalsWebhookTargets{
        Name: "<value>",
        URL: "https://tasty-silk.info",
    })
    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.
request components.PostV1SignalsWebhookTargets ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

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

GetWebhookTarget

Get a Signals webhook target by 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.Signals.GetWebhookTarget(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.
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

DeleteWebhookTarget

Delete a Signals webhook target by 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.Signals.DeleteWebhookTarget(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.
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

UpdateWebhookTarget

Update a Signals webhook target by ID

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.Signals.UpdateWebhookTarget(ctx, "<id>", components.PatchV1SignalsWebhookTargetsID{})
    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.
id string ✔️ N/A
patchV1SignalsWebhookTargetsID components.PatchV1SignalsWebhookTargetsID ✔️ N/A
opts []operations.Option The options for this request.

Response

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

ListOnCall

List all Signals on-call schedules for the entire organization.

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.Signals.ListOnCall(ctx, 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.
teamID *string An optional comma separated list of team IDs to filter currently on-call users by
opts []operations.Option The options for this request.

Response

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

ListEscalationPolicies

List all Signals escalation policies for a team.

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.Signals.ListEscalationPolicies(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.
teamID string ✔️ N/A
query *string A query string for searching through the list of escalation policies.
page *int N/A
perPage *int N/A
opts []operations.Option The options for this request.

Response

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

DeleteEscalationPolicy

Delete a Signals escalation policy by 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.Signals.DeleteEscalationPolicy(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.
teamID string ✔️ N/A
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

GetOnCallSchedule

Get a Signals on-call schedule by 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.Signals.GetOnCallSchedule(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.
teamID string ✔️ N/A
scheduleID string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

UpdateOnCallSchedule

Update a Signals on-call schedule by ID

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.Signals.UpdateOnCallSchedule(ctx, "<id>", "<id>", components.PatchV1TeamsTeamIDOnCallSchedulesScheduleID{})
    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.
teamID string ✔️ N/A
scheduleID string ✔️ N/A
patchV1TeamsTeamIDOnCallSchedulesScheduleID components.PatchV1TeamsTeamIDOnCallSchedulesScheduleID ✔️ N/A
opts []operations.Option The options for this request.

Response

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

ListRules

List all Signals rules for a team.

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.Signals.ListRules(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.
teamID string ✔️ N/A
query *string A query string for searching through the list of alerting rules.
page *int N/A
perPage *int N/A
opts []operations.Option The options for this request.

Response

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

CreateRule

Create a Signals rule for a team.

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.Signals.CreateRule(ctx, "<id>", components.PostV1TeamsTeamIDSignalRules{
        Name: "<value>",
        Expression: "<value>",
        TargetType: components.TargetTypeWebhook,
        TargetID: "<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.
teamID string ✔️ N/A
postV1TeamsTeamIDSignalRules components.PostV1TeamsTeamIDSignalRules ✔️ N/A
opts []operations.Option The options for this request.

Response

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

GetRule

Get a Signals rule by 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.Signals.GetRule(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.
teamID string ✔️ N/A
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

DeleteRule

Delete a Signals rule by 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.Signals.DeleteRule(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.
teamID string ✔️ N/A
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

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

UpdateRule

Update a Signals rule by ID

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.Signals.UpdateRule(ctx, "<id>", "<id>", components.PatchV1TeamsTeamIDSignalRulesID{})
    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.
teamID string ✔️ N/A
id string ✔️ N/A
patchV1TeamsTeamIDSignalRulesID components.PatchV1TeamsTeamIDSignalRulesID ✔️ N/A
opts []operations.Option The options for this request.

Response

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