Using API to sign certificate using template

Hi, I am trying to sign a certificate via API.


sign my-template ca="domain.com" name="name@domain.com"

How can I do this via API, I can’t seem to get it to work. I get an error message from the router:

unknown parameter

API expects an attribute name and value.

https://wiki.mikrotik.com/wiki/Manual:API#Attribute_word


Attribute word structure consists of 5 parts in this order:

  • encoded length
  • content prefix equals sigh - =
  • attribute name
  • separating equals sign - =
  • value of attribute if there is one. It is possible that attribute does not have a value

Try rephrasing the CLI command to API words, using the default parameter name ‘number’:

sign **number=**my-template ca=“domain.com” name=“name@domain.com

The default parameter is displayed in bold in CLI autocompletion list.

This seems to work…

'.id'  => 'my-template',