Up - API Reference - Home
Requires JWT
Add or update a key for a module. You can also set multiple keys at once.
If you provide both key and keys parameters, we use parameter matching to guess what you meant. The first action that matches the parameters is performed, the rest is ignored. Parameter matching happens in the order given below:
POST /api/p/<project gid>/modules/keys/set
Authorization: Bearer <JWT>
{
"module": "<module name>",
"key": "any.string.key",
"value": "<any value>",
}
or
POST /api/p/<project gid>/modules/keys/set
Authorization: Bearer <JWT>
{
"module": "<module name>",
"keys": {
"any.string.key": "<any value>",
"a.different.key": 123.45,
}
}
module name of the module to set the key for
key key to identify the value
value the value, must be a valid json value (not a string encoding of json data!)
keys a dictionary of key/value pairs
If you specify key, you must provide value.
If you specify keys, you shouldn't provide either key or value.
Authorization: <JWT>
{
"success": true,
"result": {
"module": "<module name>"
},
"data": {
"modules": {
"<module name>": {…}
}
}
}
module the name of the modified module.
modules Module info with name, version, keys, actions, and logs.
400 Bad request - missing parameters or wrong type or value
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - module not registered