fleet/cmd/fleetctl
Dan Fuhry 60b3b514c2
[fleetctl] api command: support request body, including file uploads (#30806)
Add the capability to build a request body with `fleetctl api`,
including uploading files.

Example command to upload a software package:

```sh
fleetctl api --debug -X POST -F team_id=0 -F 'software=@./server/service/testdata/software-installers/ruby.deb' software/package
```

Unit tests are included for both simple POST requests and file uploads.

Closes #21754.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-07-29 08:15:23 -05:00
..
fleetctl [fleetctl] api command: support request body, including file uploads (#30806) 2025-07-29 08:15:23 -05:00
integrationtest Better gitops unmarshal type errors (#30647) 2025-07-24 13:49:17 -04:00
main.go Moved fleetctl to fleetctl package. (#28932) 2025-05-07 15:53:35 -05:00