(Teams)
- ListSchedules - List schedules
- List - List teams
- Create - Create a team
- Get - Get a team
- Archive - Archive a team
- Update - Update a team
- ListOnCallSchedules - List on-call schedules for a team
- CreateOnCallSchedule - Create an on-call schedule for a team
- GetScheduleShift - Get an on-call shift for a team schedule
- DeleteScheduleShift - Delete an on-call shift from a team schedule
- UpdateScheduleShift - Update an on-call shift in a team schedule
- CreateEscalationPolicy - Create an escalation policy for a team
- UpdateEscalationPolicy - Update an escalation policy for a team
- CreateShift - Create a shift for an on-call schedule
List all known schedules in FireHydrant as pulled from external sources
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Teams.ListSchedules(ctx, nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.ScheduleEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
query |
*string | ➖ | Filter schedules with a query on their name |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListSchedulesResponse, error
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 all of the teams in the organization
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.Teams.List(ctx, operations.ListTeamsRequest{})
if err != nil {
log.Fatal(err)
}
if res.TeamEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListTeamsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListTeamsResponse, error
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 a new team
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.Teams.Create(ctx, components.PostV1Teams{
Name: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.TeamEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PostV1Teams | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateTeamResponse, error
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 | */* |
Retrieve a single team from its ID
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Teams.Get(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res.TeamEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
teamID |
string | ✔️ | N/A |
lite |
*bool | ➖ | Boolean to determine whether to return a slimified version of the teams object |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetTeamResponse, error
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 | */* |
Archives an team which will hide it from lists and metrics
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Teams.Archive(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.TeamEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
teamID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ArchiveTeamResponse, error
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 a single team from its ID
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.Teams.Update(ctx, "<id>", components.PatchV1TeamsTeamID{})
if err != nil {
log.Fatal(err)
}
if res.TeamEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
teamID |
string | ✔️ | N/A |
patchV1TeamsTeamID |
components.PatchV1TeamsTeamID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateTeamResponse, error
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 all Signals on-call schedules for a team.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Teams.ListOnCallSchedules(ctx, "<id>", nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
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 on-call schedules. |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListTeamOnCallSchedulesResponse, error
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 a Signals on-call schedule for a team.
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.Teams.CreateOnCallSchedule(ctx, "<id>", components.PostV1TeamsTeamIDOnCallSchedules{
Name: "<value>",
TimeZone: "America/Porto_Velho",
Strategy: components.Strategy{
Type: components.PostV1TeamsTeamIDOnCallSchedulesTypeCustom,
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
teamID |
string | ✔️ | N/A |
postV1TeamsTeamIDOnCallSchedules |
components.PostV1TeamsTeamIDOnCallSchedules | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateTeamOnCallScheduleResponse, error
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 a Signals on-call shift by ID
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Teams.GetScheduleShift(ctx, "<id>", "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
string | ✔️ | N/A |
teamID |
string | ✔️ | N/A |
scheduleID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetTeamScheduleShiftResponse, error
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 | */* |
Delete a Signals on-call shift by ID
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Teams.DeleteScheduleShift(ctx, "<id>", "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
string | ✔️ | N/A |
teamID |
string | ✔️ | N/A |
scheduleID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteTeamScheduleShiftResponse, error
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 a Signals on-call shift by ID
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.Teams.UpdateScheduleShift(ctx, "<id>", "<id>", "<id>", components.PatchV1TeamsTeamIDOnCallSchedulesScheduleIDShiftsID{})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
string | ✔️ | N/A |
teamID |
string | ✔️ | N/A |
scheduleID |
string | ✔️ | N/A |
patchV1TeamsTeamIDOnCallSchedulesScheduleIDShiftsID |
components.PatchV1TeamsTeamIDOnCallSchedulesScheduleIDShiftsID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateTeamScheduleShiftResponse, error
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 a Signals escalation policy for a team.
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.Teams.CreateEscalationPolicy(ctx, "<id>", components.PostV1TeamsTeamIDEscalationPolicies{
Name: "<value>",
Steps: []components.PostV1TeamsTeamIDEscalationPoliciesSteps{
components.PostV1TeamsTeamIDEscalationPoliciesSteps{
Targets: []components.Targets{
components.Targets{
Type: components.PostV1TeamsTeamIDEscalationPoliciesTypeWebhook,
ID: "<id>",
},
components.Targets{
Type: components.PostV1TeamsTeamIDEscalationPoliciesTypeEntireTeam,
ID: "<id>",
},
components.Targets{
Type: components.PostV1TeamsTeamIDEscalationPoliciesTypeEntireTeam,
ID: "<id>",
},
},
Timeout: "<value>",
},
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
teamID |
string | ✔️ | N/A |
postV1TeamsTeamIDEscalationPolicies |
components.PostV1TeamsTeamIDEscalationPolicies | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateTeamEscalationPolicyResponse, error
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 a Signals escalation policy by ID
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.Teams.UpdateEscalationPolicy(ctx, "<id>", "<id>", components.PatchV1TeamsTeamIDEscalationPoliciesID{})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
teamID |
string | ✔️ | N/A |
id |
string | ✔️ | N/A |
patchV1TeamsTeamIDEscalationPoliciesID |
components.PatchV1TeamsTeamIDEscalationPoliciesID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateTeamEscalationPolicyResponse, error
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 a Signals on-call shift in a schedule.
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.Teams.CreateShift(ctx, "<id>", "<id>", components.PostV1TeamsTeamIDOnCallSchedulesScheduleIDShifts{
StartTime: "<value>",
EndTime: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
teamID |
string | ✔️ | N/A |
scheduleID |
string | ✔️ | N/A |
postV1TeamsTeamIDOnCallSchedulesScheduleIDShifts |
components.PostV1TeamsTeamIDOnCallSchedulesScheduleIDShifts | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateTeamOnCallScheduleShiftResponse, error
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 | */* |