{"modulePath":"github.com/hostinger/api-cli","version":"v1.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package actions\n\n## Variables\n\n```go\nvar GetCmd = \u0026cobra.Command{\n\tUse:   \"get \u003cvirtual-machine-id\u003e \u003caction-id\u003e\",\n\tShort: \"Get action details\",\n\tLong:  \"Retrieve detailed information about a specific action performed on a specified virtual machine.\\n\\nUse this endpoint to monitor specific VPS operation status and details.\",\n\tArgs:  cobra.MatchAll(cobra.ExactArgs(2)),\n\tRun: func(cmd *cobra.Command, args []string) {\n\t\tr, err := api.Request().VPSGetActionDetailsV1WithResponse(context.TODO(), utils.StringToInt(args[0]), utils.StringToInt(args[1]))\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\toutput.Format(cmd, r.Body, r.StatusCode())\n\t},\n}\n```\n\n```go\nvar GroupCmd = \u0026cobra.Command{\n\tUse:   \"actions\",\n\tShort: \"Actions commands\",\n}\n```\n\n```go\nvar ListCmd = \u0026cobra.Command{\n\tUse:   \"list \u003cvirtual-machine-id\u003e\",\n\tShort: \"Get actions\",\n\tLong:  \"Retrieve actions performed on a specified virtual machine.\\n\\nActions are operations or events that have been executed on the virtual\\nmachine, such as starting, stopping, or modifying the machine. This endpoint\\nallows you to view the history of these actions, providing details about\\neach action, such as the action name, timestamp, and status.\\n\\nUse this endpoint to view VPS operation history and troubleshoot issues.\",\n\tArgs:  cobra.MatchAll(cobra.ExactArgs(1)),\n\tRun: func(cmd *cobra.Command, args []string) {\n\t\tr, err := api.Request().VPSGetActionsV1WithResponse(context.TODO(), utils.StringToInt(args[0]), listParams(cmd))\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\toutput.Format(cmd, r.Body, r.StatusCode())\n\t},\n}\n```\n\n","path":"github.com/hostinger/api-cli/cmd/vps/actions","name":"actions","synopsis":"","isRedistributable":true}
