Evict existing replicas by view Deprecated
This enpoint is deprecated, please use this one.
Queries the specified view and evicts the resulting list of replicas in specified provider.
This operation is asynchronous. Optional argument migration_provider_id
can be used to specify where the repliace has to be replicated before being
evicted from this provider.
This operation supports custom view query attributes as provided by Couchbase.
Additionally, Couchbase spatial queries are possible using the bbox query parameter.
These queries are possible on views which emit values conforming to the GeoJSON format.
This operation requires:
space_query_viewsandspace_schedule_evictionwhen scheduling evictionspace_query_views,space_schedule_evictionandspace_schedule_replicationwhen scheduling migration
Example cURL requests
Evicts 100 replicas (skipping the first 200) returned by view within specified space from specific provider
curl -X DELETE -H "X-Auth-Token: $TOKEN" -H 'Content-type: application/json' \
"https://$HOST/api/v3/oneprovider/replicas-view/$VIEW_NAME?space_id=$SPACE_ID&provider_id=$PROVIDER_ID&skip=200&limit=100"
{ "transferId": "b3c85b99-44db-4277-8c66-2ccd50888565" }
Path parameters
| Parameter | Type & Description |
|---|---|
| view_name required | string Name of the view. |
Query parameters
| Parameter | Type & Description |
|---|---|
| space_id required | string Space Id in which view exist. |
| provider_id | string The Id of the provider from which the replica will be evicted. By default the replicas will be evicted in the provider handling this REST call. |
| migration_provider_id | string The Id of the provider to which the replicas should be synchronized before being evicted. |
| descending | boolean Return the documents in descending order (by key). |
| key | string Return only documents that match the specified key. Key must be specified as a JSON value. |
| limit | integer Limit the number of the returned documents to the specified number. |
| skip | integer Skip this number of records before starting to return the results. |
| startkey | string Return records with a value equal to or greater than the specified key. Key must be specified as a JSON value. |
| startkey_docid | string Return records starting with the specified document Id. |
| endkey | string Stop returning records when the specified key is reached. Key must be specified as a JSON value. |
| endkey_docid | string Stop returning records when the specified document Id is reached. |
| inclusive_end | boolean Specifies whether the specified end key is included in the result. Note: Do not use |
| stale | string Allow records from a stale view to be used. Allowed values are |
| bbox | string Specify the bounding box for a spatial query (e.g. ?bbox=-180,-90,0,0) |
| spatial | boolean Enable spatial type of query. When querying the file-popularity view, the |
| start_range | string Array specifying the range in spatial queries (e.g. |
| end_range | string Array specifying the range in spatial queries (e.g. |
Request Examples
oneprovider-rest-cli evictReplicasByView space_id=$SPACE_ID view_name=$VIEW_NAME key=value1Responses
The replication request was accepted and the result is the transfer Id, which can be used for monitoring the transfer status.
| Property | Type & Description |
|---|---|
transferId string Transfer Id. | |
Invalid request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Forbidden request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}File not found.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Internal server error.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}