Add API docs for /setup endpoint (#7281)

This commit is contained in:
Luke Heath
2022-08-18 13:58:39 -05:00
committed by GitHub
parent c785b7b6e2
commit ba86865231
+65
View File
@@ -34,6 +34,7 @@ Unlike the [Fleet REST API documentation](../Using-Fleet/REST-API.md), only the
- [Get device's transparency URL](#get-devices-transparency-url)
- [Check if an installer exists](#check-if-an-installer-exists)
- [Download an installer](#download-an-installer)
- [Setup Fleet instance](#setup-fleet-instance)
### Get queries spec
@@ -1774,5 +1775,69 @@ If an installer with the provided parameters is found.
If an installer with the provided parameters doesn't exist.
### Setup Fleet instance
Sets up a new Fleet instance with the given parameters.
`POST /api/_version_/setup`
#### Parameters
| Name | Type | In | Description |
| ------------- | ------- | ---------------------- | ------------------------------------------------------------------ |
| admin | object | body | **Required.** Contains the following admin user details: `admin`, `email`, `name`, `password`, and `password_confirmation`. |
| org_info | object | body | **Required.** Contains the following organizational details: `org_name`. |
| server_url | string | body | **Required.** The URL of the Fleet instance. |
##### Request body
```json
{
"admin": {
"admin": true,
"email": "janedoe@example.com",
"name": "Jane Doe",
"password": "password!234",
"password_confirmation": "password!234"
},
"org_info": {
"org_name": "Fleet Device Management"
},
"server_url": "https://localhost:8080"
}
```
##### Default response
`Status: 200`
If the Fleet instance is provided required parameters to complete setup.
```json
{
"admin": {
"created_at": "2021-01-07T19:40:04Z",
"updated_at": "2021-01-07T19:40:04Z",
"id": 1,
"name": "Jane Doe",
"email": "janedoe@example.com",
"force_password_reset": false,
"gravatar_url": "",
"sso_enabled": false,
"global_role": "admin",
"api_only": false,
"teams": []
},
"org_info": {
"org_name": "Fleet Device Management",
"org_logo_url": "https://fleetdm.com/logo.png"
},
"server_url": "https://localhost:8080",
"osquery_enroll_secret": null,
"token": "ur4RWGBeiNmNzer/dnGzgUQ+jxrJe19xuHg/LhLkbhuZMQu35scyBHUHs68+RJxZynxQnuTz4WTHXayAJJaGgg=="
}
```
<meta name="pageOrderInSection" value="800">