Documentation for C-Werk 2.0.

Previous page Export  Switch between virtual IP-device states (HttpListener) Next page

On page:

Getting the list of macros

GET http://IP-Address:port/prefix/macro/list/

ParameterRequiredDescription
exclude_autoNo

Getting the list of macros without Automatic Rules

Sample request:

GET http://127.0.0.1:80/macro/list/?exclude_auto

Sample response:

{
   "macroCommands" : [
      {
         "id" : "04eb71b0-e2e0-445e-ae7a-a036951fb595",
         "name" : "MacroName1"
      },
      {
         "id" : "3fd3bfb0-3a6e-467a-8ff2-88f7b165cf5b",
         "name" : "MacroName2"
      },
      {
         "id" : "941f88d1-b512-4189-84a6-7d274892dd95",
         "name" : "MacroName3"
      }
   ]
}

Executing macro

GET http://IP-Address:port/prefix/macro/execute/{id}

{id} is an id form the list of macros. 

Possible error codes when executing macros:

Error codeDescription
400Incorrect request.
500Server internal error.
404

Incorrect id (only for execute macro).

  • No labels