godo.Apps.GetAppHealth()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.Apps.GetAppHealth(ctx context.Context, appID string) (*godo.AppHealth, *godo.Response, error)

Description

This method sends a GET request to /v2/apps/{}/health.

Parameters

appID string required

Returns

*godo.AppHealth
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.AppHealth

AppHealth struct for AppHealth

Components []*godo.ComponentHealth

Omitted from JSON when empty. JSON key: components

FunctionsComponents []*godo.FunctionsComponentHealth

Omitted from JSON when empty. JSON key: functions_components

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.Apps.GetAppHealth(ctx, "<your-app-id>")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

Response Example

Show Response Example
{
  "components": [
    {
      "name": "sample-expressjs",
      "cpu_usage_percent": 5.555,
      "memory_usage_percent": 20.32,
      "replicas_desired": 1,
      "replicas_ready": 2,
      "state": "HEALTHY"
    }
  ]
}

More Information

See GET /v2/apps/{}/health in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.