Revoke a browser preview grant
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/preview-urls/{grant_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)curl --request DELETE \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/preview-urls/{grant_id} \
--header 'Authorization: Bearer <token>'{
"success": true,
"grant": {
"id": "<string>",
"machine_id": "<string>",
"port": 123,
"token_kinds": [],
"principal_kind": "user",
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"use_count": 123,
"http_request_count": 123,
"websocket_connection_count": 123,
"bytes_in_count": 123,
"bytes_out_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"principal_id": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"first_used_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"last_error_code": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"disabled_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Missing or invalid bearer credential",
"code": "unauthorized",
"request_id": "req_123"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}Machines
Revoke a browser preview grant
Revokes the durable preview grant and disables its HTTP and WebSocket preview tokens.
DELETE
/
v1
/
machines
/
{id}
/
preview-urls
/
{grant_id}
Revoke a browser preview grant
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/preview-urls/{grant_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)curl --request DELETE \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/preview-urls/{grant_id} \
--header 'Authorization: Bearer <token>'{
"success": true,
"grant": {
"id": "<string>",
"machine_id": "<string>",
"port": 123,
"token_kinds": [],
"principal_kind": "user",
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"use_count": 123,
"http_request_count": 123,
"websocket_connection_count": 123,
"bytes_in_count": 123,
"bytes_out_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"principal_id": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"first_used_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"last_error_code": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"disabled_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Missing or invalid bearer credential",
"code": "unauthorized",
"request_id": "req_123"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}Authorizations
API key passed as Bearer token
Path Parameters
Machine ID (e.g. mch_a1b2c3d4)
Durable preview grant ID.
Pattern:
^pvg_[0-9a-f]{32}$⌘I