Maximize Digital Display Control with MAWi REST API Integration

Integrate Seamlessly: Enhancing Control with the MAWi REST API


Introduction



The MAWi REST API is designed to extend your control over digital displays by enabling seamless integration with third-party systems. This powerful interface allows for enhanced interaction, offering more dynamic and efficient control over your network of screens. Whether you aim to improve operational workflows, enhance user experiences, or boost system interoperability, the MAWi REST API provides the essential tools to connect and manage your digital signage effortlessly. Discover how integrating with the MAWi REST API can elevate your control capabilities and transform the way you interact with your display network.


How to use the MAWi REST API


To make use of the MAWi API, first, ensure the MAWi Server application is installed on a desktop machine.
Once the server is up and running, you will be able to access and utilize the MAWi API.

To view the API endpoints, simply go to the following URL:

http://{server IP}:60668/swagger

or

https://{server IP}:44338/swagger  (for SSL)


Upon navigating to this link, you will be presented with the API console:





How to use API keys


To access, authenticate, and authorize your communication with the MAWi API, you must use one of two types of authorization:

1. Bearer token authorization

2. API Key authorization


1. How to obtain a Bearer token from MAWi

To access the MAWi API, you'll need a token. Obtain this by sending a POST request to the "apiToken" endpoint.

 

POST http://{serverIP}:{serverport}/apiToken?username={username}&password={password}&grant_type=password

 In the body of the POST request, you should include the following information:

string username
string password – the user’s password or API key
grant_type=password

Upon successful submission, you will receive the token information in the response.

{

"access_token""2GfzeehHgll7LwDukTYkGbbIGrX2ZRm73UIMeAXjfXCz1ipB3WVekTpcos0r13Z6dhgvOD6RhxIT9Czl-kS2B3qgCpW9eMoW8950obgkh4HoDAjQgC3VnLgy-Wnjd3ZUvAeRkr_Aql077PZ6DLUJgyz5wP5G_IyIDL5Vigg3_CBE44V5jx0Do1wuOsI7qU-lWwCpAy9piJC7njLAHu0qETywIn1fOqnCPSG5S8n1laich-xKWmP-RAWDobmsCS0FF_RgxpaAd2DLXo0zyNUZU6h1xPMe6vonmxvN26M7yp1Va-ztt_AN5P1ER8e2xUD9N2RdKAw6AwEV1v8mUm7LTEXUrbwkuoILfKSoOBG8i68aSvKSmC63j8fEwbdYoB_TywzNuck4UZ5OB6fG7m6u4Rzuer1hnXEY0fsFP8NuNSc"
,

    "token_type""bearer"
,

    "expires_in"604799
,

    "roles""Administrator,Editor"
,

    "UserId""61e82729-e327-42fb-bb9c-5f39913bcc51"
,

    ".issued""Wed, 27 Mar 2024 20:24:17 GMT"
,

    ".expires""Wed, 03 Apr 2024 20:24:17 GMT"

}


Ensure you save the received access_token on your machine, as it will be necessary for subsequent MAWi Server requests that require authorization.

You can use it then in Bearer Authorization:




2. How to use API Key authorization

In MAWi, when using API Key authorization, the key-value pair is added to the Header. The key is "Authorization" and the value is "monitorsanywhere {userName}:{password}".

Alternatively, instead of the password, you can use the user's generated API key.




How to retrieve a user's API Key from MAWi

To obtain a user’s API Key from MAWi, you typically need to follow these steps:

1. Access the MAWi management console by logging in with your user credentials.

2. Once logged in, go to the Admin panel > View all users.

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’.




5. Once the API key is visible, copy it securely. Make sure to keep this information secure as it provides authentication to the API.




How to authorize user with 2FA enabled

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.


Here’s how you can make the request:

POST http://{serverIP}:{serverport}/apiToken?username={username}&password={password}&grant_type=password&code_digit={TOTP_code}


Include the following details in the body of your POST request:

- `string username`: The username for the account.

- `string password`: This can be the user’s password or their API key.

- `grant_type=password`: This parameter should be set as 'password'.

- `string code_digit`: The time-based one-time password (TOTP) code generated by the authentication application.

 

This setup will authenticate the user and provide a Bearer token for subsequent requests that require authorization.

 

Upon successful submission, you will receive the token information in the response.

{

"access_token""2GfzeehHgll7LwDukTYkGbbIGrX2ZRm73UIMeAXjfXCz1ipB3WVekTpcos0r13Z6dhgvOD6RhxIT9Czl-kS2B3qgCpW9eMoW8950obgkh4HoDAjQgC3VnLgy-Wnjd3ZUvAeRkr_Aql077PZ6DLUJgyz5wP5G_IyIDL5Vigg3_CBE44V5jx0Do1wuOsI7qU-lWwCpAy9piJC7njLAHu0qETywIn1fOqnCPSG5S8n1laich-xKWmP-RAWDobmsCS0FF_RgxpaAd2DLXo0zyNUZU6h1xPMe6vonmxvN26M7yp1Va-ztt_AN5P1ER8e2xUD9N2RdKAw6AwEV1v8mUm7LTEXUrbwkuoILfKSoOBG8i68aSvKSmC63j8fEwbdYoB_TywzNuck4UZ5OB6fG7m6u4Rzuer1hnXEY0fsFP8NuNSc"
,

    "token_type""bearer"
,

    "expires_in"604799
,

    "roles""Administrator,Editor"
,

    "UserId""61e82729-e327-42fb-bb9c-5f39913bcc51"
,

    ".issued""Wed, 27 Mar 2024 20:24:17 GMT"
,

    ".expires""Wed, 03 Apr 2024 20:24:17 GMT"

}

 

Ensure you save the received access_token on your machine, as it will be necessary for subsequent MAWi Server requests that require authorization.

 


Start using the REST API

 

Retrieve a list of devices currently connected to the server


To obtain a list of all Android devices associated with the logged-in user, initiate a GET request to the endpoint:

http://{server IP}:{server port}/api/Machine

 

This request necessitates Bearer Authorization, where the `access token` obtained from the “token” endpoint must be included.

 

The response will provide information about the devices.


[

    {

        "PhysicalAddress""0A0027000017",

        "Title""Untitled",

        "Version""v 1.0.0.0",

        "UserId""e1e68c8c-3cc6-47a5-857c-78bb4d06943b",

        "HostName""DESKTOP-CQB6JSC",

        "IpAddress""192.168.0.109",

        "ShowPrimaryScreen"true,

        "IsAndroid"false,

        "RotationMode"0,

        "AndroidMode"0,

        "CategoryId"null,

        "SnapshotInterval"0,

        "Monitors": [

...

The "Title" refers to the LocationName specified in the Android connection request.

Creating a playlist

 

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:

 

 

 

Enter the server IP and port number into the designated fields and tap the "Assign" button. If the details are correctly entered, a 4-digit code will be displayed on your Android device.

 


 

 

 Connect Android device by 4-digit code

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.



    • Related Articles

    • How to use the Remote Control feature in MAWi

      Introduction In MAWi v2 we've added the the ability to remote control any of the connected screens within the system, via the browser-based management console of MAWi. How to use this feature In the main dashboard of MAWi, right-click on the screen's ...
    • How to activate MAWi license

      Introduction In this guide we will show you step by step how to activate the MAWi system Login to MAWi’s management console with an administrative user account. Once logged in, click on the Dashboard menu item and select “Admin panel” In case your ...
    • MAWi Spacewall - Quick Installation Guide - Utilizing Android-based MAWi Players

      MAWi Spacewall - Quick Installation Guide Introduction MAWi Spacewall is a tool for managing screen displays. Here's a simple breakdown: 1. Display unique content on individual screens. 2. Link several screens to show identical content. 3. Design ...
    • Installing spacedesk on an Android device and Connecting to the MAWi system

      Introduction This guide provides step-by-step instructions on how to install the spacedesk app on an Android device and connect it to the MAWi system. With the spacedesk application, you can transform your Android device into an AV over IP adapter, ...
    • How to use MAWi in a Command and Control rooms, SOCs, or NOCs

      How to set up a video wall for a Command center, a Control room, NOCs, or SOCs MAWi allow you to easily set up a video wall for command and control rooms. Start by setting up the video wall layout with the Displays Configuration tool within MAWi and ...