\AdminAPI
All URIs are relative to http://localhost:8080
| Method | HTTP request | Description |
|---|---|---|
| Health | Get /admin/health | Liveness probe |
| Metrics | Get /admin/metrics | Prometheus metrics |
| Ready | Get /admin/ready | Readiness probe |
| Status | Get /admin/status | Runtime status |
Health
HealthResponse Health(ctx).Execute()
Liveness probe
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CE-RISE-software/hex-core-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AdminAPI.Health(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdminAPI.Health``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Health`: HealthResponse
fmt.Fprintf(os.Stdout, "Response from `AdminAPI.Health`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiHealthRequest struct via the builder pattern
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Metrics
string Metrics(ctx).Execute()
Prometheus metrics
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CE-RISE-software/hex-core-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AdminAPI.Metrics(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdminAPI.Metrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Metrics`: string
fmt.Fprintf(os.Stdout, "Response from `AdminAPI.Metrics`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiMetricsRequest struct via the builder pattern
Return type
string
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Ready
ReadyResponse Ready(ctx).Execute()
Readiness probe
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CE-RISE-software/hex-core-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AdminAPI.Ready(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdminAPI.Ready``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Ready`: ReadyResponse
fmt.Fprintf(os.Stdout, "Response from `AdminAPI.Ready`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiReadyRequest struct via the builder pattern
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Status
map[string]interface{} Status(ctx).Execute()
Runtime status
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CE-RISE-software/hex-core-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AdminAPI.Status(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdminAPI.Status``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Status`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `AdminAPI.Status`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiStatusRequest struct via the builder pattern
Return type
map[string]interface{}
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]