add CRUD for EULA (#11274)
https://github.com/fleetdm/fleet/issues/10741
This commit is contained in:
@@ -78,6 +78,7 @@ GitOps is an API-only and write-only role that can be used on CI/CD pipelines.
|
||||
| View results of MDM commands executed on macOS hosts enrolled in Fleet's MDM | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Edit [MDM settings](https://fleetdm.com/docs/using-fleet/mdm-macos-settings) | | | | ✅ | ✅ |
|
||||
| Edit [MDM settings for teams](https://fleetdm.com/docs/using-fleet/mdm-macos-settings) | | | | ✅ | ✅ |
|
||||
| Upload an EULA file for MDM automatic enrollment\* | | | | ✅ | |
|
||||
| View/download MDM macOS setup assistant\* | | | ✅ | ✅ | |
|
||||
| Edit/upload MDM macOS setup assistant\* | | | ✅ | ✅ | |
|
||||
|
||||
|
||||
@@ -3572,6 +3572,11 @@ These API endpoints are used to automate MDM features in Fleet. Read more about
|
||||
- [Get metadata about a bootstrap package](#get-metadata-about-a-bootstrap-package)
|
||||
- [Delete a bootstrap package](#delete-a-bootstrap-package)
|
||||
- [Download a bootstrap package](#download-a-bootstrap-package)
|
||||
- [Get a summary of bootstrap package status](#get-a-summary-of-bootstrap-package-status)
|
||||
- [Upload an EULA file](#upload-an-eula-file)
|
||||
- [Get metadata about an EULA file](#get-metadata-about-an-eula-file)
|
||||
- [Delete an EULA file](#delete-an-eula-file)
|
||||
- [Download an EULA file](#download-an-eula-file)
|
||||
|
||||
### Add custom macOS setting (configuration profile)
|
||||
|
||||
@@ -4288,6 +4293,125 @@ The summary can optionally be filtered by team id.
|
||||
}
|
||||
```
|
||||
|
||||
### Upload an EULA file
|
||||
|
||||
_Available in Fleet Premium_
|
||||
|
||||
Upload an EULA that will be shown during the DEP flow.
|
||||
|
||||
`POST /api/v1/fleet/mdm/apple/setup/eula`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | In | Description |
|
||||
| ---- | ---- | ---- | ------------------------------------------------- |
|
||||
| eula | file | form | **Required**. A PDF document containing the EULA. |
|
||||
|
||||
#### Example
|
||||
|
||||
`POST /api/v1/fleet/mdm/apple/setup/eula`
|
||||
|
||||
##### Request headers
|
||||
|
||||
```
|
||||
Content-Length: 850
|
||||
Content-Type: multipart/form-data; boundary=------------------------f02md47480und42y
|
||||
```
|
||||
|
||||
##### Request body
|
||||
|
||||
```
|
||||
--------------------------f02md47480und42y
|
||||
Content-Disposition: form-data; name="eula"; filename="eula.pdf"
|
||||
Content-Type: application/octet-stream
|
||||
<BINARY_DATA>
|
||||
--------------------------f02md47480und42y--
|
||||
```
|
||||
|
||||
##### Default response
|
||||
|
||||
`Status: 200`
|
||||
|
||||
### Get metadata about an EULA file
|
||||
|
||||
_Available in Fleet Premium_
|
||||
|
||||
Get information about the EULA file that was uploaded to Fleet. If no EULA was previously uploaded, this endpoint returns a `404` status code.
|
||||
|
||||
`GET /api/v1/fleet/mdm/apple/setup/eula/metadata`
|
||||
|
||||
#### Example
|
||||
|
||||
`GET /api/v1/fleet/mdm/apple/setup/eula/metadata`
|
||||
|
||||
##### Default response
|
||||
|
||||
`Status: 200`
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "eula.pdf",
|
||||
"token": "AA598E2A-7952-46E3-B89D-526D45F7E233",
|
||||
"created_at": "2023-04-20T13:02:05Z"
|
||||
}
|
||||
```
|
||||
|
||||
In the response above:
|
||||
|
||||
- `token` is the value you can use to [download an EULA](#download-an-eula-file)
|
||||
|
||||
### Delete an EULA file
|
||||
|
||||
_Available in Fleet Premium_
|
||||
|
||||
Delete an EULA file.
|
||||
|
||||
`DELETE /api/v1/fleet/mdm/apple/setup/eula/{token}`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | In | Description |
|
||||
| ----- | ------ | ----- | ---------------------------------------- |
|
||||
| token | string | path | **Required** The token of the EULA file. |
|
||||
|
||||
#### Example
|
||||
|
||||
`DELETE /api/v1/fleet/mdm/apple/setup/eula/AA598E2A-7952-46E3-B89D-526D45F7E233`
|
||||
|
||||
##### Default response
|
||||
|
||||
`Status: 200`
|
||||
|
||||
### Download an EULA file
|
||||
|
||||
_Available in Fleet Premium_
|
||||
|
||||
Download an EULA file
|
||||
|
||||
`GET /api/v1/fleet/mdm/apple/setup/eula/{token}`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | In | Description |
|
||||
| ----- | ------ | ----- | ---------------------------------------- |
|
||||
| token | string | path | **Required** The token of the EULA file. |
|
||||
|
||||
#### Example
|
||||
|
||||
`GET /api/v1/fleet/mdm/apple/setup/eula/AA598E2A-7952-46E3-B89D-526D45F7E233`
|
||||
|
||||
##### Default response
|
||||
|
||||
`Status: 200`
|
||||
|
||||
```
|
||||
Status: 200
|
||||
Content-Type: application/pdf
|
||||
Content-Disposition: attachment
|
||||
Content-Length: <length>
|
||||
Body: <blob>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Policies
|
||||
|
||||
Reference in New Issue
Block a user