(MetricsReporting)
- ListMeasurementDefinitions - List measurement definitions
- CreateMeasurementDefinition - Create a measurement definition
- GetMeasurementDefinition - Get a measurement definition
- DeleteMeasurementDefinition - Archive a measurement definition
- UpdateMeasurementDefinition - Update a measurement definition
- ListIncidentMetrics - List incident metrics and analytics
- GetMilestoneFunnelMetrics - List milestone funnel metrics
- ListRetrospectives - List retrospective metrics for a date range
- GetTicketFunnel - List ticket funnel metrics
- ListUserInvolvementMetrics - List user involvement metrics
- ListInfrastructureMetrics - List metrics for all services, environments, functionalities, or customers
- GetMeanTime - Get mean time metrics for incidents
- ListSavedSearches - List saved searches
- CreateSavedSearch - Create a saved search
List all of the measurement definitions in the organization
package main
import(
"context"
"firehydrant"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.ListMeasurementDefinitions(ctx, 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. |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListMeasurementDefinitionsResponse, 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 measurement definition
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.CreateMeasurementDefinition(ctx, operations.CreateMeasurementDefinitionRequestBody{
Name: "<value>",
StartsAtMilestoneID: "<id>",
EndsAtMilestoneID: "<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. |
request |
operations.CreateMeasurementDefinitionRequestBody | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateMeasurementDefinitionResponse, 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 measurement definition from its ID
package main
import(
"context"
"firehydrant"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.GetMeasurementDefinition(ctx, "<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. |
measurementDefinitionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetMeasurementDefinitionResponse, 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 a measurement definition which will hide it from lists and metrics
package main
import(
"context"
"firehydrant"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.DeleteMeasurementDefinition(ctx, "<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. |
measurementDefinitionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteMeasurementDefinitionResponse, 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 measurement definition from its ID
package main
import(
"context"
"firehydrant"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.UpdateMeasurementDefinition(ctx, "<id>", 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. |
measurementDefinitionID |
string | ✔️ | N/A |
requestBody |
*operations.UpdateMeasurementDefinitionRequestBody | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateMeasurementDefinitionResponse, 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 | */* |
Returns a report with time bucketed analytics data
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.ListIncidentMetrics(ctx, operations.ListIncidentMetricsRequest{})
if err != nil {
log.Fatal(err)
}
if res.MetricsMetricsEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListIncidentMetricsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListIncidentMetricsResponse, 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 | */* |
Returns a report with time bucketed milestone data
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.GetMilestoneFunnelMetrics(ctx, operations.GetMilestoneFunnelMetricsRequest{})
if err != nil {
log.Fatal(err)
}
if res.MetricsMilestonesFunnelEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetMilestoneFunnelMetricsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetMilestoneFunnelMetricsResponse, 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 | */* |
Returns a report with retrospective analytics data
package main
import(
"context"
"firehydrant"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.ListRetrospectives(ctx, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.MetricsRetrospectiveEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
startDate |
*types.Date | ➖ | The start date to return metrics from |
endDate |
*types.Date | ➖ | The end date to return metrics from |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListRetrospectiveMetricsResponse, 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 | */* |
Returns a report with task and follow up creation and completion data
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.GetTicketFunnel(ctx, operations.GetTicketFunnelMetricsRequest{})
if err != nil {
log.Fatal(err)
}
if res.MetricsTicketFunnelMetricsEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetTicketFunnelMetricsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetTicketFunnelMetricsResponse, 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 | */* |
Returns a report with time bucketed analytics data
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.ListUserInvolvementMetrics(ctx, operations.ListUserInvolvementMetricsRequest{})
if err != nil {
log.Fatal(err)
}
if res.MetricsMetricsEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListUserInvolvementMetricsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListUserInvolvementMetricsResponse, 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 | */* |
Returns metrics for all components of a given type
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.ListInfrastructureMetrics(ctx, operations.InfraTypeServices, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.MetricsInfrastructureListEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
infraType |
operations.InfraType | ✔️ | N/A |
startDate |
*types.Date | ➖ | The start date to return metrics from; defaults to 30 days ago |
endDate |
*types.Date | ➖ | The end date to return metrics from, defaults to today |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListInfrastructureMetricsResponse, 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 | */* |
Returns a report with time bucketed analytics data
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.GetMeanTime(ctx, operations.GetMeanTimeReportRequest{})
if err != nil {
log.Fatal(err)
}
if res.ReportEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetMeanTimeReportRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetMeanTimeReportResponse, 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 | */* |
Lists save searches
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.ListSavedSearches(ctx, operations.ListSavedSearchesRequest{
ResourceType: operations.ResourceTypeIncidentEvents,
})
if err != nil {
log.Fatal(err)
}
if res.SavedSearchEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListSavedSearchesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListSavedSearchesResponse, 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 saved search for a particular resource type
package main
import(
"context"
"firehydrant"
"firehydrant/models/operations"
"firehydrant/models/components"
"log"
)
func main() {
ctx := context.Background()
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.MetricsReporting.CreateSavedSearch(ctx, operations.PathParamResourceTypeTicketFollowUps, components.PostV1SavedSearchesResourceType{
Name: "<value>",
FilterValues: map[string]any{
},
})
if err != nil {
log.Fatal(err)
}
if res.SavedSearchEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
resourceType |
operations.PathParamResourceType | ✔️ | N/A |
postV1SavedSearchesResourceType |
components.PostV1SavedSearchesResourceType | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateSavedSearchResponse, 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 | */* |