Example 1. Update global function config
This example alters the source and eventing storage keyspaces.
curl request
curl -X POST "http://$ADMIN:$PASSWORD@$HOST:8096/api/v1/functions/my_function/config" \
-d '{
"source_bucket": "bulk",
"source_scope": "orders",
"source_collection": "customer01",
"metadata_bucket": "rr100",
"metadata_scope": "eventing",
"metadata_collection": "metadata"
}'Example 2. Update scoped function config
This example alters the source and eventing storage keyspaces.
curl request
curl -X POST "http://$USER:$PASSWORD@$HOST:8096/api/v1/functions/my_function/config?bucket=bulk&scope=data"\
-d '{
"source_bucket": "bulk",
"source_scope": "orders",
"source_collection": "customer01",
"metadata_bucket": "rr100",
"metadata_scope": "eventing",
"metadata_collection": "metadata"
}'Example 3. Update global function config from file
This example alters the source and eventing storage keyspaces from a file.
curl request
curl -X POST "http://$ADMIN:$PASSWORD@$HOST:8096/api/v1/functions/my_function/config" \
-d @./my_function.jsonExample 4. Update scoped function config from file
This example alters the source and eventing storage keyspaces from a file.
curl request
curl -X POST "http://$USER:$PASSWORD@$HOST:8096/api/v1/functions/my_function/config?bucket=bulk&scope=data" \
-d @./my_function.json