https://{server IP}:44338/swagger (for
SSL)
In the body of the POST request, you should include the following information:
}
You can use it
then in Bearer Authorization:
Alternatively,
instead of the password, you can use the user's generated API key.
3. Edit the user account and
within the user
management area, go to ‘User API Tokens’ tab.
4. Click on the button ‘Create API Token’, name the token, and click ‘Create’.
Users with 2FA
(Two-Factor Authentication) enabled are required to use Bearer Token
authorization. To obtain a Bearer token, you need to make a POST request to the
"apiToken" endpoint.
POST
http://{serverIP}:{serverport}/apiToken?username={username}&password={password}&grant_type=password&code_digit={TOTP_code}
...
Upload a file
To create a playlist that includes files, you first need to upload the file using the POST endpoint: http://{server IP}:{server port}/api/File/UploadFile
Content-Type: multipart/form-data
Body: form-data
Request Body Parameters:
file : {
id: string;
fileIndex: number;
lastModifiedDate: Date;
name:
string;
size:
number;
type: string;
form: FormData;
progress:
UploadProgress;
response?:
any;
responseStatus?: number;
sub?: Subscription | any;
nativeFile?:
File;
responseHeaders?:
{
key: string]:
string;
};
}, //
uploading file
AudioFileDuration
(Optional): string, // ex. '00:00:15'
Response definitions:
id: string; //
unique id of uploaded file instance
title: string; // original name of the file
dateCreated: Date // date when file was uploaded
size: number; // size of the file in bytes
userId: string // id of the user that uploaded the
file
duration: string // file duration
Sample response:
{
"id": "08afe5c6-c5df-4f0e-91d3-a642b17abdf9",
"title": "wrench.svg",
"dateCreated": "0001-01-01T00:00:00",
"size": 3.4,
"userId": "910881ba-bb4e-ee1f115132a4-4f7d-b21b",
"duration": '00:00:15'
}
This action requires Bearer Authorization, for which you must use the access_token obtained from the “token” endpoint.
Creating a playlist
To create a playlist, initiate a POST request to the endpoint:
http://{server IP}:{server port}/api/Playlist
This action requires Bearer Authorization, for which you must use the access_token obtained from the “token” endpoint.
In the request body, you should include the necessary information for creating the playlist:
{
"PlaylistTitle": "string",
"PlaylistDescription": "string",
"IsRepeated": true,
"MachinePhysicalAddress": "string",
"IsShared": true,
"IsPortrait": true,
"IsAndroid": true,
"IsSharedWithAllUsers": true,
"PlaylistItems": [
{
"Id": 0,
"PlaylistId": 0,
"PlaylistItemType": 0,
"PlaylistItemTitle": "string",
"OpenInFullScreen": true,
"IsPortrait": true,
"Duration": "string",
"Position": 0,
"IsLocal": true,
"PlaylistFileName": "string",
"ExactVideoDuration": "string",
"PlaylistItemLinks": [
{
"Id": 0,
"PlaylistItemId": 0,
"Link": "string",
"IsFile": true,
"FileId": "string"
}
]
}
],
"UsersWhoHaveAccessIds": [
"string"
]
}
In the response, you will receive:
{
"Id": 0,
"PlaylistTitle": "string",
"PlaylistDescription": "string",
"IsRepeated": true,
"MachinePhysicalAddress": "string",
"DateCreated": "2024-03-28T17:21:31.467",
"IsShared": true,
"IsAndroid": true,
"IsSharedWithAllUsers": true,
"PlaylistItems": [
{
"Id": 0,
"PlaylistId": 0,
"PlaylistItemType": 1,
"PlaylistItemTitle": "string",
"OpenInFullScreen": true,
"SkipIfNoInternet": true,
"IncognitoMode": true,
"IsPortrait": true,
"IsMuted": true,
"LauncherId": 0,
"Duration": "string",
"CustomParameters": "string",
"Position": 0,
"LocalLauncher": "string",
"IsLocal": true,
"PlaylistFileName": "string",
"ExactVideoDuration": "string",
"PlaylistItemLinks": [
{
"Id": 0,
"PlaylistItemId": 0,
"Link": "string",
"IsFile": true,
"FileId": "string",
"File": {
"Id": "string",
"FileName": "string",
"IsActive": true,
"Title": "string",
"DateCreated": "2024-03-28T17:09:18.563",
"Size": 0.0,
"UserId": "string",
"Duration": "string"
}
}
]
}
],
"UsersWhoHaveAccess": []
}
Assigning
a playlist to a monitor
To assign a playlist, initiate a POST request to the endpoint:
http://{server IP}:{server port}/api/Monitor/Assign
This action requires Bearer Authorization, for which you need to include the `access_token` obtained from the “token” endpoint.
In the request body, you should provide the necessary details for assigning the playlist.
{
"MonitorKeys": [
{
"MachinePhysicalAddress": "string",
"MonitorHandler": "string"
}
],
"IdPlaylist": 0
}
Start
playing a playlist on a monitor
To initiate playback of the playlist on a monitor, you should send a POST request to the endpoint:
http://{server IP}:{server port}/api/Player/StartPlaylistOnMonitor
This request necessitates Bearer Authorization, where you need to use the `access_token` obtained earlier from the “token” endpoint.
In the body of the request, include the necessary information to start the playlist on the specified monitor.
{
"MachinePhysicalAddress": "string",
"MonitorHandler": "string",
"IdPlaylist": 0,
"ShouldWaitUntilAssigned": true
}
Start
playing assigned playlist on a monitor
To initiate the playback of an assigned playlist on a monitor, execute a POST request to the endpoint:
http://{server IP}:{server port}/api/Player/StartAssignedPlaylist
This operation requires Bearer Authorization, meaning you need to include the `access_token` that was previously acquired from the “token” endpoint.
Within the request body, you should provide the details necessary to start the assigned playlist on the monitor.
{
"MachinePhysicalAddress": "string",
"MonitorHandler": "string"
}
Start
playing assigned playlist on specific monitors
To commence playback of an assigned playlist across specific monitors, you need to issue a POST request to the endpoint:
http://{server IP}:{server port}/api/Player/StartAssignedPlaylistForAllMonitors
This request demands Bearer Authorization, which entails including the `access_token` previously obtained from the “token” endpoint.
In the request body, you should include the necessary details to start the assigned playlist on the specified monitors.
[
{
"MachinePhysicalAddress": "string",
"MonitorHandler": "string"
}
]
Stop a
playlist on a monitor
To halt the playback of a playlist on a monitor, initiate a POST request to the endpoint:
http://{server IP}:{server port}/api/Player/StopPlaylistOnMonitor
This action requires Bearer Authorization, so you'll need to include the `access_token` you obtained earlier from the “token” endpoint.
In the body of your request, ensure you provide the necessary details to stop the playlist on the designated monitor.
{
"MachinePhysicalAddress": "string",
"MonitorHandler": "string"
}
Stop
a playlist on specific monitors
To cease the playback of playlists on specific monitors, execute a POST request to the endpoint:
http://{server IP}:{server port}/api/Player/StopPlaylistOnAllMonitors
This procedure demands Bearer Authorization, necessitating the inclusion of the `access_token` previously secured from the “token” endpoint.
You should include in the body of your request the necessary details to stop the playlists on the specified monitors.
[
{
"MachinePhysicalAddress": "string",
"MonitorHandler": "string"
}
]
Presets
Get all presets
To retrieve all presets configured for a specific machine, you should issue a GET request to the endpoint:
http://{server IP}:{server port}/api/walls/presets/{machinePhysicalAddress}
This request necessitates Bearer Authorization, meaning you'll need to include the `access_token` that you acquired earlier from the “token” endpoint.
In the response you will receive:
[
{
"Id": "string",
"Title": "string",
"MachinePhysicalAddress": "string",
"Quality": 0,
"IsUpdated": true,
"ExtendedGroup": {
"Id": 1,
"PresetId": 1,
"MonitorGroupType": 1,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": null,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": null,
"Column": null,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": false,
"LockedCoordinates": null,
"ArtisticOwnSize": null,
"IsRotated": false,
"GroupId": 0,
"IdMappingValue": null,
"FunctionType": 0
}
]
},
"Walls": [
{
"Rows": 0,
"Columns": 0,
"IsAligned": true,
"BeselCorrectionWidth": 0,
"BeselCorrectionHeight": 0,
"Zoom": 0,
"IsSizeLocked": false,
"IsGridVisible": true,
"IsCalibrated": false,
"LockedArea": null,
"GroupId": 0,
"WallIndex": 0,
"Title": "string",
"ResolutionWidth": 0,
"ResolutionHeight": 0,
"Width": 0,
"Height": 0,
"WallAngle": 0,
"IsInit": null,
"Id": 0,
"PresetId": 0,
"MonitorGroupType": 0,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": null,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": null,
"Column": null,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": false,
"LockedCoordinates": null,
"ArtisticOwnSize": null,
"IsRotated": false,
"GroupId": 0,
"IdMappingValue": null,
"FunctionType": 0
}
]
}
],
"MirrorGroups": [
{
"GroupId": 0,
"WallIndex": 0,
"Title": "string",
"ResolutionWidth": 0,
"ResolutionHeight": 0,
"Width": 0,
"Height": 0,
"WallAngle": 0,
"IsInit": true,
"Id": 0,
"PresetId": 0,
"MonitorGroupType": 0,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": null,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": null,
"Column": null,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": false,
"LockedCoordinates": null,
"ArtisticOwnSize": null,
"IsRotated": false,
"GroupId": 0,
"IdMappingValue": null,
"FunctionType": 0
}
]
}
]
Get preset by Id
To obtain a specific preset by its ID, you should send a GET request to the endpoint:
http://{server IP}:{server port}/api/walls/presets/single/{presetId}
This action requires Bearer Authorization, for which you must use the `access_token` previously obtained from the “token” endpoint.
In the response, you will receive:
{
"Id": "string",
"Title": "string",
"MachinePhysicalAddress": "string",
"Quality": 0,
"IsUpdated": true,
"ExtendedGroup": {
"Id": 1,
"PresetId": 1,
"MonitorGroupType": 1,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": null,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": null,
"Column": null,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": false,
"LockedCoordinates": null,
"ArtisticOwnSize": null,
"IsRotated": false,
"GroupId": 0,
"IdMappingValue": null,
"FunctionType": 0
}
]
},
"Walls": [
{
"Rows": 0,
"Columns": 0,
"IsAligned": true,
"BeselCorrectionWidth": 0,
"BeselCorrectionHeight": 0,
"Zoom": 0,
"IsSizeLocked": false,
"IsGridVisible": true,
"IsCalibrated": false,
"LockedArea": null,
"GroupId": 0,
"WallIndex": 0,
"Title": "string",
"ResolutionWidth": 0,
"ResolutionHeight": 0,
"Width": 0,
"Height": 0,
"WallAngle": 0,
"IsInit": null,
"Id": 0,
"PresetId": 0,
"MonitorGroupType": 0,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": null,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": null,
"Column": null,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": false,
"LockedCoordinates": null,
"ArtisticOwnSize": null,
"IsRotated": false,
"GroupId": 0,
"IdMappingValue": null,
"FunctionType": 0
}
]
}
],
"MirrorGroups": [
{
"GroupId": 0,
"WallIndex": 0,
"Title": "string",
"ResolutionWidth": 0,
"ResolutionHeight": 0,
"Width": 0,
"Height": 0,
"WallAngle": 0,
"IsInit": true,
"Id": 0,
"PresetId": 0,
"MonitorGroupType": 0,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": null,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": null,
"Column": null,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": false,
"LockedCoordinates": null,
"ArtisticOwnSize": null,
"IsRotated": false,
"GroupId": 0,
"IdMappingValue": null,
"FunctionType": 0
}
]
}
Apply a preset
To apply a preset to a machine, initiate a POST request to the endpoint:
http://{server IP}:{server port}/api/walls/presets/apply/{machinePhysicalAddress}
This request necessitates Bearer Authorization, which means you need to include the `access_token` that you previously acquired from the “token” endpoint.
In the body of your request, make sure to include the necessary details to apply the preset to the specified machine.
[
{
"MachinePhysicalAddress": "string",
"Preset": {
"Id": "string",
"Title": "string",
"MachinePhysicalAddress": "string",
"Quality": 0,
"IsUpdated": true,
"ExtendedGroup": {
"Id": 0,
"PresetId": 0,
"MonitorGroupType": 1,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": 0,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": 0,
"Column": 0,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": true,
"LockedCoordinates": {
"MonitorHandler": "string",
"MonitorGroupId": 0,
"TopPoint": 0,
"LeftPoint": 0
},
"ArtisticOwnSize": {
"MonitorHandler": "string",
"MonitorGroupId": 0,
"TopPoint": 0,
"LeftPoint": 0
},
"IsRotated": true,
"GroupId": 0,
"IdMappingValue": "string",
"FunctionType": 0
}
]
},
"Walls": [
{
"Rows": 0,
"Columns": 0,
"IsAligned": true,
"BeselCorrectionWidth": 0,
"BeselCorrectionHeight": 0,
"Zoom": 0,
"IsSizeLocked": true,
"IsGridVisible": true,
"IsCalibrated": true,
"LockedArea": {
"WallId": 0,
"TopPoint": 0,
"LeftPoint": 0,
"RightPoint": 0,
"BottomPoint": 0
},
"GroupId": 0,
"WallIndex": 0,
"Title": "string",
"ResolutionWidth": 0,
"ResolutionHeight": 0,
"Width": 0,
"Height": 0,
"WallAngle": 0,
"IsInit": true,
"Id": 0,
"PresetId": 0,
"MonitorGroupType": 1,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": 0,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": 0,
"Column": 0,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": true,
"LockedCoordinates": {
"MonitorHandler": "string",
"MonitorGroupId": 0,
"TopPoint": 0,
"LeftPoint": 0
},
"ArtisticOwnSize": {
"MonitorHandler": "string",
"MonitorGroupId": 0,
"TopPoint": 0,
"LeftPoint": 0
},
"IsRotated": true,
"GroupId": 0,
"IdMappingValue": "string",
"FunctionType": 0
}
]
}
],
"MirrorGroups": [
{
"GroupId": 0,
"WallIndex": 0,
"Title": "string",
"ResolutionWidth": 0,
"ResolutionHeight": 0,
"Width": 0,
"Height": 0,
"WallAngle": 0,
"IsInit": true,
"Id": 0,
"PresetId": 0,
"MonitorGroupType": 1,
"Monitors": [
{
"MonitorHandler": "string",
"MonitorGroupId": 0,
"WallIndex": 0,
"DisplayText": "string",
"ClientIP": "string",
"ScreenName": "string",
"MonitorIndex": 0,
"Row": 0,
"Column": 0,
"Width": 0,
"Height": 0,
"LeftPosition": 0,
"TopPosition": 0,
"Angle": 0,
"CompressionQuality": 0,
"CompressionSubSampling": 0,
"Brightness": 0,
"Contrast": 0,
"IsActive": true,
"LockedCoordinates": {
"MonitorHandler": "string",
"MonitorGroupId": 0,
"TopPoint": 0,
"LeftPoint": 0
},
"ArtisticOwnSize": {
"MonitorHandler": "string",
"MonitorGroupId": 0,
"TopPoint": 0,
"LeftPoint": 0
},
"IsRotated": true,
"GroupId": 0,
"IdMappingValue": "string",
"FunctionType": 0
}
]
}
]
}
}
]
You can obtain information about a preset using the previously mentioned GET methods. Once you have the preset details, you can then use them in your request to apply a preset to a machine.
Refresh a preset
After assigning a preset, to refresh it, you should issue a GET request to the endpoint:
http://{server IP}:{server port}/api/walls/presets/refresh-preset/{machinePhysicalAddress}
This operation requires Bearer Authorization, so you'll need to include the `access_token` you obtained earlier from the “token” endpoint.
Spacedesk Only: remove device keys duplicates
To correct registry values after a preset has been assigned, you need to send a POST request to the endpoint:
http://{server IP}:{server port}/api/ADB/RemoveDeviceKeysDuplicates
This request requires Bearer Authorization, meaning the `access_token` obtained from the “token” endpoint must be included.
In the body of the request, you should include the necessary details to address the issue with registry values.
[
{
"MachinePhysicalAddress": "string",
"DeviceKeys": [ "string" ]
}
]
Device keys are a list of the monitor handlers.
Flow to
apply the preset
Apply preset -> Refresh preset -> Remove device keys duplicates
Install the MAWi Android application on your Android device. Upon launching the app on the device, you will be greeted with the following screen:
To connect your Android device, make a POST request to the endpoint:
http://{server IP}:{server port}/api/Client/ClientService/connect-android-device
In the request body, include:
string Code
string LocationName
int? CategoryId
- string Code: The 4-digit code you previously received after assigning the device to the server.
- string LocationName: The desired name for your device.
- int? CategoryId: The ID of the category to which you wish to assign the device.
This endpoint requires Bearer Authorization, where you must use the access token obtained from the “token” endpoint.
Disconnect Android device by physical address
To disconnect an Android device, initiate a POST request to the endpoint:
http://{server IP}:{server port}/api/Client/ClientService/disconnect
The request body should include:
Array[string] machineAddresses
This is an array containing the machine addresses to be disconnected.
This action requires Bearer Authorization, for which you must use the access_token obtained from the “token” endpoint.