config_option_update
Added in version 2.4.
Allows to modify some CKAN runtime-editable config options
It takes arbitrary key, value pairs and checks the keys against the config options update schema. If some of the provided keys are not present in the schema a ValidationError is raised. The values are then validated against the schema, and if validation is passed, for each key, value config option:
- It is stored on the
system_infodatabase table - The Pylons
configobject is updated. - The
app_globals(g) object is updated (this only happens for options explicitly defined in theapp_globalsmodule.
Note
You can see all available runtime-editable configuration options calling the
config_option_list() action.Note
Extensions can modify which configuration options are runtime-editable. For details, check Making configuration options runtime-editable.
Warning
You should only add config options that you are comfortable they can be edited during runtime, such as ones you've added in your own extension, or have reviewed the use of in core CKAN.
Authorization
apiTokenHeader Authorization<token>
CKAN API token
In: header
Request Body
application/json
key?string
a configuration option key (e.g. ckan.site_title). It must be present on the update_configuration_schema
curl -X PUT "http://localhost:5000/api/3/action/config_option_update" \ -H "Content-Type: application/json" \ -d '{}'