Everything in the Windows Device Portal is built on top of REST API’s that you can use to access the data and control your device programmatically.
/api/app/packagemanager/package (DELETE)
Uninstalls an app.
Parameters
/api/app/packagemanager/package (POST)
Installs an App.
Parameters
Payload
/api/app/packagemanager/packages (GET)
Retrieves the list of installed apps on the system. Includes details.
Return data
/api/app/packagemanager/state (GET)
Gets the status of in-progress app installation.
/api/debug/dump/usermode/crashcontrol (DELETE)
Disables crash dump collection for a sideloaded app.
Parameters
/api/debug/dump/usermode/crashcontrol (GET)
Gets settings for sideloaded apps crash dump collection.
Parameters
/api/debug/dump/usermode/crashcontrol (POST)
Enables and sets dump control settings for a sideloaded app.
Parameters
/api/debug/dump/usermode/crashdump (DELETE)
Deletes a crash dump for a sideloaded app.
Parameters
/api/debug/dump/usermode/crashdump (GET)
Retrieves a crash dump for a sideloaded app.
Parameters
Return data
/api/debug/dump/usermode/dumps (GET)
Returns list of all crash dumps for sideloaded apps.
Return data
/api/etw/providers (GET)
Enumerates registered providers.
Return data
/api/etw/session/realtime (GET/WebSocket)
Creates a real-time ETW session; managed over a websocket.
Return data
/api/holographic/os/etw/customproviders (GET)
Returns a list of HoloLens-specific ETW providers that aren’t registered with the system.
/api/holographic/os/services (GET)
Returns the states of all services running.
/api/holographic/os/settings/ipd (GET)
Gets the stored IPD (Interpupillary distance) in millimeters.
/api/holographic/os/settings/ipd (POST)
Sets the IPD.
Parameters
/api/holographic/os/webmanagement/settings/https (GET)
Gets HTTPS requirements for the Device Portal.
/api/holographic/os/webmanagement/settings/https (POST)
Sets HTTPS requirements for the Device Portal.
Parameters
/api/holographic/perception/client (GET/WebSocket)
Accepts WebSocket upgrades and runs a perception client that sends updates at 30 fps.
Parameters
When using these thermal APIs, reference the managing power and thermals article.
/api/holographic/thermal/stage (GET)
Get the thermal stage of the device (0 normal, 1 warm, 2 critical).
/api/holographic/thermal/getMitigationLevels (GET/websocket)
Open a websocket (or do a single HTTP GET query), returning a list of objects containing the following:
Objects are named by peripheral name (Example: Battery)
/api/holographic/thermal/setMitigationLevel (POST)
Change the mitigation level being reported for a given peripheral
Parameters
/api/holographic/thermal/setThermalScore (POST)
Change the thermal score being reported for a given peripheral
Parameters
/api/holographic/mapmanager/mapFiles (GET)
Gets the list of the available map files (.mapx).
/api/holographic/mapmanager/anchorFiles (GET)
Gets the list of available anchor files (.ancx).
/api/holographic/mapmanager/srdbFiles (GET)
Gets the list of available spatial reconstruction database files (.srdb).
/api/holographic/mapmanager/getanchors (GET)
Gets the list of persisted anchors for the current user.
/api/holographic/mapmanager/download (GET)
Downloads a map, anchor, or spatial reconstruction database file. The file must’ve been previously uploaded or exported.
Parameters
Example:
$.post("/api/holographic/mapmanager/download?FileName=" + spaceID)
/api/holographic/mapmanager/upload (POST)
Uploads a map, anchor, or spatial reconstruction database file. Once a file is uploaded, it can later be imported and used by the system.
Parameters
Example:
var form_data = new FormData();
form_data.append("file", file_data);
$.ajax({
url: "/api/holographic/mapmanager/upload",
dataType: 'json',
cache: false,
contentType: false,
processData: false,
data: form_data,
type: 'post'
})
/api/holographic/mapmanager/delete (POST)
Deletes a map, anchor, or spatial reconstruction database file. The file must’ve been previously uploaded or exported.
Parameters
Example:
$.post("/api/holographic/mapmanager/delete?FileName=" + spaceID)
/api/holographic/mapmanager/export (POST)
Exports the map currently in use by the system. Once exported, it can be downloaded.
Example:
$.post("/api/holographic/mapmanager/export")
/api/holographic/mapmanager/exportanchors (POST)
Exports the map currently in use by the system. Once exported, it can be downloaded. Example:
$.post("/api/holographic/mapmanager/exportanchors")
/api/holographic/mapmanager/exportmapandanchors (POST)
Exports the map and anchors currently in use by the system. Once exported, they can be downloaded. Example:
$.post("/api/holographic/mapmanager/exportmapandanchors")
/api/holographic/mapmanager/exportmapandspatialmappingdb (POST)
Exports the map and spatial reconstruction database currently in use by the system. Once exported, they can be downloaded.
Example:
$.post("/api/holographic/mapmanager/exportmapandspatialmappingdb")
/api/holographic/mapmanager/import (POST)
Indicates to the system which map should be used. Can be called on files that have been exported or uploaded.
Parameters
Example:
$.post("/api/holographic/mapmanager/import?FileName=" + spaceID, function() { alert("Import was successful!"); })
/api/holographic/mapmanager/importanchors (POST)
Indicates to the system which anchors should be used. Can be called on files that have been exported or uploaded.
Parameters
Example:
$.post("/api/holographic/mapmanager/import?FileName=" + spaceID, function() { alert("Import was successful!"); })
/api/holographic/mapmanager/importspatialmappingdb (POST)
Indicates to the system which spatial reconstruction database should be used. Can be called on files that have been exported or uploaded.
Parameters
Example:
$.post("/api/holographic/mapmanager/import?FileName=" + spaceID, function() { alert("Import was successful!"); })
/api/holographic/mapmanager/resetmapandanchorsandsrdb (POST)
Reset the system the map, anchors and spatial reconstruction database.
Example:
$.post("/api/holographic/mapmanager/resetmapandanchorsandsrdb")
/api/holographic/mapmanager/status (GET)
Gets the status of the system, including which map, anchors, and spatial reconstruction database files were last imported.
/api/holographic/mrc/file (GET)
Downloads a mixed reality file from the device. Use the op=stream query parameter for streaming.
Parameters
/api/holographic/mrc/file (DELETE)
Deletes a mixed reality recording from the device.
Parameters
/api/holographic/mrc/files (GET)
Returns the list of mixed reality files stored on the device.
/api/holographic/mrc/photo (POST)
Takes a mixed reality photo and creates a file on the device.
Parameters
/api/holographic/mrc/settings (GET)
Gets the default mixed reality capture settings.
/api/holographic/mrc/settings (POST)
Sets the default mixed reality capture settings. Some of these settings are applied to the system’s MRC photo and video capture.
/api/holographic/mrc/status (GET)
Gets the state of mixed reality capture within the Windows Device Portal.
Response
The response contains a JSON property that indicates if Windows Device Portal is recording video or not.
{"IsRecording": boolean}
/api/holographic/mrc/thumbnail (GET)
Gets the thumbnail image for the specified file.
Parameters
/api/holographic/mrc/video/control/start (POST)
Starts a mixed reality recording.
Parameters
/api/holographic/mrc/video/control/stop (POST)
Stops the current mixed reality recording.
[!CAUTION] Because of loopback isolation, you can’t connect to mixed reality streaming from inside an app on a device.
HoloLens supports live preview of mixed reality via chunked download of a fragmented mp4.
Mixed reality streams share the same set of parameters to control what’s captured:
If none of these are specified, then holograms, photo/video camera, and app audio will be captured.
If any are specified, the unspecified parameters will default to false
Optional parameters (HoloLens 2 only)
/api/holographic/stream/live.mp4 (GET)
A 1280x720p 30fps 5Mbit stream.
/api/holographic/stream/live_high.mp4 (GET)
A 1280x720p 30fps 5Mbit stream.
/api/holographic/stream/live_med.mp4 (GET)
A 854x480p 30fps 2.5Mbit stream.
/api/holographic/stream/live_low.mp4 (GET)
A 428x240p 15fps 0.6Mbit stream.
/api/networking/ipconfig (GET)
Gets the current IP configuration.
/api/os/info (GET)
Gets operating system information.
/api/os/machinename (GET)
Gets the machine name.
/api/os/machinename (POST)
Sets the machine name.
Parameters
/api/holographic/simulation/control/mode (GET)
Gets the simulation mode.
/api/holographic/simulation/control/mode (POST)
Sets the simulation mode.
Parameters
/api/holographic/simulation/control/stream (DELETE)
Delete a control stream.
/api/holographic/simulation/control/stream (GET/WebSocket)
Open a WebSocket connection for a control stream.
/api/holographic/simulation/control/stream (POST)
Create a control stream (priority is required) or post data to a created stream (streamId required). Posted data is expected to be of type ‘application/octet-stream’.
/api/holographic/simulation/display/stream (GET/WebSocket)
Request a simulation video stream containing the content rendered to the system display when in ‘Simulation’ mode. A simple format descriptor header will be sent initially, followed by H.264-encoded textures, with each preceded by a header indicating the eye index and texture size.
/api/holographic/simulation/playback/file (DELETE)
Delete a recording.
Parameters
/api/holographic/simulation/playback/file (POST)
Upload a recording.
/api/holographic/simulation/playback/files (GET)
Get all recordings.
/api/holographic/simulation/playback/session (GET)
Get the current playback state of a recording.
Parameters
/api/holographic/simulation/playback/session/file (DELETE)
Unload a recording.
Parameters
/api/holographic/simulation/playback/session/file (POST)
Load a recording.
Parameters
/api/holographic/simulation/playback/session/files (GET)
Get all loaded recordings.
/api/holographic/simulation/playback/session/pause (POST)
Pause a recording.
Parameters
/api/holographic/simulation/playback/session/play (POST)
Play a recording.
Parameters
/api/holographic/simulation/playback/session/stop (POST)
Stop a recording.
Parameters
/api/holographic/simulation/playback/session/types (GET)
Get the types of data in a loaded recording.
Parameters
/api/holographic/simulation/recording/start (POST)
Start a recording. Only a single recording can be active at once. One of these must be set: head, hands, spatialMapping or environment.
Parameters
/api/holographic/simulation/recording/status (GET)
Get recording state.
/api/holographic/simulation/recording/stop (GET)
Stop the current recording. Recording will be returned as a file.
/api/resourcemanager/processes (GET)
Returns the list of running processes with details.
Return data
/api/resourcemanager/systemperf (GET)
Returns system perf statistics (I/O read/write, memory stats, etc.
Return data
/api/power/battery (GET)
Gets the current battery state.
/api/power/state (GET)
Checks if the system is in a low power state.
/api/control/restart (POST)
Restarts the target device.
/api/control/shutdown (POST)
Shuts down the target device.
/api/taskmanager/app (DELETE)
Stops a modern app.
Parameters
/api/taskmanager/app (POST)
Starts a modern app
Parameters
/api/wifi/interfaces (GET)
Enumerates wireless network interfaces.
Return data
/api/wifi/network (DELETE)
Deletes a profile associated with a network on a specified interface.
Parameters
/api/wifi/networks (GET)
Enumerates wireless networks on the specified network interface.
Parameters
Return data
/api/wifi/network (POST)
Connects or disconnects to a network on the specified interface.
Parameters
/api/wpr/customtrace (POST)
Uploads a WPR profile and starts tracing using the uploaded profile.
Payload
Return data
/api/wpr/status (GET)
Retrieves the status of the WPR session
Return data
/api/wpr/trace (GET)
Stops a WPR (performance) tracing session.
Return data
/api/wpr/trace (POST)
Starts a WPR (performance) tracing session.
Parameters
Return data