--- title: "REST API SERVER | API Server Calls | N3uron KB V.1.20" slug: "rest-api-server-calls" description: "REST API SERVER is a N3uron module designed to be used for exposing resources. REST calls can be used to retrieve datainformation or send control…" updated: 2021-12-10T11:53:20Z published: 2021-12-10T11:53:20Z canonical: "docs.n3uron.com/rest-api-server-calls" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.n3uron.com/llms.txt > Use this file to discover all available pages before exploring further. # N3uron REST API calls ## Alarm calls **N3uron** REST API alarm calls provide information about the status and monitoring of alarms, and provide operations that can be made on alarms. In order to execute the desired command, alarm calls should start with http://:/alarm or https://:/alarm, followed by '?' and the parameters (key-values). The character '&' should be used to separate each parameter. must be replaced by the server's IP address and and must be replaced by the port assigned to the **RestApiServer** (3003 by default for HTTP requests and 3443 by default for HTTPS requests). ### Alarm GET commands **get****:** retrieves a list of alarms in the target node. - **template:** ```markup https://:/alarm?cmd=get&path=&options.filter.path= ``` - **example:** ```markup https://127.0.0.1:3443/alarm?cmd=get&path=/SITE01/LINE01/MACHINE01/ALARMS/&options.filter.path=TEMPERATURE ``` - **parameters:** - **path:** path to browse for alarms. (Optional parameter) - **options:** - **recurrent:** include subgroups. (Optional parameter) - **filter:** filter parameters include : - **path:** full alarm path regex filter (Optional parameter) - **status:** status to filter, from 0 to 3 (0: Cleared and acked, 1: Active and acked 2: Cleared and unacked 3: Active and unacked). (Optional parameter) - **priority:** minimum priority (1: Low, 2: Medium, 3: High, 4: Critical). (Optional parameter) *A concrete example of this command can be found in the Examples section of the manual.* **count:** indicates the alarm count. - **template:** ```markup https://:/alarm?cmd=count ``` - **example:** ```markup https://127.0.0.1:3443/alarm?cmd=count&path=/SITE01/LINE01/MACHINE01/ALARMS/&options.recurrent=true ``` - **parameters:** - **path:** path to browse for alarms (optional parameter) - **options:** - **recurrent:** include subgroups. - **filter:** filter include parameters: - **path:** full alarm path regex filter (optional parameter) - **status:** status to filter, from 0 to 3 (0: Cleared and acked, 1: Active and acked 2: Cleared and unacked 3: Active and unacked) (optional parameter) - **priority:** minimum priority (1: Low, 2: Medium, 3: High, 4: Critical) (optional parameter) **history:** retrieves historical data of a specific alarm. - **template:** ```markup https://:/alarm?cmd=history&path=&start=&end= ``` - **example:** ```markup https://127.0.0.1:3443/alarm?cmd=history&path=SITE01/LINE04/MACHINE01/GEARING/COS021&start=2020-12-07T00:00Z&end=2021-07-07T00:00 ``` - **parameters:** - **path:** Alarm path (mandatory parameter) - **start:** Start date. Must be an ISO string or a Unix epoch timestamp (mandatory parameter) - **end:** End date. Must be an ISO string or a Unix epoch timestamp (mandatory parameter) - **options:** - **recurrent:** include subgroups. - **filter:** filter parameters include: - **path:** full alarm path regex filter (Optional parameter) - **status:** status to filter, from 0 to 3 (0: Cleared and acked, 1: Active and acked 2: Cleared and unacked 3: Active and unacked) (Optional parameter) - **priority:** minimum priority (1: Low, 2: Medium, 3: High, 4: Critical). (Optional parameter) *A concrete example of this command can be found in the Example section of the manual.* ### Alarm POST commands **ack:** Acknowledges alarms. - **template:** ```markup https://:/alarm?cmd=ack ``` - **body template:** ```markup { "paths": "" } ``` - **parameters:** - **paths:** Alarm paths. Can be a single alarm, a comma-separated list or a JSON array (Mandatory parameter) - **msg:** Message to append to this acknowledgement (Optional parameter) *A concrete example of this command can be found in the Examples section of the manual.* ## Backup calls **N3uron RestApiServer** backup calls provide information about the status of configuration backups, and provide operations that can be made on backups. In order to execute the desired command, backup calls should start with http://:/backup or https://:backup, followed by '?' and the parameters (key-values). The character '&' should be used to separate each parameter. must be replaced by the server's IP address and and must be replaced by the port assigned to the RestApiServer (3003 by default for HTTP requests and 3443 by default for HTTPS requests). ### Backup GET commands **get command:** retrieves a list of current configuration backups. - **template:** ```markup https://:/backup?cmd=get ``` **export command:** retrieves configuration backup in zip format encoded in Base64. - **template:** ```markup https://:/backup?cmd=export&name= ``` - **example:** ```markup https://127.0.0.1:3443/backup?cmd=export&name=20210504_RestApiServer_01 ``` - **parameter:** - **name:** name of the backup file (Mandatory parameter) *A concrete example of this command can be found in the Examples section of the manual.* ### ### Backup POST commands **create command:** creates a configuration backup of the target node. - **template:** ```markup https://:/backup?cmd=create ``` - **body template:** ```markup { "name": "" } ``` - **parameters:** - **path:** name of the backup file (Mandatory parameter) - **metadata:** - **description:** description of the backup file (Optional parameter) **rename command:** renames a configuration backup. - **template:** ```markup https://:/backup?cmd=rename ``` - **body template:** ```markup { "name": "", "rename": "" } ``` - **parameters:** - **name:** name of the backup file (Mandatory parameter) - **rename:** new name of the backup file (Mandatory parameter) **delete command:** deletes a configuration backup. - **template:** ```markup https://:/backup?cmd=delete ``` - **body template:** ```markup { "name": "" } ``` - **parameters:** - **name:** name of the backup file (Mandatory parameter) **import command:** imports a previously exported configuration backup encoded in Base64. - **template:** ```markup https://:/backup?cmd=import ``` - **body template (example):** ```markup { "name": "", "data": "UEsDBAoAAAAAAJhipFIAAAAAAAAAAAAAAAAKAAAASGlzdG9yaWFuL1BLAwQKAAgACACYYqRSAAAAAAAAAAAAAAAAEQAAAEhpc3Rvcmlhbi9hcGkubjNjTU5LCsIwEL3LrLNIKsbSnRdQcStdtOYJo2kjaVKEkrs7KgVX83nfhWbEicNIzUJDxzKNIjhOIcpaFEVM2SdqLnTbQc5L+yuQ1pM8vw3Xp3qOhlMz/X9CTqk1EXEhVxld3Yh6+g/I4juPwqlO493Ovvysx6+6Gsn9uiSKVu22pK0wexfJT3msR6MIck4L/uxwZe+OOSTWNtgqDyGufIxRdFkLN6T7ct4NNDAa+WPHcYJWr6NLuiNJ56QVzQZtPonqsZYADENaxyiqHDmyZsvjm+41eknLACxIUlCjkA4AuJtRlPsvBq2MI1zxPwYkTX6v8PhBX5uNcwmYRYqS9AlJw57b0L8Ikgo4FoQ7UdJSmd0lqZRxA/i7QWoB7Sbh05lXyydzIWbbJA0FaQW0n4BmP8/J2z2kOL6oSlQLwjrGKB6 … ipFIAAAAAAAAAAAAAAAAUAAAAYm9vdHN0cmFwL2xvZ2dlci5uM2N1T8sKwjAQ/Jc5B6FqW9ujH6AHj6WHtNlKJE0gTYsS8u9uQBAPsod9zs5MxEZ+0c6ijZil5lwIkNLBeS6TgKdlNQFth+vwoDFARIzOLs7Q75CsHAwptMGvJGBoI4MWwcuRkHqBSf+FdDg7figtREbz8Qfe4Ra8tncIaDs58EbJ15KZL+s8kIeo+8TxFR1Bz0BW8RFbcmrNrNiBvXCnJ501FmVzaqqm3FfH+pDSG1BLBwgaUmq1rQAAAAcBAABQSwMECgAIAAgAmGKkUgAAAAAAAAAAAAAAABUAAABib290c3RyYXAvbW9kdWxlcy5uM2PVU8FKQzEQ/Jc9B8nTWqE39aKXCj7Eg/SQZ7aogIjEuMi4xLTIwMDQwMS4yMjA4IiwKICAgICJGbGVldE1hbmFnZXJDbGllbnQiOiAiMS4wLjAtMjEwNDE2LjExMDItYmV0YSIKICB9Cn0=" } } ``` - **parameters:** - **name:** name of the backup file (Mandatory parameter) - **data:** backup file data, encoded in Base64 (Mandatory parameter) **load command:** applies a configuration backup to the current node. - **template:** ```markup https://:/backup?cmd=load ``` - **body template:** ```markup { "name": "" } ``` - **parameters:** - **name:** name of the backup file (Mandatory parameter) ## Module calls **N3uron RestAPIServer** module calls provide information about the status and monitoring of each module and operations that can be made on modules. In order to execute the desired command, module calls should start with http://:/module or https://:/module, followed by '?' and the parameters (key values). The character '&' should be used to separate each parameter. must be replaced by the server's IP address and and must be replaced by the port assigned to the RestApiServer (3003 by default for HTTP requests and 3443 by default for HTTPS requests). ### Module GET commands **details command:** retrieves full details of instanced modules. - **template:** ```markup https://:/module?cmd=details ``` **getInstalled command:** retrieves the list of installed modules. - **template:** ```markup https://:/module?cmd=getInstalled ``` - **parameters:** - **filter:** Module names. Can be a single filter, a comma-separated list or a JSON array (Optional parameter) **getInstances command:** retrieves a list of instanced modules in the target node. - **template:** ```markup https://:/module?cmd=getInstances ``` - **parameters:** - **filter:** Module names. Can be a single filter, a comma-separated list or a JSON array (Optional parameter) **getConfigList command:** retrieves a list of configuration files for every type of module. - **template:** ```markup https://:/module?cmd=getConfigList&moduleType= ``` - **example:** ```markup https://127.0.0.1:3443/module?cmd=getConfigList&moduleType=SiemensClient ``` - **parameters:** - **moduleType:** module type (Optional parameter) **getConfigPresent command:** indicates whether or not the configuration files for a specific module instance exist. - **template:** ```markup https://:/module?cmd=getConfigPresent&moduleName= ``` - **example:** ```markup https://127.0.0.1:3443/module?cmd=getConfigPresent&moduleName=Siemens ``` - **parameters:** - **moduleName:** module instance name (Optional parameter) **getConfigData command:** retrieves configuration file content for a specific module instance - **template:** ```markup https://:/module?cmd=getConfigData&moduleName=&configName= ``` - **example:** ```markup https://127.0.0.1:3443/module?cmd=getConfigData&moduleName=Siemens&configName=logger ``` - **parameters:** - **moduleName:** module instance name (Optional parameter) - **configName****:** configuration name (Mandatory parameter) ### Module POST commands **start command:** starts a specific module. - **template:** ```markup https://:/module?cmd=start ``` - **body template:** ```markup { "moduleName": "" } ``` - **parameters:** - **moduleName:** module instance name (Mandatory parameter) **stop command:** stops a module. - **template:** ```markup https://:/module?cmd=stop ``` - **body template:** ```markup { "moduleName": "" } ``` - **parameters:** - **moduleName:** module instance name (Mandatory parameter) **restart command:** restarts a module. - **template:** ```markup https://:/module?cmd=restart ``` - **body template:** ```markup { "moduleName": "" } ``` - **parameters:** - **moduleName:** module instance name (Mandatory parameter) **setConfigData command:** sets a configuration file for a specific module instance. - **template:** ```markup http://:/module?cmd=setConfigData ``` - **body template:** ```markup { "moduleName": "", "configName":"", "data":"" } ``` - **example:** ```markup http://{{IP_address}}:{{HTTP_port}}/module?cmd=setConfigData ``` ```markup { "moduleName": "ModuleTest", "configName":"logger", "data":"{\"version\":{\"main\":1,\"editor\":1},\"result\":[\"Object\",{\"console\":[\"Object\",{\"enabled\":true,\"level\":\"trace\"}],\"file\":[\"Object\",{\"enabled\":[\"Boolean\",true],\"level\":[\"String\",\"info\"],\"days\":[\"Number\",7]}]}],\"editor\":{\"extends\":{\"module\":null},\"modified\":1582974868907}}" } ``` - **parameters:** - moduleName: module instance name (Mandatory parameter) - configName: configuration name (for example: logger, API, users, tags, views, links, etc.) (Mandatory parameter) - data: configuration file in JSON format (Mandatory parameter) - options: - restart: restart module after saving new configuration (Optional parameter) - deleteData: only applicable to module configuration file. List of deleted module instances to clean their data. Can be a single instance, a comma-separated list or a JSON array (Optional parameter). ## Link calls **N3uron RestApiServer** link calls provide operations and information about the status of the links in the target node. In order to execute the desired command, link calls should start with http://:/link or https://:/link, followed by '?' and the parameters (key values), using '&' to separate each parameter. must be replaced by the server's IP address and and must be replaced by the port assigned to the RestApiServer (3003 by default for HTTP requests and 3443 by default for HTTPS requests). ### Links GET commands **get command:** retrieves current links. - **template:** ```markup https://:/link?cmd=get ``` **certGet command:** retrieves a list of link certificates. - **template:** ```markup https://:/link?cmd=certGet&mode=outbound ``` - **parameters:** - **mode:** gets “inbound” or “outbound” certificates list (Mandatory parameter) **certExport command:** downloads a specific link certificate. - **template:** ```markup https://:/link?cmd=certExport&mode=outbound&id=o/ ``` - **example:** ```markup https://127.0.0.1:3443/link?cmd=certExport&mode=outbound&id=own/restapiserver-01__N3uron__LinkOut ``` - **parameters:** - **mode:** gets “inbound” or “outbound” certificates list (Mandatory parameter) - **id:** the unique path of the certificate, with format “/” (Mandatory parameter) ### Links POST commands **certSet command:** trusts, rejects or removes a specific link certificate. - **template:** ```markup http://:/link?cmd=certSet ``` - **body template** ```markup { "mode": "", "id": "/", "action": "" } ``` - **parameters:** - **mode:** gets “inbound” or “outbound” certificates list (Mandatory parameter) - **id:** the unique path of the certificate, with format “/” (Mandatory parameter) - **action:** the action to apply to the link, can be: trust, reject, clear or remove *A concrete example of this command can be found in the Examples section of the manual.* ## License calls **N3uron RestAPIServer** link calls provide operations and information about the status of licenses in the target node. In order to execute the desired command, license calls should start with http://:/license or https://:/license, followed by '?' and the parameters (key values), using '&' to separate each parameter. must be replaced by the server's IP address and and must be replaced by the port assigned to the RestApiServer (3003 by default for HTTP requests and 3443 by default for HTTPS requests). ### License GET commands **getUid command:** retrieves current node UID. - **template:** ```markup https://:/license?cmd=getUid ``` **get command:** retrieves a list of licenses of this node. - **template:** ```markup https://:/license?cmd=get ``` **read command:** retrieves details of a specific license. - **template:** ```markup https://:/license?cmd=read&name= ``` - **example:** ```markup https://127.0.0.1:3443/license?cmd=read&name=DataServer01-20210216.143244.n3l ``` - **parameters:** - **name:** name of the license file (Mandatory parameter) ### License POST commands **add command:** adds a license to the target node. - **template:** ```markup https://:/license?cmd=add ``` - **body template:** ```markup { "data": "{\"version\":\"1\",\"created\":\"2021-01-05T14:43:16.652Z\",\"signature\":\"5ce1ff1b7a9f911b49f653aa291bd375d8b2c53a0d57b0958ffe5f2341d",\"count\":1},{\"type\":\"SiemensClient\",\"tagAccess\":\"local\",\"count\":1},{\"type\":\"SmaClient\",\"tagAccess\":\"local\",\"count\ ... ":1},{\"type\":\"SqlClient\",\"tagAccess\":\"remote\",\"count\":1},{\"type\":\"UflExporter\",\"tagAccess\":\"remote\",\"count\":1},{\"type\":\"WebVision\",\"tagAccess\":\"remote\",\"count\":1},{\"type\":\"XantrexClient\",\"tagAccess\":\"local\",\"count\":1}]}]}" } ``` - **parameters:** - **data:** Data of the license file in JSON format (Mandatory parameter) **remove command:** deletes a license in the target node. - **template:** ```markup https://:/license?cmd=remove ``` - **body template:** ```markup { "name": "" } ``` - **parameters:** - **name:** name of the license file (Mandatory parameter) ## System calls **N3uron RestApiServer** system calls provide operations and information about the status and monitoring of the target node. In order to execute the desired command, system calls should start with http://:/system or https://:/system, followed by '?' and the parameters (key values). The character '&' should be used to separate each parameter. must be replaced by the server's IP address and and must be replaced by the port assigned to the RestApiServer (3003 by default for HTTP requests and 3443 by default for HTTPS requests). ### System GET commands **status command:** retrieves a list of alarms in the target node. - **template:** ```markup https://:/system?cmd=status ``` **errorcount command:** indicates the alarm count. - **template:** ```markup https://:/system?cmd=errorCount ``` ### System POST commands **restartService command:** restarts service. - **template:** ```markup https://:/system?cmd=restartService ``` ## Tag calls **N3uron RestApiServer** tag calls provide write operations and information about the status and monitoring of tags in the target node. In order to execute the desired command, tag calls should start with http://:/tag or https://:/tag, followed by '?' and the parameters (key values). The character '&' should be used to separate each parameter. must be replaced by the server's IP address and and must be replaced by the port assigned to the RestApiServer (3003 by default for HTTP requests and 3443 by default for HTTPS requests). ### Tags GET commands **browse command:** retrieves a list of tags present in the defined path. - **template:** ```markup https://:/tag?cmd=browse&path= ``` - **example:** ```markup https://127.0.0.1:3443/tag?cmd=browse&path=/SITE01/LINE01/MACHINE01/ ``` - **parameters:** - **path:** path to browse for tags (Optional parameter) - **options:** - **filter:** full tag path regex (Optional parameter) - **flat:** receive an array instead of an object (Optional parameter) - **recurrent:** include subgroups (Optional parameter) - **hideTags:** do not receive tags (Optional parameter) - **hideGroups****:** do not receive groups (Optional parameter) **read command:** retrieves values of tags present in the defined path. - **template:** ```markup https://:/tag?cmd=read&path= ``` - **example:** ```markup https://127.0.0.1:3443/tag?cmd=read&path=/SITE01/LINE01/MACHINE01/* ``` - **parameters:** - **path:** path to read tag (Optional parameter) - **options:** - **filter:** path to read tags. Entire groups can read using a wildcard * (Optional parameter) - **recurrent:** include subgroups (Optional parameter) *A concrete example of this command can be found in the Examples section of the manual.* **details command:** retrieves full details of tags present in the defined path. - **template:** ```markup https://:/tag?cmd=details&path= ``` - **example:** ```markup https://127.0.0.1:3443/tag?cmd=details&path=/SITE01/LINE01/MACHINE01/* ``` - **parameters:** - **path:** path to read tag (Mandatory parameter) - **options:** - **filter:** path to read tags. Entire groups can read using a wildcard * (Optional parameter) - **recurrent:** include subgroups (Optional parameter) **history command:** retrieves historical data of a specific tag. - **template:** ```markup https://:/tag?cmd=history&path=&start=&end= ``` - **example:** ```markup https://127.0.0.1:3443/tag?cmd=history&path=/SITE01/LINE01/MACHINE01/AMPLITUDE&start=1619707394591&end=2021-04-29T15:10:51.174Z ``` - **parameters:** - **path:** Tag path. (Mandatory parameter) - **start:** Start date. Must be an ISO string or a Unix epoch timestamp (Mandatory parameter) - **end:** End date. Must be an ISO string or a Unix epoch timestamp (Mandatory parameter) - **options:** - **mode:** Historical data modes. Can be raw, filter, delta or aggregated. default setting: delta (Optional parameter) - **method:** Aggregation method when using aggregated mode. Can be first, last, min, max. and avg. Set to an empty value to get default method in the tag configuration (Optional parameter) - **interval:** Aggregation interval when using aggregated mode, in milliseconds (Optional parameter) - **deadband****:** deadband when using filter or delta mode (Optional parameter) *A concrete example of this command can be found in the Example section of the manual.* **historyMany command:** retrieves historical data of tags. - **template:** ```markup https://:/tag?cmd=historyMany&paths=&start=&end= ``` - **example:** ```markup https://{{IP_address}}:{{HTTPS_port}}/tag?cmd=historyMany&paths=/SITE01/LINE01/MACHINE01/AMPLITUDE,/SITE01/LINE01/MACHINE01/COS_1DAY_PLC&start=1619707394591&end=2021-09-29T15:10:51.174Z ``` - **parameters:** - **paths:** Tag path list. Can be a single tag, a comma-separated list or a JSON array (Mandatory parameter) - **start:** Start date. Must be an ISO string or a Unix epoch timestamp (Mandatory parameter) - **end:** End date. Must be an ISO string or a Unix epoch timestamp (Mandatory parameter) - **options:** - **mode:** Historical data modes. Can be raw, filter, delta or aggregated. default setting: delta (Optional parameter) - **method:** Aggregation method when using aggregated mode. Can be first, last, min, max and avg. Set to an empty value to get default method in the tag configuration (Optional parameter) - **interval:** Aggregation interval when using aggregated mode, in milliseconds (Optional parameter) - **deadband:** Deadband when using filter or delta mode (Optional parameter) **historyFilter command:** retrieves historical data of tags (with regex filter). - **template:** ```markup https://:/tag?cmd=historyFilter&path=&start=&end=&options.filter= ``` - **example:** ```markup https://127.0.0.1:3443/tag?cmd=historyFilter&path=/SITE01/LINE01/MACHINE01&start=1619707394591&end=2021-04-29T15:10:51.174Z&options.filter=AMPLITUDE ``` - **parameters:** - **paths:** Tag path list. Can be a single tag, a comma-separated list or a JSON array (Mandatory parameter) - **start:** Start date. Must be an ISO string or a Unix epoch timestamp (Mandatory parameter) - **end:** End date. Must be an ISO string or a Unix epoch timestamp (Mandatory parameter) - **options:** - **filter:** Full tag path Regex filter (Optional parameter) - **recurrent:** Include subgroups (Optional parameter) - **mode:** Historical data modes. Can be raw, filter, delta or aggregated. default setting: delta (Optional parameter) - **method****:** Aggregation method when using aggregated mode. Can be first, last, min, max and avg. Set to an empty value to get default method in the tag configuration (Optional parameter) - **interval:** Aggregation interval when using aggregated mode, in milliseconds (Optional parameter) - **deadband:** deadband when using filter or delta mode (Optional parameter) **views command:** retrieves tag views. - **template:** ```markup https://:/tag?cmd=getViews ``` ### Tags POST commands **write command:** writes a specific tag value. - **template:** ```markup https://:/tag?cmd=write ``` - **body template:** ```markup { "path": "", "value": } ``` - **parameters** - **path:** Tag path (Mandatory parameter) - **value:** Value to write. The type must be the same as the configuration (number, Boolean or string) (Mandatory parameter) *A concrete example of this command can be found in the Examples section of the manual.*