## List custom assets `client.CustomPages.Assets.List(ctx, params) (*V4PagePaginationArray[AssetListResponse], error)` **get** `/{accounts_or_zones}/{account_or_zone_id}/custom_pages/assets` Fetches all the custom assets. ### Parameters - `params AssetListParams` - `AccountID param.Field[string]` Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - `ZoneID param.Field[string]` Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - `Page param.Field[int64]` Query param - `PerPage param.Field[int64]` Query param ### Returns - `type AssetListResponse struct{…}` - `Description string` A short description of the custom asset. - `LastUpdated Time` - `Name string` The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). - `SizeBytes int64` The size of the asset content in bytes. - `URL string` The URL where the asset content is fetched from. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/custom_pages" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) page, err := client.CustomPages.Assets.List(context.TODO(), custom_pages.AssetListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "description": "Custom 500 error page", "last_updated": "2014-01-01T05:20:00.12345Z", "name": "my_custom_error_page", "size_bytes": 1024, "url": "https://example.com/error.html" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ```