All URIs are relative to https://dashboard.quantcdn.io
| Method | HTTP request | Description |
|---|---|---|
| GetDailyMetrics | Get /v2/organizations/{organization}/projects/{project}/metrics/daily | Get daily metrics |
| GetHourlyMetrics | Get /v2/organizations/{organization}/projects/{project}/metrics/hourly | Get hourly metrics |
| GetMonthlyMetrics | Get /v2/organizations/{organization}/projects/{project}/metrics/monthly | Get monthly metrics |
V2MetricsResponse GetDailyMetrics(ctx, organization, project).Domain(domain).Metrics(metrics).TimestampFormat(timestampFormat).Execute()
Get daily metrics
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/quantcdn/quant-admin-go"
)
func main() {
organization := "organization_example" // string | Organization identifier
project := "project_example" // string | Project identifier
domain := "domain_example" // string | Filter by domain ID or domain name (optional)
metrics := []string{"Inner_example"} // []string | Metrics to return (default: hits, bytes) (optional)
timestampFormat := "timestampFormat_example" // string | Timestamp format in response (optional) (default to "iso8601")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CDNMetricsAPI.GetDailyMetrics(context.Background(), organization, project).Domain(domain).Metrics(metrics).TimestampFormat(timestampFormat).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CDNMetricsAPI.GetDailyMetrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDailyMetrics`: V2MetricsResponse
fmt.Fprintf(os.Stdout, "Response from `CDNMetricsAPI.GetDailyMetrics`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| organization | string | Organization identifier | |
| project | string | Project identifier |
Other parameters are passed through a pointer to a apiGetDailyMetricsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
domain | string | Filter by domain ID or domain name | metrics | []string | Metrics to return (default: hits, bytes) | timestampFormat | string | Timestamp format in response | [default to "iso8601"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2MetricsResponse GetHourlyMetrics(ctx, organization, project).Domain(domain).Metrics(metrics).TimestampFormat(timestampFormat).Execute()
Get hourly metrics
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/quantcdn/quant-admin-go"
)
func main() {
organization := "organization_example" // string | Organization identifier
project := "project_example" // string | Project identifier
domain := "domain_example" // string | Filter by domain ID or domain name (optional)
metrics := []string{"Inner_example"} // []string | Metrics to return (default: hits, bytes) (optional)
timestampFormat := "timestampFormat_example" // string | Timestamp format in response (optional) (default to "iso8601")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CDNMetricsAPI.GetHourlyMetrics(context.Background(), organization, project).Domain(domain).Metrics(metrics).TimestampFormat(timestampFormat).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CDNMetricsAPI.GetHourlyMetrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHourlyMetrics`: V2MetricsResponse
fmt.Fprintf(os.Stdout, "Response from `CDNMetricsAPI.GetHourlyMetrics`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| organization | string | Organization identifier | |
| project | string | Project identifier |
Other parameters are passed through a pointer to a apiGetHourlyMetricsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
domain | string | Filter by domain ID or domain name | metrics | []string | Metrics to return (default: hits, bytes) | timestampFormat | string | Timestamp format in response | [default to "iso8601"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2MetricsResponse GetMonthlyMetrics(ctx, organization, project).Domain(domain).Metrics(metrics).TimestampFormat(timestampFormat).Execute()
Get monthly metrics
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/quantcdn/quant-admin-go"
)
func main() {
organization := "organization_example" // string | Organization identifier
project := "project_example" // string | Project identifier
domain := "domain_example" // string | Filter by domain ID or domain name (optional)
metrics := []string{"Inner_example"} // []string | Metrics to return (default: hits, bytes) (optional)
timestampFormat := "timestampFormat_example" // string | Timestamp format in response (optional) (default to "iso8601")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CDNMetricsAPI.GetMonthlyMetrics(context.Background(), organization, project).Domain(domain).Metrics(metrics).TimestampFormat(timestampFormat).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CDNMetricsAPI.GetMonthlyMetrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMonthlyMetrics`: V2MetricsResponse
fmt.Fprintf(os.Stdout, "Response from `CDNMetricsAPI.GetMonthlyMetrics`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| organization | string | Organization identifier | |
| project | string | Project identifier |
Other parameters are passed through a pointer to a apiGetMonthlyMetricsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
domain | string | Filter by domain ID or domain name | metrics | []string | Metrics to return (default: hits, bytes) | timestampFormat | string | Timestamp format in response | [default to "iso8601"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]