Meshcentral: MeshSimpleAPI or equivalent

Created on 7 Jan 2019  路  2Comments  路  Source: Ylianst/MeshCentral

Hi, I'm looking at updating some software that embeds pieces of Meshcentral v1 today to work with v2 and potentially extending it. What it currently does is use the MeshSimpleAPI call "GetAllNodes" via SOAP to get a list of everything, and then display to the user a filtered list based on the powerstate of the node while removing nodes the user doesn't have access to see. Once a node is selected, a user can access the remote console. Our code is piggy-backing on MC v1's meshdesktop.js script to do that. The "users" in this scenario are managed outside of Meshcentral and we don't want to provide them direct access Meshcentral itself hence why this functionality was embedded in a very restricted way.

I can see in the Meshcentral 2 User Guide how to embed entire pieces of the MC user interface such a remote desktop viewer. That's nice and a lot cleaner than how our code is doing it today. I can't see any equivalent of the MeshSimpleAPI though browsing through the source, or any way of pre-filtering what resources a user could see. For example another feature we'd like to implement is to provide users access to files on their devices (and only their devices), but exclude certain paths so they can't break our custom software installed on the systems. We wouldn't want to just present them the UI for Meshcentral's server files tab as-is.

Really just wondering if I've missed a way to achieve this that currently exists even if it's completely different to the MeshSimpleAPI, or if you had any plans to implement something like this?

Most helpful comment

Hi,

Meshcentral 2 uses websocket JSON messaging.
You could look at how to write code to communicate with MC2:
https://github.com/jsastriawan/mc2router

If you look at https://github.com/Ylianst/MeshCentral/blob/master/public/scripts/meshcentral.js, the code itself is just to prepare Websocket pipe to MeshCentral control.ashx.
Regards,

Joko

All 2 comments

Hi,

Meshcentral 2 uses websocket JSON messaging.
You could look at how to write code to communicate with MC2:
https://github.com/jsastriawan/mc2router

If you look at https://github.com/Ylianst/MeshCentral/blob/master/public/scripts/meshcentral.js, the code itself is just to prepare Websocket pipe to MeshCentral control.ashx.
Regards,

Joko

Hi Joko, and many thanks for that. I see exactly what you mean. Your mc2router looks similar to the structure of our current Meshcentral v1 code, although with the obvious differences for MC2's architecture. I think that'll definitely set us on the right path. Thanks again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nroach44 picture nroach44  路  3Comments

Julien-asv picture Julien-asv  路  3Comments

haxmachine picture haxmachine  路  3Comments

guerby picture guerby  路  3Comments

penguinthingie picture penguinthingie  路  4Comments