Download command output file
client.ZeroTrust.DEX.Commands.Downloads.Get(ctx, commandID, filename, query) (*Response, error)
GET/accounts/{account_id}/dex/commands/{command_id}/downloads/{filename}
Downloads artifacts for an executed command. Bulk downloads are not supported
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Download command output file
package main
import (
"context"
"fmt"
"github.com/cloudflare/cloudflare-go"
"github.com/cloudflare/cloudflare-go/option"
"github.com/cloudflare/cloudflare-go/zero_trust"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
download, err := client.ZeroTrust.DEX.Commands.Downloads.Get(
context.TODO(),
"5758fefe-ae7e-4538-a39b-1fef6abcb909",
"filename",
zero_trust.DEXCommandDownloadGetParams{
AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", download)
}