GET /_active_tasks
This request retrieves a list of all tasks running on the server.
Request
Request headers
This request does not have any required headers.
Query parameters
This request does not use query parameters.
Message body
This request does not use a message body.
Response
Status codes
- 200 OK – Request completed successfully
- 401
- 502
Response headers
This response uses only standard HTTP headers.
Message body
The response message body contains a JSON document with an array of active tasks. If there are no active tasks, an empty array is returned in the response.
| Name | Type | Description |
|---|---|---|
continuous | Boolean | Indicates whether the task is for a continuous replication |
error | array | error information |
progress | integer | Percentage of task completed |
source | string | Name of source database |
status | string | Task status |
target | string | Name of target database |
task | string | Session identifier |
type | string | Type of task. The type is always Replication. |
x_active_requests | array | Active requests |
Example
The following request asks for the active tasks on the server. The 200 status code in the response header indicates the request is successful, but the empty array in the response body indicates there are no active tasks.
Request
GET /_active_tasks HTTP/1.1
Host: localhost:59840
Response
200 OK HTTP/1.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
Date: Wed, 16 Apr 2014 21:17:42 GMT
Server: CouchbaseLite 1.495
Transfer-Encoding: chunked
[ ]