Adding custom API modules to your AskiaField installation
Note: This feature is new in version 5.4.3.
The modules window allows you to manage the custom API modules that have been added to your CCA installation. By adding a module to your askiafield installation, you can control which users have access to it by setting appropriate restrictions.
Note: you can only manage API modules within AskiaField if your user account has the access privileges to do so. This is controlled in the
management tab of the
restrictions window.
Opening the modules window
To open the modules window, click extra in the ribbon, then click modules. The modules window appears as follows:
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8xMTAwLzI1NTYvY2tmaW5kZXIvaW1hZ2VzL2ltYWdlKDExNCkucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzY1MzEyODEwfX19XX0_&Signature=nX9BjxH9FssUKuDEvQtiFUFBs7Sh~Pd9~ILRQUrl0W1mnV0xmbvRiFTMNHUGzrrAcRoEf2M6YblyPeq0~AkwnleP0XNKC0s-UpX3IbkRnK4sWAW7IWqq8t~v67kWITsvc8kXX5STKKHWnCcZ~iV0WPqX1VnvXUHDka9rR0bTKKKUyp7PrxlQz5gJjIHfLvwCpHWpCC0VCrcPc8TA97Ee9kxxFwp5BNTntXN1Qmc~Gvz045iHsau8GMok5gZv7~hMyJG1VQxe1j1UMT9E33h28Cnjf5zEaz-cktSuRUvFAXXR5lNXCSt-4zqRxRYuVpYx~xJlmVSjiAeCmpaLffSDgw__&Key-Pair-Id=K2TK3EG287XSFC)
All modules in this window appear in the modules tab of the restrictions window, allowing you to control which users have access to them.
About custom API modules
It is possible to create your own custom API modules to take advantage of the powerful features in the AskiaField API. One example is a browser-based module that allows a survey task to be created from a QEX file without logging in to Supervisor. The modules window allows you to add these custom modules to your AskiaField installation. You can then control who has access to these modules by setting user access restrictions on them in the modules tab of the restriction properties window, just as you can with the standard askiafield modules.
Warning: as well as setting up appropriate restrictions for your module within AskiaField, you must also set up appropriate security measures in the code for your custom module. This includes requiring a user name and password to access the module, and allowing access only to users who have access rights granted in their AskiaField restrictions pattern. See the
Knowledge Base section on AskiaField API for information on developing your own module.
Commands
There are three commands available:
- Add: Allows you to add a new module. The module properties window opens, allowing you to specify the properties for the new module.
- Delete: Deletes the selected module.
- Exit: Closes the window.
You can double-click a module to edit its properties in the module properties window.
Context (right-click) menu commands
The following commands are available in the context menu:
- New: Allows you to add a new module to your AskiaField installation. The module properties window opens, allowing you to specify the properties for the new module.
- Delete: Removes the selected module from your AskiaField installation.
- Properties: opens the properties for the selected module in the module properties window, allowing you to edit them. Alternatively, you can simply double-click an API in the list to open its properties.
Module properties window
The module properties window allows you to specify properties for a new or existing module.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8xMTAwLzI1NTYvY2tmaW5kZXIvaW1hZ2VzL2ltYWdlKDExNikucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzY1MzEyODEwfX19XX0_&Signature=Le~igrYKUvJZD1dxHC9TfxYlZ~oiS-3rZGHzSan0enyf0E~UkqM5F4w9qJmoE0zvKTeQ0V5vkP7-VQfb1-rKRrtQeJw70hbYzNlzWdEiBhujF43uB~YtKwcVN-PHy53aMU3u~JtLK8vVRZ4lE0rXq31THwlACQXxgD1W8l3GhFGnEm-puMCf2TQ9jOBk6-OBDvUWD0~tb6kYNPOx9BT1FdD~1QzDwFlRimrvPz7Kl8caIxDz3IsbyD3eBrsvx763HAf7OS5L6ht75dJ8QaLR~wncv7jgQnZGeYuGdjI1ga2sz5IIU9HnXG95iAblirUzu0-ZLYV5Y2hhomx7w2Tskw__&Key-Pair-Id=K2TK3EG287XSFC)
The available fields are as follows:
- Module ID: This is a unique number assigned automatically by AskiaField, used internally to identify the module, and cannot be changed.
- Module name: Specify a unique name for the module.
- Module description: Enter a brief description of the module, so that it is clear what the purpose of the module is.
- Allow multiple sessions per user: Select this if you want users to be able to run the module multiple times simultaneously.
- Allow use or permanent authentication tokens: Select this if you want to fine-tune access control to the API module, by generating an authentication token.