A newer version of this documentation is available.

View Latest

Functions REST API

The Functions REST API, available by default at port 8096, provides the methods available to work with Couchbase Functions.
The Functions REST API is a Beta feature intended for development purposes only, do not use them in production; no Enterprise Support is provided for Beta features.
Table 1. Functions API
HTTP Method URI Path Description

POST

/api/v1/functions/[function_name]

Create a single Function. The Function name in the body must match that on the URL. Function definition includes current settings.

POST

/api/v1/functions/

Creates multiple Functions. Function names must be unique. When multiple Functions have the same name, an error is reported.

GET

/api/v1/functions

View a list of Functions. Provides a list of Functions available in the cluster. The list includes both the deployed and the undeployed Functions.

DELETE

/api/v1/functions/[function_name]

Deletes a specific Functions from the cluster.

DELETE

/api/v1/functions

Deletes multiple Functions from the cluster.

POST

/api/v1/functions/[function_name]/settings

Edit Function settings. During an edit, settings provided are merged. Unspecified attributes retain their prior values.

POST

/api/v1/config

Modify global configuration. During an edit, settings provided are merged. Unspecified attributes retain their prior values. The response indicates whether the Eventing service must be restarted for the new changes to take effect.

POST

/api/v1/functions/[function_name]/settings

Deploys a Function. A deploy CURL example is provided for reference.

Sample API:

curl -XPOST -d '{"deployment_status":true,"processing_status":true}'
http://Administrator@192.168.1.5:8096/api/v1/functions/[sample_name]/settings

POST

/api/v1/functions/[function_name]/settings

Undeploys a Function. An undeploy CURL example is provided for reference.

Sample API:

curl -XPOST -d '{"deployment_status":false,"processing_status":false}'
http://Administrator@192.168.1.5:8096/api/v1/functions/[sample_name]/settings

POST

/api/v1/functions/[function_name]/settings

Deploys a Function with the provided code.