In this section, we introduce APIs specifically used when creating your own plugins.
For a general introduction on plugins, and steps on building your plugins, visit this page.
Before we dive straight into the methods, you first need to understand how users set up and use plugins. Users are able to add Plugins to their apps through the apps settings, to provide it additional features. Users will be able to set up necessary settings in the settings of the plugin (which is inside the settings of the app), which will be ready for use once the settings are saved and changes are applied to the app.
The kintone Plugin Docs introduces several methods, mainly based around saving Plugin setting data, and retrieving those data.
This is used on the Plugin setting page, to save data that users input. This data can then be called using the getConfig() method.
Let's say you've built a plugin that controls the color of a specific field when it equals a particular value. That means in the Plugin settings, you'll want to have a text field for users to input the field's field code, and maybe a drop down to choose the color. Once users input the field info and color info, they'll click save - this is where you'll initiate the setConfig to save these values.
This is used to call the values that were saved into the settings of the Plugin with the setConfig() method.
This method is used to run 3rd party REST APIs, i.e. non-kintone REST APIs.
If you need to use values from the Plugin Settings page with the 3rd party APIs, you will need to save and get those data using the below two APIs, and not with the setConfig() and getConfig() methods. Note that this API is different from the kintone Proxy API.
Set Config for proxy()
This API is similar to the setConfig() method, as it saves user inputs on the Plugin Settings page.
The difference here is that values saved using this method, are to be used with the kintone Plugin Proxy API - meaning that values saved here are meant to be passed on to 3rd party REST API services. A common use case here would be to save user name and passwords, or API keys, that you would need for authentication purposes with other services.
Get Config for proxy()
This API is similar to the Get Config API, as it retrieves settings saved on the Plugin Settings page.
This API though only retrieves data saved with the setProxyConfig method. Use the getConfig() method if you need to retrieve Plugin Setting data that was saved with the setConfig() method.