Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API design: Get unlock PIN immediately after locking macOS host #19671

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion docs/REST API/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4053,6 +4053,7 @@ To lock a macOS host, the host must have MDM turned on. To lock a Windows or Lin
| Name | Type | In | Description |
| ---------- | ----------------- | ---- | ----------------------------------------------------------------------------- |
| id | integer | path | **Required**. ID of the host to be locked. |
| view_pin | boolean | query | For macOS hosts, whether to return the unlock PIN. |

#### Example

Expand All @@ -4062,6 +4063,20 @@ To lock a macOS host, the host must have MDM turned on. To lock a Windows or Lin

`Status: 204`

#### Example

`POST /api/v1/fleet/hosts/123/lock?view_pin=true`

##### Default response (macOS hosts)

`Status: 200`

```json
{
"unlock_pin": "123456"
}
```

### Unlock host

_Available in Fleet Premium_
Expand Down Expand Up @@ -4097,7 +4112,6 @@ To unlock a Windows or Linux host, the host must have [scripts enabled](https://
}
```


### Wipe host

Sends a command to wipe the specified macOS, Windows, or Linux host. The host is wiped once it comes online.
Expand Down
Loading