Scripting module allows to write code in C# programming language. This allows to extend CredoID functionality adding new possibilities that wouldn't be available out of the box.
CredoID uses C# programming language and Monaco Editor for scripting.
The Monaco Editor is the code editor that powers VS Code.It is licensed under the MIT License and supports Edge, Chrome, Firefox, Safari and Opera. The Monaco editor is not supported in mobile browsers or mobile web frameworks.
CredoID Version 4.5.0 and up no longer supports scripts written in IronPython.
Click on "Add" to create new script.
Fill in necessary fields in the right side of details window.
This section contains source code of the script and editor with highlights.
▶ - Run the script.
◼ - Stop the script.
This section displays console output window.
Feel free to use our examples as base for improving or writing your own scripts. Written using C#. Source code can be found in our repository.
This script shows latest access event with user picture if it is available in a simple form.
Download Users_monitor.zip
To run the script, extract files and:
C:\\ProgramData\\Midpoint-Security\\CredoID Service\\Files\\Scripts\\*_script_name_*
.http://localhost:8000
.This script allows to manage parking space limits for companies using access levels.
Create a script and name it "parking". Open and copy content of script\script.cs into script content field, hit Save and Run.
Download web-ui/parking.zip and extract content under %ProgramData%/CredoID Service/Files/Scripts/parking/static
(directory should already exist if script was run before).
You should be able to access parking occupancy web interface via http://localhost:8090/scripting/parking/static/
To select occupancy access level and entry/exit readers - click settings icon in the top right corner.
This script allows to limit entry count incorporating schedules and doors. For example: users can enter specified doors at certain schedule only once per 24 hours until their access levels is reset.
Open and copy script code from AlsResetScript.cs
There are some lines that must be edited to set schedule range, access level names, door names and access level reset time.
Comments with explanations are left inside the code.