The ExApp AppConfig API is similar to the standard Nextcloud appconfig API.
Note
Since Nextcloud 32, sensitive config values are encrypted in the database.
Set or update ExApp config value.
Note
when sensitive is not specified during updating value, it will be not changed to default.
OCS endpoint: POST /apps/app_api/api/v1/ex-app/config
{
"configKey": "key",
"configValue": "value"
"sensitive": "sensitive flag affecting the visibility of the value (0/1, default: 0)"
}On success, ExAppConfig object is returned. On error, OCS Bad Request is returned.
{
"ocs":
{
"meta":
{
"status":"ok",
"statuscode":100,
"message":"OK",
"totalitems":"",
"itemsperpage":""
},
"data":
{
"id":1084,
"appid":"app_id",
"configkey":"key",
"configvalue":"value",
"sensitive":1
}
}
}Get ExApp config values
OCS endpoint: POST /apps/app_api/api/v1/ex-app/config/get-values
{
"configKeys": ["key1", "key2", "key3"]
}List of ExApp config values are returned.
{
"ocs":
{
"meta":
{
"status":"ok",
"statuscode":100,
"message":"OK",
"totalitems":"",
"itemsperpage":""
},
"data":[
{
"configkey":"test_key",
"configvalue":"123"
}
]
}
}Delete ExApp config values.
OCS endpoint: DELETE /apps/app_api/api/v1/ex-app/config
{
"configKeys": ["key1", "key2", "key3"]
}Returns the number of configuration values removed.
{
"ocs":
{
"meta":
{
"status":"ok",
"statuscode":100,
"message":"OK",
"totalitems":"",
"itemsperpage":""
},
"data":1
}
}