godo.OneClick.List()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.OneClick.List(ctx context.Context, oneClickType string) ([]*godo.OneClick, *godo.Response, error)

Description

List returns a list of the available 1-click applications.

This method sends a GET request to /v2/1-clicks.

Parameters

oneClickType string required

Returns

[]*godo.OneClick
*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.OneClick

OneClick is the structure of a 1-click

Slug string

JSON key: slug

Type string

JSON key: type

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.OneClick.List(ctx, "<your-one-click-type>")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

Response Example

Show Response Example
{
  "1_clicks": [
    {
      "slug": "monitoring",
      "type": "kubernetes"
    },
    {
      "slug": "wordpress-18-04",
      "type": "droplet"
    }
  ]
}

More Information

See GET /v2/1-clicks 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.