Skip to content

Latest commit

 

History

History
63 lines (55 loc) · 1.45 KB

File metadata and controls

63 lines (55 loc) · 1.45 KB

Example HTTP Requests

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.json
Example 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