Assigning Services
By means of the REST API, services can be assigned to a new, single-node cluster.
Curl Syntax
curl -X POST http://<ip-address-or-domain-name>:8091/node/controller/setupServices \ -d services=<list-of-service-names> -u <username>:password
The list-of-service-names
must consist of one or more of the following: kv
(Data Service), n1ql
(Query Service), index
(Index Service), fts
(Search Service), eventing
(Eventing Service), cbas
(Analytics Service), backup
(Backup Service).
Each name must be separated from the following name with a comma.
Each service is allocated a default amount of memory, unless custom allocations have been made. See Configuring Memory for information on allocating memory per service, and on the default minimum values per service.
Note that during the process of provisioning a single-node cluster, username
and password
are required after the administrator has established credentials, as described in Establishing Credentials.
Responses
Success returns 200 OK
.
If a username and password have already been assigned, failure to authenticate returns 401 Unauthorized
.
An incorrectly expressed URI returns 404 Object Not Found
.
An incorrect expression of the flag returns 400 Bad Request
, and an error message such as the following: {"errors":{"services":"The value must be supplied"}}
.
An incorrectly expressed service-name returns 400 Bad Request
, and an error message such as the following: {"errors":{"services":"Unknown services: [\"eve3nting\"]"}}
.
Example
The following example establishes data paths for the Data, Index, and Eventing Services. Commas in the list of service-names have been encoded.
curl -X POST http://10.144.220.101:8091/node/controller/setupServices \ -d 'services=kv%2Cn1ql%2Cindex%2Ceventing' \ -u Administrator:password
See Also
The sequence of tasks divided into initialization and provisioning is explained in Cluster Initialization and Provisioning.
For each of the other specific steps required in the provisioning process, see Configuring Memory, Naming a Node, Naming a Cluster, and Establishing Credentials. Specifically, see Configuring Memory for information on allocating memory per service, and on the default minimum values per service.
For further information on initialization and provisioning — using the UI, the CLI, and the REST API — see Manage Nodes and Clusters.