├── .DS_Store ├── README.md ├── Sync-Gateway-3.0-Admin-API.postman_collection.json ├── Sync-Gateway-3.0-Environment.postman_environment.json ├── Sync-Gateway-3.0-Metrics-API.postman_collection.json ├── Sync-Gateway-3.0-Public-API.postman_collection.json └── travel-sample ├── Sync-Gateway-3.0-TravelSample-Admin-API.postman_collection.json ├── Sync-Gateway-3.0-TravelSample-Environment.postman_environment.json ├── Sync-Gateway-3.0-TravelSample-Metrics-API.postman_collection.json ├── Sync-Gateway-3.0-TravelSample-Public-API.postman_collection.json └── sync-gateway-config-travelsample-bootstrap.json /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbaselabs/Couchbase-Sync-Gateway-Postman-Collection/8a6d73f513d8a8407704e802f4e25ce0f86560cf/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | Couchbase Sync Gateway supports a [RESTful interface](https://docs.couchbase.com/sync-gateway/3.0/rest-api-access.html) that allows web based clients to administer, monitor and interact with the Sync Gateway. With the 3.0 release, Sync Gateway database admistration is handled exclusively via the admin REST endpoint. 4 | 5 | This repo contains [Postman](https://learning.postman.com/docs/getting-started/introduction/) Collections and environment variable definition file corresponding to **v3.0** of Sync Gateway REST Interface. Think of a Postman Collection as a group of saved requests, organized in folders and subfolders. You can use the collections as a starting point and customize it per your environment. Then, use the [Postman API client](https://www.postman.com/product/api-client/) to send reqests to the Sync Gateway and to inspect responses. Only RBAC users with the right roles and privileges can excute the requests. 6 | 7 | In addition, the repo also contains a `TravelSample` folder that contains a custom collection for a Travel Sample application. More details on that follow. 8 | 9 | ***Disclaimer***: The Postman collections in this repo are shared as a convenience for administrators and developers to get started with Sync Gateway. It is not officially supported by Couchbase and as such, there are no guarantees that the Collections will remain up-to-date with the evolution of the REST API. To that end, contributions to keep the collections up-to-date are welcome. 10 | 11 | # Compatibility 12 | The collection supports v3.0 of Sync Gateway REST interface. 13 | 14 | # Postman Collections 15 | 16 | ### Sync-Gateway-3.0-Admin-API.postman_collection.json 17 | 18 | [Sync-Gateway-3.0-Admin-API.postman_collection](https://raw.githubusercontent.com/couchbaselabs/Couchbase-Sync-Gateway-Postman-Collection/master/Sync-Gateway-3.0-Admin-API.postman_collection.json) corresponds to the [Sync Gateway Admin interface](https://docs.couchbase.com/sync-gateway/3.0/rest-api-admin.html) that includes database management and administration, defining access controls and end user management. 19 | 20 | 21 | ### Sync-Gateway-3.0-Public-API.postman_collection.json 22 | 23 | [Sync-Gateway-3.0-Public-API.postman_collection](https://raw.githubusercontent.com/couchbaselabs/Couchbase-Sync-Gateway-Postman-Collection/master/Sync-Gateway-3.0-Public-API.postman_collection.json) corresponds to the [Sync Gateway Public interface](https://docs.couchbase.com/sync-gateway/3.0/rest-api.html) that enables read/write access to application data. 24 | 25 | ### Sync-Gateway-3.0-Metrics-API.postman_collection.json 26 | 27 | [Sync-Gateway-3.0-Metrics-API.postman_collection](https://raw.githubusercontent.com/couchbaselabs/Couchbase-Sync-Gateway-Postman-Collection/master/Sync-Gateway-3.0-Metrics-API.postman_collection.json) corresponds to the [Sync Gateway Metrics interface](https://docs.couchbase.com/sync-gateway/3.0/rest-api.html) that enables access to cluster-level stats in Prometheus and custom JSON format. 28 | 29 | 30 | ## Sync-Gateway-3.0-Environment.postman_environment 31 | [Sync-Gateway-3.0-Environment.postman_environment](https://raw.githubusercontent.com/couchbaselabs/Couchbase-Sync-Gateway-Postman-Collection/master/Sync-Gateway-3.0-Environment.postman_environment.json) is the Environment Definitions file that defines the variables. The variables will have to be customized with values corresponding to your environment. 32 | 33 | ## Usage 34 | 35 | * Download [Postman client](https://www.getpostman.com/) for free for your platform. There is a Pro version as well if you want the added functionality. 36 | 37 | * Launch Postman API client and [import](https://learning.postman.com/docs/running-collections/working-with-data-files/) the collections and environment file 38 | 39 | * Update the environment file settings per your environment and start executing requests against your Sync Gateway 40 | 41 | # Demonstration using Travel Sample Postman Collections 42 | 43 | We have put together a custom version of the Postman collections corresponding to Travel Sample Application. These are located in the "travel-sample" folder of the repo. 44 | 45 | Some notable differences from the main collections - 46 | 47 | **Tests** 48 | Most of the requests in the collections include some simple tests to verify if the request was succesful or not. 49 | 50 | **Request Chaining** 51 | Collections also support request chaining - i.e. the output of a request can be used as input to a subsequent request. This is accomplished by dynamically updating the environment variables with the results of request execution without the need to manually edit the requests. 52 | 53 | So for instance, 54 | 55 | When you create a document, a new document revision is created and the revisionID of the newly created revision is returned in the response in the “_rev” field. The test associated with the request extracts the “_rev” value and sets the “rev” environment variable 56 | 57 | ## Pre-requisites 58 | 59 | * Download [Postman client](https://www.getpostman.com/) for free for your platform. There is a Pro version as well if you want the added functionality. 60 | 61 | * [Docker](https://docs.docker.com/get-docker/) must be installed on your laptop. On Windows, you may need admin privileges. Ensure that you have sufficient memory and cores allocated to docker. At Least 3GB of RAM is recommended. 62 | 63 | ## Collections 64 | 65 | * _Sync-Gateway-3.0-TravelSample-Admin-API.postman_collection.json_: Collection of requests to create Sync Gateway travel-sample database, to configure and to manage the database and to create Sync Gateway users. All requests in this collection have to be authenticated . 66 | 67 | * _Sync-Gateway-3.0-TravelSample-Public-API.postman_collection.json_: Collection of requests to create, update and access documents from travel-sample database. All requests in this collection have to be authenticated. 68 | 69 | * _Sync-Gateway-3.0-TravelSample-Metrics-API.postman_collection.json_: Collection of requests to create, update and access documents from travel-sample database. All requests in this collection have to be authenticated. 70 | 71 | ## Getting Started 72 | 73 | To be able to run the collection, you need an enviroment with Couchbase Server and Sync Gateway. Running it in docker containers is the simplest option. We have pre-built images that has everything configured and good to go. 74 | 75 | ### Docker Network 76 | 77 | * Create a docker network named “workshop” 78 | 79 | ```bash 80 | docker network ls 81 | 82 | docker network create -d bridge workshop 83 | ``` 84 | 85 | ### Install Couchbase Server 86 | 87 | We have a custom docker image`priyacouch/couchbase-server-travelsample:7.x-dev` of couchbase server. This image 88 | (a) Loads the travel-sample bucket 89 | (b) Configures three RBAC users - 90 | - "admin" user is the user credentials with which the Sync Gateway connects to Couchbase Server 91 | - "sgw-cluster" user which is used for cluster-level operations via the Sync Gateway admin/metrics REST endpoint 92 | - "sgw-admin" user which is used for sync gateway database-level administrative operations via the Sync Gateway admin/metrics REST endpoint 93 | 94 | ```bash 95 | docker stop cb-server 96 | 97 | docker rm cb-server 98 | 99 | docker run -d --name cb-server --network workshop -p 8091-8094:8091-8094 -p 11210:11210 priyacouch/couchbase-server-travelsample:7.x-dev 100 | 101 | ``` 102 | 103 | #### Test Installation 104 | 105 | * The server would take a few minutes to deploy and get fully initialized. So be patient. 106 | 107 | ```bash 108 | docker logs -f cb-server 109 | ``` 110 | 111 | * You should see the following once setup is completed 112 | 113 | ```bash 114 | 115 | 100 50 0 0 100 50 0 4166 --:--:-- --:--:-- --:--:-- 4545 116 | * Closing connection 0 117 | SUCCESS: Bucket created 118 | SUCCESS: User admin set 119 | /entrypoint.sh couchbase-server 120 | ``` 121 | 122 | * Then open up http://localhost:8091 in browser 123 | Sign in as “Administrator” and “password” in login page 124 | 125 | * Go to “buckets” menu and confirm that the `travel-sample` bucket is loaded. This bucket contains sample data. 126 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/admin-ui-bucket.png) 127 | 128 | * Go to “security” menu and confirm the following users are created. The users have been explained earlier. 129 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/admin-ui-security.png) 130 | 131 | ### Install Sync Gateway 132 | 133 | * Sync Gateway needs to be bootstrapped with a startup configuration file. The [sync-gateway-config-travelsample-bootstrap.json]() file is available in the sample "travel-sample" folder. 134 | 135 | * Download the configuration file. Switch to the the folder which contains the downloaded json file and run the following commands 136 | 137 | ```bash 138 | cd /path/to/cloned/repo/travel-sample 139 | ``` 140 | 141 | * Follow these instructions to deploy Sync Gateway with the downloaded config file 142 | 143 | ```bash 144 | docker stop sync-gateway 145 | 146 | docker rm sync-gateway 147 | ``` 148 | 149 | * **Windows Systems**: 150 | 151 | ```bash 152 | docker run -p 4984-4986:4984-4986 --network workshop --name sync-gateway -d -v %cd%/ync-gateway-config-travelsample-bootstrap.json:/etc/sync_gateway/sync_gateway.json couchbase/sync-gateway:3.0.0-beta02-enterprise /etc/sync_gateway/sync_gateway.json 153 | ``` 154 | 155 | * **Non-Windows Systems**: 156 | 157 | ```bash 158 | docker run -p 4984-4986:4984-4986 --network workshop --name sync-gateway -d -v `pwd`/ync-gateway-config-travelsample-bootstrap.json:/etc/sync_gateway/sync_gateway.json couchbase/sync-gateway:3.0.0-beta02-enterprise /etc/sync_gateway/sync_gateway.json 159 | ``` 160 | 161 | 162 | #### Test Installation 163 | 164 | * You can confirm that the Sync Gateway is up and running by verifying the log messages 165 | 166 | ```bash 167 | docker logs -f sync-gateway 168 | ``` 169 | 170 | You will see bunch of log messages. Make sure no errors 171 | 172 | * Then open up http://localhost:4984 in browser 173 | You should see equivalent of the following message 174 | 175 | ```bash 176 | {"couchdb":"Welcome","vendor":{"name":"Couchbase Sync Gateway","version":"3.0"},"version":"Couchbase Sync Gateway/{version-maintenance}(145;e3f46be) EE"} 177 | ``` 178 | 179 | ### Using Postman 180 | 181 | * Launch Postman API client and import all the three "travelsample" collections and the corresponding `Sync-Gateway-3.0-TravelSample-Environment.postman_environment` environment file. The environmental file has been customized for the travel-sample applicatin. Spend some time exploring the same. 182 | 183 | * All the requests are setup to use the relevant user for authorization. However, you will need to provide password. All the users are setup with a password of "password". So make sure you configure the "Authorization header" of your requests. 184 | 185 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/set-auth-header.png) 186 | 187 | 188 | #### Sanity Test 189 | 190 | * First, lets do a sanity test. For that run the "Get Sync Gateway Info" request from the Admin API collection. You should see details of the Sync Gateway in the response. 191 | 192 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/get-sync-gateway-info.png) 193 | 194 | #### Create & Configure Travel Sample Database 195 | 196 | Depending on whether the request is a cluster-level request or a database-level request, the user specified in the Authorization header may be "{{clusteradmin}}" or "{{dbadmin}}" respectively. Use password of "password" for requests. 197 | 198 | * Starting v3.0, all sync gateway database administration including database creation is handled via the admin REST endpoint. So this means that you would need to first create a sync gateway database. 199 | For this run the "Create a Sync Gateway Database" request from the "Sync Gateway 3.0 TravelSample Admin API" collection as shown below. Once database is created, you can run other operations on the database like creating a sync function, setting import filters etc. 200 | 201 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/db-creation.gif#800x490) 202 | 203 | #### Creating a Sync Gateway user 204 | 205 | * Before you can start interacting with the Sync Gateway database via the public REST endpoint, you will have to create a [sync gateway user](https://docs.couchbase.com/sync-gateway/3.0/users.html). For this run the "Create a new user" request from the "Sync Gateway 3.0 TravelSample Admin API" collection as shown below. This will create a user named "demo" with password of "password". Once user is created, you can use the public REST endpoint to interact with the database. 206 | 207 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/users.gif#800x490) 208 | 209 | #### Data Operations 210 | 211 | Accessing documents in the database and modifying it can be done via the either the admin REST API or the public REST API. In this example, we will use the pubic interface. All requests are executed using "{{username}}" user that was created via the "Create a new user" request discussed earlier. Use password of "password" for requests. 212 | 213 | * The travel-sample bucket is preloaded with sample data. You can retrieve that using the "Get Document" request from the "Sync Gateway 3.0 TravelSample Public API" collection. Replace "newdoc" with "doc" in the request to retrieve an existing document from bucket. 214 | 215 | * You can also create a new document and edit it by running requests from the "Sync Gateway 3.0 TravelSample Public API" collection as shown below. 216 | 217 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/documents.gif#800x490) 218 | 219 | #### Monitoring Operations 220 | 221 | * Finally, you can monitor the Sync Gateway by running the "Debugging/monitoring runtime stats in Prometheus format" request from the "Sync Gateway 3.0 TravelSample Metrics API" as shown below. 222 | 223 | ![](https://blog.couchbase.com/wp-content/uploads/2021/11/monitor.gif#800x490) 224 | 225 | ## Next Steps 226 | Familiarize yourself with the other REST APIs in the travel-sample collections by running through the other requests and customizing the requests as needed.Bug fix and enhancement contributions welcome. 227 | 228 | 229 | -------------------------------------------------------------------------------- /Sync-Gateway-3.0-Environment.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "78722494-e7d0-4ec1-be9c-2fd9ce42af48", 3 | "name": "Sync Gateway 3.0 Environment", 4 | "values": [ 5 | { 6 | "key": "db", 7 | "value": "demodb", 8 | "enabled": true 9 | }, 10 | { 11 | "key": "adminUrl", 12 | "value": "localhost:4985", 13 | "enabled": true 14 | }, 15 | { 16 | "key": "username", 17 | "value": "demo", 18 | "enabled": true 19 | }, 20 | { 21 | "key": "userpass", 22 | "value": "password", 23 | "enabled": true 24 | }, 25 | { 26 | "key": "email", 27 | "value": "demouser@example.com", 28 | "enabled": true 29 | }, 30 | { 31 | "key": "publicUrl", 32 | "value": "localhost:4984", 33 | "enabled": true 34 | }, 35 | { 36 | "key": "limit", 37 | "value": "10", 38 | "enabled": true 39 | }, 40 | { 41 | "key": "sessionid", 42 | "value": "", 43 | "enabled": true 44 | }, 45 | { 46 | "key": "variable_key", 47 | "value": "variable_value", 48 | "enabled": true 49 | }, 50 | { 51 | "key": "sessionId", 52 | "value": "", 53 | "enabled": true 54 | }, 55 | { 56 | "key": "role", 57 | "value": "owner", 58 | "enabled": true 59 | }, 60 | { 61 | "key": "channelid", 62 | "value": "*", 63 | "enabled": true 64 | }, 65 | { 66 | "key": "doc", 67 | "value": "testdoc", 68 | "enabled": true 69 | }, 70 | { 71 | "key": "keys", 72 | "value": "", 73 | "enabled": true 74 | }, 75 | { 76 | "key": "startkey", 77 | "value": "", 78 | "enabled": true 79 | }, 80 | { 81 | "key": "localdb", 82 | "value": "local_{{db}}", 83 | "enabled": true 84 | }, 85 | { 86 | "key": "remotedb", 87 | "value": "{{publicUrl}}/{{db}}", 88 | "enabled": true 89 | }, 90 | { 91 | "key": "atts_since", 92 | "value": "", 93 | "enabled": true 94 | }, 95 | { 96 | "key": "open_revs", 97 | "value": "", 98 | "enabled": true 99 | }, 100 | { 101 | "key": "doc2", 102 | "value": "{{name}}_doc2", 103 | "enabled": true 104 | }, 105 | { 106 | "key": "batch", 107 | "value": "ok", 108 | "enabled": true 109 | }, 110 | { 111 | "key": "localdocid", 112 | "value": "localtestdoc", 113 | "enabled": true 114 | }, 115 | { 116 | "key": "localrev", 117 | "value": "0-1", 118 | "enabled": true 119 | }, 120 | { 121 | "key": "filter", 122 | "value": "", 123 | "enabled": true 124 | }, 125 | { 126 | "key": "channels", 127 | "value": "[{{channelid}}]", 128 | "enabled": true 129 | }, 130 | { 131 | "key": "since", 132 | "value": "", 133 | "enabled": true 134 | }, 135 | { 136 | "key": "endkey", 137 | "value": "", 138 | "enabled": true 139 | }, 140 | { 141 | "key": "attachment", 142 | "value": "", 143 | "enabled": true 144 | }, 145 | { 146 | "key": "offline", 147 | "value": "true", 148 | "enabled": true 149 | }, 150 | { 151 | "key": "provider", 152 | "value": "", 153 | "enabled": true 154 | }, 155 | { 156 | "key": "code", 157 | "value": "", 158 | "enabled": true 159 | }, 160 | { 161 | "key": "refresh_token", 162 | "value": "", 163 | "enabled": true 164 | }, 165 | { 166 | "key": "ddoc", 167 | "value": "foobar", 168 | "enabled": true 169 | }, 170 | { 171 | "key": "view", 172 | "value": "foobarview", 173 | "enabled": true 174 | }, 175 | { 176 | "key": "ddocrev", 177 | "value": "", 178 | "enabled": true 179 | }, 180 | { 181 | "key": "conflicts", 182 | "value": "true", 183 | "enabled": true 184 | }, 185 | { 186 | "key": "descending", 187 | "value": "false", 188 | "enabled": true 189 | }, 190 | { 191 | "key": "end_key", 192 | "value": "", 193 | "enabled": true 194 | }, 195 | { 196 | "key": "start_key", 197 | "value": "", 198 | "enabled": true 199 | }, 200 | { 201 | "key": "endkey_docid", 202 | "value": "", 203 | "enabled": true 204 | }, 205 | { 206 | "key": "end_key_doc_id", 207 | "value": "", 208 | "enabled": true 209 | }, 210 | { 211 | "key": "include_docs", 212 | "value": "true", 213 | "enabled": true 214 | }, 215 | { 216 | "key": "inclusive_end", 217 | "value": "true", 218 | "enabled": true 219 | }, 220 | { 221 | "key": "group", 222 | "value": "", 223 | "enabled": true 224 | }, 225 | { 226 | "key": "group_level", 227 | "value": "", 228 | "enabled": true 229 | }, 230 | { 231 | "key": "skip", 232 | "value": "", 233 | "enabled": true 234 | }, 235 | { 236 | "key": "stale", 237 | "value": "", 238 | "enabled": true 239 | }, 240 | { 241 | "key": "startkey_docid", 242 | "value": "", 243 | "enabled": true 244 | }, 245 | { 246 | "key": "update_seq", 247 | "value": "false", 248 | "enabled": true 249 | }, 250 | { 251 | "key": "key", 252 | "value": "", 253 | "enabled": true 254 | }, 255 | { 256 | "key": "replicationId", 257 | "value": "repl101", 258 | "enabled": true 259 | }, 260 | { 261 | "key": "body", 262 | "value": "foo", 263 | "enabled": true 264 | }, 265 | { 266 | "key": "newedits", 267 | "value": "true", 268 | "enabled": true 269 | }, 270 | { 271 | "key": "updatedbody", 272 | "value": "bar", 273 | "enabled": true 274 | }, 275 | { 276 | "key": "docid", 277 | "value": "testdoc", 278 | "enabled": true 279 | }, 280 | { 281 | "key": "rev", 282 | "value": "", 283 | "enabled": true 284 | }, 285 | { 286 | "key": "bulkbody", 287 | "value": "foobar", 288 | "enabled": true 289 | }, 290 | { 291 | "key": "bulkdocid", 292 | "value": "", 293 | "enabled": true 294 | }, 295 | { 296 | "key": "bulkrev", 297 | "value": "", 298 | "enabled": true 299 | }, 300 | { 301 | "key": "localbody", 302 | "value": "helloworld", 303 | "enabled": true 304 | }, 305 | { 306 | "key": "updatedlocalbody", 307 | "value": "helloworld again", 308 | "enabled": true 309 | }, 310 | { 311 | "key": "user", 312 | "value": "walrususer", 313 | "enabled": true 314 | }, 315 | { 316 | "key": "metricsUrl", 317 | "value": "localhost:4986", 318 | "enabled": true 319 | }, 320 | { 321 | "key": "local_doc", 322 | "value": "", 323 | "enabled": true 324 | }, 325 | { 326 | "key": "style", 327 | "value": "main_only", 328 | "enabled": true 329 | }, 330 | { 331 | "key": "active_only", 332 | "value": "false", 333 | "enabled": true 334 | }, 335 | { 336 | "key": "doc_ids", 337 | "value": "[{{docid}}]", 338 | "enabled": true 339 | }, 340 | { 341 | "key": "feed", 342 | "value": "normal", 343 | "enabled": true 344 | }, 345 | { 346 | "key": "heartbeat", 347 | "value": "0", 348 | "enabled": true 349 | }, 350 | { 351 | "key": "timeout", 352 | "value": "300000", 353 | "enabled": true 354 | }, 355 | { 356 | "key": "include_attachments", 357 | "value": "false", 358 | "enabled": true 359 | }, 360 | { 361 | "key": "include_revs", 362 | "value": "false", 363 | "enabled": true 364 | }, 365 | { 366 | "key": "show_exp", 367 | "value": "true", 368 | "enabled": true 369 | }, 370 | { 371 | "key": "new_edits", 372 | "value": "true", 373 | "enabled": true 374 | }, 375 | { 376 | "key": "access", 377 | "value": "true", 378 | "enabled": true 379 | }, 380 | { 381 | "key": "include_channels", 382 | "value": "true", 383 | "enabled": true 384 | }, 385 | { 386 | "key": "action", 387 | "value": "start", 388 | "enabled": true 389 | }, 390 | { 391 | "key": "revs_limit", 392 | "value": "1", 393 | "enabled": true 394 | }, 395 | { 396 | "key": "local_only", 397 | "value": "false", 398 | "enabled": true 399 | }, 400 | { 401 | "key": "include_error", 402 | "value": "false", 403 | "enabled": true 404 | }, 405 | { 406 | "key": "include_config", 407 | "value": "false", 408 | "enabled": true 409 | }, 410 | { 411 | "key": "preview", 412 | "value": "false", 413 | "enabled": true 414 | }, 415 | { 416 | "key": "level", 417 | "value": "debug", 418 | "enabled": true 419 | }, 420 | { 421 | "key": "logLevel", 422 | "value": "debug", 423 | "enabled": true 424 | }, 425 | { 426 | "key": "include_javascript", 427 | "value": "false", 428 | "enabled": true 429 | }, 430 | { 431 | "key": "include_runtime", 432 | "value": "false", 433 | "enabled": true 434 | }, 435 | { 436 | "key": "clusteradmin", 437 | "value": "", 438 | "enabled": true 439 | }, 440 | { 441 | "key": "dbadmin", 442 | "value": "", 443 | "enabled": true 444 | } 445 | ], 446 | "_postman_variable_scope": "environment", 447 | "_postman_exported_at": "2021-11-23T00:46:50.466Z", 448 | "_postman_exported_using": "Postman/7.36.5" 449 | } 450 | -------------------------------------------------------------------------------- /Sync-Gateway-3.0-Metrics-API.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "41ee3885-25a7-459b-ab2e-00b267c095e7", 4 | "name": "Sync Gateway 3.0 Metrics API", 5 | "description": "This is a developer preview of the documentation for the Sync Gateway Metrics Rest API.\n", 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 7 | }, 8 | "item": [ 9 | { 10 | "name": "Debugging/monitoring at runtime", 11 | "request": { 12 | "auth": { 13 | "type": "basic", 14 | "basic": [ 15 | { 16 | "key": "username", 17 | "value": "{{clusteradmin}}", 18 | "type": "string" 19 | }, 20 | { 21 | "key": "password", 22 | "value": "password", 23 | "type": "string" 24 | } 25 | ] 26 | }, 27 | "method": "GET", 28 | "header": [], 29 | "url": { 30 | "raw": "{{metricsUrl}}/_expvar", 31 | "host": [ 32 | "{{metricsUrl}}" 33 | ], 34 | "path": [ 35 | "_expvar" 36 | ] 37 | }, 38 | "description": "The ```Expvars``` method returns Sync Gateways' numerous statistics, and other runtime variables, in JSON format.\nMaking them readily available for debugging or performance monitoring purposes.\n\n**See** : [Sync Gateway Statistics Schema](./../stats-monitoring.html) for more details on the metrics collected and reported by Sync Gateway.\n\n" 39 | }, 40 | "response": [ 41 | { 42 | "name": "OK - indicates success", 43 | "originalRequest": { 44 | "method": "GET", 45 | "header": [], 46 | "url": { 47 | "raw": "{{metricsUrl}}/_expvar", 48 | "host": [ 49 | "{{metricsUrl}}" 50 | ], 51 | "path": [ 52 | "_expvar" 53 | ] 54 | } 55 | }, 56 | "status": "OK", 57 | "code": 200, 58 | "_postman_previewlanguage": "json", 59 | "header": [ 60 | { 61 | "key": "Content-Type", 62 | "value": "application/json" 63 | } 64 | ], 65 | "cookie": [], 66 | "body": "{\n \"cmdline\": {},\n \"memstats\": {},\n \"cb\": {},\n \"mc\": {},\n \"syncGateway_changeCache\": {\n \"maxPending\": {},\n \"lag-tap-0000ms\": {},\n \"lag-queue-0000ms\": {},\n \"lag-total-0000ms\": {},\n \"outOfOrder\": {},\n \"view_queries\": {}\n },\n \"syncGateway_db\": {\n \"channelChangesFeeds\": {},\n \"channelLogAdds\": {},\n \"channelLogAppends\": {},\n \"channelLogCacheHits\": {},\n \"channelLogRewrites\": {},\n \"channelLogRewriteCollisions\": {},\n \"document_gets\": {},\n \"revisionCache_adds\": {},\n \"revisionCache_hits\": {},\n \"revisionCache_misses\": {},\n \"revs_added\": {},\n \"sequence_gets\": {},\n \"sequence_reserves\": {}\n },\n \"syncgateway\": {\n \"global\": {\n \"resource_utilization\": {\n \"admin_net_bytes_recv\": 5669006,\n \"admin_net_bytes_sent\": 51059695,\n \"error_count\": -419626,\n \"go_memstats_heapalloc\": 76186951,\n \"go_memstats_heapidle\": -57870390,\n \"go_memstats_heapinuse\": -41888315,\n \"go_memstats_heapreleased\": 58812201,\n \"go_memstats_pausetotalns\": -90762235,\n \"go_memstats_stackinuse\": -49194587,\n \"go_memstats_stacksys\": 44673172,\n \"go_memstats_sys\": 50422318,\n \"goroutines_high_watermark\": -85435126,\n \"num_goroutines\": -5442029,\n \"process_cpu_percent_utilization\": 12179981,\n \"process_memory_resident\": -70780112,\n \"pub_net_bytes_recv\": -62166019,\n \"pub_net_bytes_sent\": 49943280,\n \"system_memory_total\": 20464858,\n \"warn_count\": 1513217\n }\n },\n \"per_db\": [\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n },\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n }\n ],\n \"per_replication\": [\n {\n \"$replication_id\": {\n \"sgr_active\": true,\n \"sgr_docs_checked_sent\": 60966279,\n \"sgr_num_attachments_transferred\": -12680724,\n \"sgr_num_attachment_bytes_transferred\": 60977299,\n \"sgr_num_docs_failed_to_push\": 37148037,\n \"sgr_num_docs_pushed\": -64876276\n }\n },\n {\n \"$replication_id\": {\n \"sgr_active\": true,\n \"sgr_docs_checked_sent\": -14762040,\n \"sgr_num_attachments_transferred\": -9347796,\n \"sgr_num_attachment_bytes_transferred\": -30841306,\n \"sgr_num_docs_failed_to_push\": 39403997,\n \"sgr_num_docs_pushed\": -21794495\n }\n }\n ]\n }\n}" 67 | } 68 | ] 69 | }, 70 | { 71 | "name": "Debugging/monitoring runtime stats in Prometheus format", 72 | "request": { 73 | "auth": { 74 | "type": "basic", 75 | "basic": [ 76 | { 77 | "key": "password", 78 | "value": "password", 79 | "type": "string" 80 | }, 81 | { 82 | "key": "username", 83 | "value": "{{clusteradmin}}", 84 | "type": "string" 85 | } 86 | ] 87 | }, 88 | "method": "GET", 89 | "header": [], 90 | "url": { 91 | "raw": "{{metricsUrl}}/_metrics", 92 | "host": [ 93 | "{{metricsUrl}}" 94 | ], 95 | "path": [ 96 | "_metrics" 97 | ] 98 | }, 99 | "description": "The ```_metrics``` method returns Sync Gateway's statistics and other runtime variables in **Prometheus** format.\nThis makes for a convenient feed for your debugging or performance monitoring purposes.\n\n- For more details on the metrics collected and reported by Sync Gateway -- see: [Sync Gateway Statistics Schema](./../stats-monitoring.html).\n- For more details on Monitoring Sync Gateway using the ```_metrics``` feed -- see: our blog on [Monitoring and Visualization of Couchbase Sync Gateway with Prometheus and Grafana](https://blog.couchbase.com/monitoring-and-visualization-of-couchbase-sync-gateway-with-prometheus-and-grafana/)\n\n" 100 | }, 101 | "response": [ 102 | { 103 | "name": "OK - indicates success", 104 | "originalRequest": { 105 | "method": "GET", 106 | "header": [], 107 | "url": { 108 | "raw": "{{metricsUrl}}/_metrics", 109 | "host": [ 110 | "{{metricsUrl}}" 111 | ], 112 | "path": [ 113 | "_metrics" 114 | ] 115 | } 116 | }, 117 | "status": "OK", 118 | "code": 200, 119 | "_postman_previewlanguage": "json", 120 | "header": [ 121 | { 122 | "key": "Content-Type", 123 | "value": "application/json" 124 | } 125 | ], 126 | "cookie": [], 127 | "body": "{\n \"cmdline\": {},\n \"memstats\": {},\n \"cb\": {},\n \"mc\": {},\n \"syncGateway_changeCache\": {\n \"maxPending\": {},\n \"lag-tap-0000ms\": {},\n \"lag-queue-0000ms\": {},\n \"lag-total-0000ms\": {},\n \"outOfOrder\": {},\n \"view_queries\": {}\n },\n \"syncGateway_db\": {\n \"channelChangesFeeds\": {},\n \"channelLogAdds\": {},\n \"channelLogAppends\": {},\n \"channelLogCacheHits\": {},\n \"channelLogRewrites\": {},\n \"channelLogRewriteCollisions\": {},\n \"document_gets\": {},\n \"revisionCache_adds\": {},\n \"revisionCache_hits\": {},\n \"revisionCache_misses\": {},\n \"revs_added\": {},\n \"sequence_gets\": {},\n \"sequence_reserves\": {}\n },\n \"syncgateway\": {\n \"global\": {\n \"resource_utilization\": {\n \"admin_net_bytes_recv\": -57311046,\n \"admin_net_bytes_sent\": -5228289,\n \"error_count\": 44107022,\n \"go_memstats_heapalloc\": 91403591,\n \"go_memstats_heapidle\": -44357816,\n \"go_memstats_heapinuse\": -32866358,\n \"go_memstats_heapreleased\": -12494040,\n \"go_memstats_pausetotalns\": -49163664,\n \"go_memstats_stackinuse\": 59567577,\n \"go_memstats_stacksys\": 12893464,\n \"go_memstats_sys\": -24421981,\n \"goroutines_high_watermark\": 61595771,\n \"num_goroutines\": 5616588,\n \"process_cpu_percent_utilization\": -95103476,\n \"process_memory_resident\": 82145930,\n \"pub_net_bytes_recv\": 36535680,\n \"pub_net_bytes_sent\": -89928270,\n \"system_memory_total\": -75210282,\n \"warn_count\": 94429437\n }\n },\n \"per_db\": [\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n },\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n }\n ],\n \"per_replication\": [\n {\n \"$replication_id\": {\n \"sgr_active\": false,\n \"sgr_docs_checked_sent\": 98750922,\n \"sgr_num_attachments_transferred\": -16408056,\n \"sgr_num_attachment_bytes_transferred\": 66431901,\n \"sgr_num_docs_failed_to_push\": -15732903,\n \"sgr_num_docs_pushed\": -385332\n }\n },\n {\n \"$replication_id\": {\n \"sgr_active\": false,\n \"sgr_docs_checked_sent\": -89302600,\n \"sgr_num_attachments_transferred\": -64865268,\n \"sgr_num_attachment_bytes_transferred\": -57628620,\n \"sgr_num_docs_failed_to_push\": 39121396,\n \"sgr_num_docs_pushed\": -88218518\n }\n }\n ]\n }\n}" 128 | }, 129 | { 130 | "name": "Prometheus Stats-Success", 131 | "originalRequest": { 132 | "method": "GET", 133 | "header": [], 134 | "url": { 135 | "raw": "{{metricsUrl}}/_metrics", 136 | "host": [ 137 | "{{metricsUrl}}" 138 | ], 139 | "path": [ 140 | "_metrics" 141 | ] 142 | } 143 | }, 144 | "status": "OK", 145 | "code": 200, 146 | "_postman_previewlanguage": "plain", 147 | "header": [ 148 | { 149 | "key": "Content-Encoding", 150 | "value": "gzip" 151 | }, 152 | { 153 | "key": "Content-Type", 154 | "value": "text/plain; version=0.0.4; charset=utf-8" 155 | }, 156 | { 157 | "key": "Server", 158 | "value": "Couchbase Sync Gateway/3.0.0 EE" 159 | }, 160 | { 161 | "key": "Date", 162 | "value": "Mon, 22 Nov 2021 23:22:16 GMT" 163 | }, 164 | { 165 | "key": "Transfer-Encoding", 166 | "value": "chunked" 167 | } 168 | ], 169 | "cookie": [], 170 | "body": "# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0001155\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0001254\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0001597\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0001806\ngo_gc_duration_seconds{quantile=\"1\"} 0.0049731\ngo_gc_duration_seconds_sum 0.006334\ngo_gc_duration_seconds_count 9\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 205\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.16.6\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.74725568e+08\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 5.77613776e+08\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.485504e+06\n# HELP go_memstats_frees_total Total number of frees.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 1.886974e+06\n# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.\n# TYPE go_memstats_gc_cpu_fraction gauge\ngo_memstats_gc_cpu_fraction 0.0005904367920689457\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.7448552e+07\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.74725568e+08\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 1.14655232e+08\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 2.86031872e+08\n# HELP go_memstats_heap_objects Number of allocated objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 163872\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 6.078464e+07\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 4.00687104e+08\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.6376233111257215e+09\n# HELP go_memstats_lookups_total Total number of pointer lookups.\n# TYPE go_memstats_lookups_total counter\ngo_memstats_lookups_total 0\n# HELP go_memstats_mallocs_total Total number of mallocs.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 2.050846e+06\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 7200\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 16384\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 450568\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 1.130496e+06\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 2.86283328e+08\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 890672\n# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 1.96608e+06\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 1.96608e+06\n# HELP go_memstats_sys_bytes Number of bytes obtained from system.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 4.23624792e+08\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 14\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 5.05\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.048576e+06\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 63\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.08596992e+08\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.6376232877e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.537163264e+09\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\n# TYPE process_virtual_memory_max_bytes gauge\nprocess_virtual_memory_max_bytes -1\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP sgw_cache_abandoned_seqs abandoned_seqs\n# TYPE sgw_cache_abandoned_seqs counter\nsgw_cache_abandoned_seqs{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_active_revs chan_cache_active_revs\n# TYPE sgw_cache_chan_cache_active_revs gauge\nsgw_cache_chan_cache_active_revs{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_bypass_count chan_cache_bypass_count\n# TYPE sgw_cache_chan_cache_bypass_count counter\nsgw_cache_chan_cache_bypass_count{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_channels_added chan_cache_channels_added\n# TYPE sgw_cache_chan_cache_channels_added counter\nsgw_cache_chan_cache_channels_added{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_channels_evicted_inactive chan_cache_channels_evicted_inactive\n# TYPE sgw_cache_chan_cache_channels_evicted_inactive counter\nsgw_cache_chan_cache_channels_evicted_inactive{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_channels_evicted_nru chan_cache_channels_evicted_nru\n# TYPE sgw_cache_chan_cache_channels_evicted_nru counter\nsgw_cache_chan_cache_channels_evicted_nru{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_compact_count chan_cache_compact_count\n# TYPE sgw_cache_chan_cache_compact_count counter\nsgw_cache_chan_cache_compact_count{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_compact_time chan_cache_compact_time\n# TYPE sgw_cache_chan_cache_compact_time counter\nsgw_cache_chan_cache_compact_time{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_hits chan_cache_hits\n# TYPE sgw_cache_chan_cache_hits counter\nsgw_cache_chan_cache_hits{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_max_entries chan_cache_max_entries\n# TYPE sgw_cache_chan_cache_max_entries gauge\nsgw_cache_chan_cache_max_entries{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_misses chan_cache_misses\n# TYPE sgw_cache_chan_cache_misses counter\nsgw_cache_chan_cache_misses{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_num_channels chan_cache_num_channels\n# TYPE sgw_cache_chan_cache_num_channels gauge\nsgw_cache_chan_cache_num_channels{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_pending_queries chan_cache_pending_queries\n# TYPE sgw_cache_chan_cache_pending_queries gauge\nsgw_cache_chan_cache_pending_queries{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_removal_revs chan_cache_removal_revs\n# TYPE sgw_cache_chan_cache_removal_revs gauge\nsgw_cache_chan_cache_removal_revs{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_tombstone_revs chan_cache_tombstone_revs\n# TYPE sgw_cache_chan_cache_tombstone_revs gauge\nsgw_cache_chan_cache_tombstone_revs{database=\"travel-sample\"} 0\n# HELP sgw_cache_high_seq_cached high_seq_cached\n# TYPE sgw_cache_high_seq_cached counter\nsgw_cache_high_seq_cached{database=\"travel-sample\"} 0\n# HELP sgw_cache_high_seq_stable high_seq_stable\n# TYPE sgw_cache_high_seq_stable counter\nsgw_cache_high_seq_stable{database=\"travel-sample\"} 0\n# HELP sgw_cache_non_mobile_ignored_count non_mobile_ignored_count\n# TYPE sgw_cache_non_mobile_ignored_count counter\nsgw_cache_non_mobile_ignored_count{database=\"travel-sample\"} 0\n# HELP sgw_cache_num_active_channels num_active_channels\n# TYPE sgw_cache_num_active_channels gauge\nsgw_cache_num_active_channels{database=\"travel-sample\"} 0\n# HELP sgw_cache_num_skipped_seqs num_skipped_seqs\n# TYPE sgw_cache_num_skipped_seqs counter\nsgw_cache_num_skipped_seqs{database=\"travel-sample\"} 0\n# HELP sgw_cache_pending_seq_len pending_seq_len\n# TYPE sgw_cache_pending_seq_len gauge\nsgw_cache_pending_seq_len{database=\"travel-sample\"} 0\n# HELP sgw_cache_rev_cache_bypass rev_cache_bypass\n# TYPE sgw_cache_rev_cache_bypass gauge\nsgw_cache_rev_cache_bypass{database=\"travel-sample\"} 0\n# HELP sgw_cache_rev_cache_hits rev_cache_hits\n# TYPE sgw_cache_rev_cache_hits counter\nsgw_cache_rev_cache_hits{database=\"travel-sample\"} 0\n# HELP sgw_cache_rev_cache_misses rev_cache_misses\n# TYPE sgw_cache_rev_cache_misses counter\nsgw_cache_rev_cache_misses{database=\"travel-sample\"} 0\n# HELP sgw_cache_skipped_seq_len skipped_seq_len\n# TYPE sgw_cache_skipped_seq_len gauge\nsgw_cache_skipped_seq_len{database=\"travel-sample\"} 0\n# HELP sgw_cache_view_queries view_queries\n# TYPE sgw_cache_view_queries counter\nsgw_cache_view_queries{database=\"travel-sample\"} 0\n# HELP sgw_database_conflict_write_count conflict_write_count\n# TYPE sgw_database_conflict_write_count counter\nsgw_database_conflict_write_count{database=\"travel-sample\"} 0\n# HELP sgw_database_crc32c_match_count crc32c_match_count\n# TYPE sgw_database_crc32c_match_count gauge\nsgw_database_crc32c_match_count{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_caching_count dcp_caching_count\n# TYPE sgw_database_dcp_caching_count gauge\nsgw_database_dcp_caching_count{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_caching_time dcp_caching_time\n# TYPE sgw_database_dcp_caching_time gauge\nsgw_database_dcp_caching_time{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_received_count dcp_received_count\n# TYPE sgw_database_dcp_received_count gauge\nsgw_database_dcp_received_count{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_received_time dcp_received_time\n# TYPE sgw_database_dcp_received_time gauge\nsgw_database_dcp_received_time{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_reads_bytes_blip doc_reads_bytes_blip\n# TYPE sgw_database_doc_reads_bytes_blip counter\nsgw_database_doc_reads_bytes_blip{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_writes_bytes doc_writes_bytes\n# TYPE sgw_database_doc_writes_bytes counter\nsgw_database_doc_writes_bytes{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_writes_bytes_blip doc_writes_bytes_blip\n# TYPE sgw_database_doc_writes_bytes_blip counter\nsgw_database_doc_writes_bytes_blip{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_writes_xattr_bytes doc_writes_xattr_bytes\n# TYPE sgw_database_doc_writes_xattr_bytes counter\nsgw_database_doc_writes_xattr_bytes{database=\"travel-sample\"} 0\n# HELP sgw_database_high_seq_feed high_seq_feed\n# TYPE sgw_database_high_seq_feed counter\nsgw_database_high_seq_feed{database=\"travel-sample\"} 0\n# HELP sgw_database_num_doc_reads_blip num_doc_reads_blip\n# TYPE sgw_database_num_doc_reads_blip counter\nsgw_database_num_doc_reads_blip{database=\"travel-sample\"} 0\n# HELP sgw_database_num_doc_reads_rest num_doc_reads_rest\n# TYPE sgw_database_num_doc_reads_rest counter\nsgw_database_num_doc_reads_rest{database=\"travel-sample\"} 0\n# HELP sgw_database_num_doc_writes num_doc_writes\n# TYPE sgw_database_num_doc_writes counter\nsgw_database_num_doc_writes{database=\"travel-sample\"} 0\n# HELP sgw_database_num_replications_active num_replications_active\n# TYPE sgw_database_num_replications_active gauge\nsgw_database_num_replications_active{database=\"travel-sample\"} 0\n# HELP sgw_database_num_replications_total num_replications_total\n# TYPE sgw_database_num_replications_total counter\nsgw_database_num_replications_total{database=\"travel-sample\"} 0\n# HELP sgw_database_num_tombstones_compacted num_tombstones_compacted\n# TYPE sgw_database_num_tombstones_compacted counter\nsgw_database_num_tombstones_compacted{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_assigned_count sequence_assigned_count\n# TYPE sgw_database_sequence_assigned_count counter\nsgw_database_sequence_assigned_count{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_get_count sequence_get_count\n# TYPE sgw_database_sequence_get_count counter\nsgw_database_sequence_get_count{database=\"travel-sample\"} 2\n# HELP sgw_database_sequence_incr_count sequence_incr_count\n# TYPE sgw_database_sequence_incr_count counter\nsgw_database_sequence_incr_count{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_released_count sequence_released_count\n# TYPE sgw_database_sequence_released_count counter\nsgw_database_sequence_released_count{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_reserved_count sequence_reserved_count\n# TYPE sgw_database_sequence_reserved_count counter\nsgw_database_sequence_reserved_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_channel_name_size_count warn_channel_name_size_count\n# TYPE sgw_database_warn_channel_name_size_count counter\nsgw_database_warn_channel_name_size_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_channels_per_doc_count warn_channels_per_doc_count\n# TYPE sgw_database_warn_channels_per_doc_count counter\nsgw_database_warn_channels_per_doc_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_grants_per_doc_count warn_grants_per_doc_count\n# TYPE sgw_database_warn_grants_per_doc_count counter\nsgw_database_warn_grants_per_doc_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_xattr_size_count warn_xattr_size_count\n# TYPE sgw_database_warn_xattr_size_count counter\nsgw_database_warn_xattr_size_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_access_count access_count\n# TYPE sgw_gsi_views_access_count counter\nsgw_gsi_views_access_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_access_error_count access_error_count\n# TYPE sgw_gsi_views_access_error_count counter\nsgw_gsi_views_access_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_access_time access_time\n# TYPE sgw_gsi_views_access_time counter\nsgw_gsi_views_access_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_allDocs_count allDocs_count\n# TYPE sgw_gsi_views_allDocs_count counter\nsgw_gsi_views_allDocs_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_allDocs_error_count allDocs_error_count\n# TYPE sgw_gsi_views_allDocs_error_count counter\nsgw_gsi_views_allDocs_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_allDocs_time allDocs_time\n# TYPE sgw_gsi_views_allDocs_time counter\nsgw_gsi_views_allDocs_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channelsStar_count channelsStar_count\n# TYPE sgw_gsi_views_channelsStar_count counter\nsgw_gsi_views_channelsStar_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channelsStar_error_count channelsStar_error_count\n# TYPE sgw_gsi_views_channelsStar_error_count counter\nsgw_gsi_views_channelsStar_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channelsStar_time channelsStar_time\n# TYPE sgw_gsi_views_channelsStar_time counter\nsgw_gsi_views_channelsStar_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channels_count channels_count\n# TYPE sgw_gsi_views_channels_count counter\nsgw_gsi_views_channels_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channels_error_count channels_error_count\n# TYPE sgw_gsi_views_channels_error_count counter\nsgw_gsi_views_channels_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channels_time channels_time\n# TYPE sgw_gsi_views_channels_time counter\nsgw_gsi_views_channels_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_principals_count principals_count\n# TYPE sgw_gsi_views_principals_count counter\nsgw_gsi_views_principals_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_principals_error_count principals_error_count\n# TYPE sgw_gsi_views_principals_error_count counter\nsgw_gsi_views_principals_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_principals_time principals_time\n# TYPE sgw_gsi_views_principals_time counter\nsgw_gsi_views_principals_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_resync_count resync_count\n# TYPE sgw_gsi_views_resync_count counter\nsgw_gsi_views_resync_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_resync_error_count resync_error_count\n# TYPE sgw_gsi_views_resync_error_count counter\nsgw_gsi_views_resync_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_resync_time resync_time\n# TYPE sgw_gsi_views_resync_time counter\nsgw_gsi_views_resync_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_roleAccess_count roleAccess_count\n# TYPE sgw_gsi_views_roleAccess_count counter\nsgw_gsi_views_roleAccess_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_roleAccess_error_count roleAccess_error_count\n# TYPE sgw_gsi_views_roleAccess_error_count counter\nsgw_gsi_views_roleAccess_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_roleAccess_time roleAccess_time\n# TYPE sgw_gsi_views_roleAccess_time counter\nsgw_gsi_views_roleAccess_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sequences_count sequences_count\n# TYPE sgw_gsi_views_sequences_count counter\nsgw_gsi_views_sequences_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sequences_error_count sequences_error_count\n# TYPE sgw_gsi_views_sequences_error_count counter\nsgw_gsi_views_sequences_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sequences_time sequences_time\n# TYPE sgw_gsi_views_sequences_time counter\nsgw_gsi_views_sequences_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sessions_count sessions_count\n# TYPE sgw_gsi_views_sessions_count counter\nsgw_gsi_views_sessions_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sessions_error_count sessions_error_count\n# TYPE sgw_gsi_views_sessions_error_count counter\nsgw_gsi_views_sessions_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sessions_time sessions_time\n# TYPE sgw_gsi_views_sessions_time counter\nsgw_gsi_views_sessions_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_tombstones_count tombstones_count\n# TYPE sgw_gsi_views_tombstones_count counter\nsgw_gsi_views_tombstones_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_tombstones_error_count tombstones_error_count\n# TYPE sgw_gsi_views_tombstones_error_count counter\nsgw_gsi_views_tombstones_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_tombstones_time tombstones_time\n# TYPE sgw_gsi_views_tombstones_time counter\nsgw_gsi_views_tombstones_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_attachment_pull_bytes attachment_pull_bytes\n# TYPE sgw_replication_pull_attachment_pull_bytes counter\nsgw_replication_pull_attachment_pull_bytes{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_attachment_pull_count attachment_pull_count\n# TYPE sgw_replication_pull_attachment_pull_count counter\nsgw_replication_pull_attachment_pull_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_max_pending max_pending\n# TYPE sgw_replication_pull_max_pending gauge\nsgw_replication_pull_max_pending{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_active_continuous num_pull_repl_active_continuous\n# TYPE sgw_replication_pull_num_pull_repl_active_continuous gauge\nsgw_replication_pull_num_pull_repl_active_continuous{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_active_one_shot num_pull_repl_active_one_shot\n# TYPE sgw_replication_pull_num_pull_repl_active_one_shot gauge\nsgw_replication_pull_num_pull_repl_active_one_shot{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_caught_up num_pull_repl_caught_up\n# TYPE sgw_replication_pull_num_pull_repl_caught_up gauge\nsgw_replication_pull_num_pull_repl_caught_up{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_since_zero num_pull_repl_since_zero\n# TYPE sgw_replication_pull_num_pull_repl_since_zero counter\nsgw_replication_pull_num_pull_repl_since_zero{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_total_caught_up num_pull_repl_total_caught_up\n# TYPE sgw_replication_pull_num_pull_repl_total_caught_up gauge\nsgw_replication_pull_num_pull_repl_total_caught_up{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_total_continuous num_pull_repl_total_continuous\n# TYPE sgw_replication_pull_num_pull_repl_total_continuous gauge\nsgw_replication_pull_num_pull_repl_total_continuous{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_total_one_shot num_pull_repl_total_one_shot\n# TYPE sgw_replication_pull_num_pull_repl_total_one_shot gauge\nsgw_replication_pull_num_pull_repl_total_one_shot{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_replications_active num_replications_active\n# TYPE sgw_replication_pull_num_replications_active gauge\nsgw_replication_pull_num_replications_active{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_request_changes_count request_changes_count\n# TYPE sgw_replication_pull_request_changes_count counter\nsgw_replication_pull_request_changes_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_request_changes_time request_changes_time\n# TYPE sgw_replication_pull_request_changes_time counter\nsgw_replication_pull_request_changes_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_rev_processing_time rev_processing_time\n# TYPE sgw_replication_pull_rev_processing_time gauge\nsgw_replication_pull_rev_processing_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_rev_send_count rev_send_count\n# TYPE sgw_replication_pull_rev_send_count counter\nsgw_replication_pull_rev_send_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_rev_send_latency rev_send_latency\n# TYPE sgw_replication_pull_rev_send_latency counter\nsgw_replication_pull_rev_send_latency{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_attachment_push_bytes attachment_push_bytes\n# TYPE sgw_replication_push_attachment_push_bytes counter\nsgw_replication_push_attachment_push_bytes{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_attachment_push_count attachment_push_count\n# TYPE sgw_replication_push_attachment_push_count counter\nsgw_replication_push_attachment_push_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_doc_push_count doc_push_count\n# TYPE sgw_replication_push_doc_push_count gauge\nsgw_replication_push_doc_push_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_propose_change_count propose_change_count\n# TYPE sgw_replication_push_propose_change_count counter\nsgw_replication_push_propose_change_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_propose_change_time propose_change_time\n# TYPE sgw_replication_push_propose_change_time counter\nsgw_replication_push_propose_change_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_sync_function_count sync_function_count\n# TYPE sgw_replication_push_sync_function_count counter\nsgw_replication_push_sync_function_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_sync_function_time sync_function_time\n# TYPE sgw_replication_push_sync_function_time counter\nsgw_replication_push_sync_function_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_write_processing_time write_processing_time\n# TYPE sgw_replication_push_write_processing_time gauge\nsgw_replication_push_write_processing_time{database=\"travel-sample\"} 0\n# HELP sgw_resource_utilization_admin_net_bytes_recv admin_net_bytes_recv\n# TYPE sgw_resource_utilization_admin_net_bytes_recv counter\nsgw_resource_utilization_admin_net_bytes_recv 0\n# HELP sgw_resource_utilization_admin_net_bytes_sent admin_net_bytes_sent\n# TYPE sgw_resource_utilization_admin_net_bytes_sent counter\nsgw_resource_utilization_admin_net_bytes_sent 0\n# HELP sgw_resource_utilization_error_count error_count\n# TYPE sgw_resource_utilization_error_count counter\nsgw_resource_utilization_error_count 0\n# HELP sgw_resource_utilization_go_memstats_heapalloc go_memstats_heapalloc\n# TYPE sgw_resource_utilization_go_memstats_heapalloc gauge\nsgw_resource_utilization_go_memstats_heapalloc 0\n# HELP sgw_resource_utilization_go_memstats_heapidle go_memstats_heapidle\n# TYPE sgw_resource_utilization_go_memstats_heapidle gauge\nsgw_resource_utilization_go_memstats_heapidle 0\n# HELP sgw_resource_utilization_go_memstats_heapinuse go_memstats_heapinuse\n# TYPE sgw_resource_utilization_go_memstats_heapinuse gauge\nsgw_resource_utilization_go_memstats_heapinuse 0\n# HELP sgw_resource_utilization_go_memstats_heapreleased go_memstats_heapreleased\n# TYPE sgw_resource_utilization_go_memstats_heapreleased gauge\nsgw_resource_utilization_go_memstats_heapreleased 0\n# HELP sgw_resource_utilization_go_memstats_pausetotalns go_memstats_pausetotalns\n# TYPE sgw_resource_utilization_go_memstats_pausetotalns gauge\nsgw_resource_utilization_go_memstats_pausetotalns 0\n# HELP sgw_resource_utilization_go_memstats_stackinuse go_memstats_stackinuse\n# TYPE sgw_resource_utilization_go_memstats_stackinuse gauge\nsgw_resource_utilization_go_memstats_stackinuse 0\n# HELP sgw_resource_utilization_go_memstats_stacksys go_memstats_stacksys\n# TYPE sgw_resource_utilization_go_memstats_stacksys gauge\nsgw_resource_utilization_go_memstats_stacksys 0\n# HELP sgw_resource_utilization_go_memstats_sys go_memstats_sys\n# TYPE sgw_resource_utilization_go_memstats_sys gauge\nsgw_resource_utilization_go_memstats_sys 0\n# HELP sgw_resource_utilization_goroutines_high_watermark goroutines_high_watermark\n# TYPE sgw_resource_utilization_goroutines_high_watermark gauge\nsgw_resource_utilization_goroutines_high_watermark 0\n# HELP sgw_resource_utilization_num_goroutines num_goroutines\n# TYPE sgw_resource_utilization_num_goroutines gauge\nsgw_resource_utilization_num_goroutines 0\n# HELP sgw_resource_utilization_process_cpu_percent_utilization process_cpu_percent_utilization\n# TYPE sgw_resource_utilization_process_cpu_percent_utilization gauge\nsgw_resource_utilization_process_cpu_percent_utilization 0\n# HELP sgw_resource_utilization_process_memory_resident process_memory_resident\n# TYPE sgw_resource_utilization_process_memory_resident gauge\nsgw_resource_utilization_process_memory_resident 0\n# HELP sgw_resource_utilization_pub_net_bytes_recv pub_net_bytes_recv\n# TYPE sgw_resource_utilization_pub_net_bytes_recv counter\nsgw_resource_utilization_pub_net_bytes_recv 0\n# HELP sgw_resource_utilization_pub_net_bytes_sent pub_net_bytes_sent\n# TYPE sgw_resource_utilization_pub_net_bytes_sent counter\nsgw_resource_utilization_pub_net_bytes_sent 0\n# HELP sgw_resource_utilization_system_memory_total system_memory_total\n# TYPE sgw_resource_utilization_system_memory_total gauge\nsgw_resource_utilization_system_memory_total 0\n# HELP sgw_resource_utilization_uptime uptime\n# TYPE sgw_resource_utilization_uptime counter\nsgw_resource_utilization_uptime 4.81563855e+10\n# HELP sgw_resource_utilization_warn_count warn_count\n# TYPE sgw_resource_utilization_warn_count counter\nsgw_resource_utilization_warn_count 1\n# HELP sgw_security_auth_failed_count auth_failed_count\n# TYPE sgw_security_auth_failed_count counter\nsgw_security_auth_failed_count{database=\"travel-sample\"} 0\n# HELP sgw_security_auth_success_count auth_success_count\n# TYPE sgw_security_auth_success_count counter\nsgw_security_auth_success_count{database=\"travel-sample\"} 0\n# HELP sgw_security_num_access_errors num_access_errors\n# TYPE sgw_security_num_access_errors counter\nsgw_security_num_access_errors{database=\"travel-sample\"} 0\n# HELP sgw_security_num_docs_rejected num_docs_rejected\n# TYPE sgw_security_num_docs_rejected counter\nsgw_security_num_docs_rejected{database=\"travel-sample\"} 0\n# HELP sgw_security_total_auth_time total_auth_time\n# TYPE sgw_security_total_auth_time gauge\nsgw_security_total_auth_time{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_cancel_cas import_cancel_cas\n# TYPE sgw_shared_bucket_import_import_cancel_cas counter\nsgw_shared_bucket_import_import_cancel_cas{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_count import_count\n# TYPE sgw_shared_bucket_import_import_count counter\nsgw_shared_bucket_import_import_count{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_error_count import_error_count\n# TYPE sgw_shared_bucket_import_import_error_count counter\nsgw_shared_bucket_import_import_error_count{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_high_seq import_high_seq\n# TYPE sgw_shared_bucket_import_import_high_seq counter\nsgw_shared_bucket_import_import_high_seq{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_partitions import_partitions\n# TYPE sgw_shared_bucket_import_import_partitions gauge\nsgw_shared_bucket_import_import_partitions{database=\"travel-sample\"} 16\n# HELP sgw_shared_bucket_import_import_processing_time import_processing_time\n# TYPE sgw_shared_bucket_import_import_processing_time gauge\nsgw_shared_bucket_import_import_processing_time{database=\"travel-sample\"} 0\n# HELP sgw_up up\n# TYPE sgw_up gauge\nsgw_up 1\n" 171 | } 172 | ] 173 | } 174 | ], 175 | "variable": [ 176 | { 177 | "key": "metricsUrl", 178 | "value": "http://localhost:4986", 179 | "type": "string" 180 | } 181 | ] 182 | } -------------------------------------------------------------------------------- /travel-sample/Sync-Gateway-3.0-TravelSample-Environment.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "3d07e746-6b29-46bb-ace6-747a7c66003f", 3 | "name": "Sync Gateway 3.0 TravelSample Environment ", 4 | "values": [ 5 | { 6 | "key": "db", 7 | "value": "travel-sample", 8 | "enabled": true 9 | }, 10 | { 11 | "key": "adminUrl", 12 | "value": "localhost:4985", 13 | "enabled": true 14 | }, 15 | { 16 | "key": "username", 17 | "value": "demo", 18 | "enabled": true 19 | }, 20 | { 21 | "key": "userpass", 22 | "value": "password", 23 | "enabled": true 24 | }, 25 | { 26 | "key": "email", 27 | "value": "demo@example.com", 28 | "enabled": true 29 | }, 30 | { 31 | "key": "publicurl", 32 | "value": "localhost:4984", 33 | "enabled": true 34 | }, 35 | { 36 | "key": "limit", 37 | "value": "5", 38 | "enabled": true 39 | }, 40 | { 41 | "key": "sessionid", 42 | "value": "", 43 | "enabled": true 44 | }, 45 | { 46 | "key": "variable_key", 47 | "value": "variable_value", 48 | "enabled": true 49 | }, 50 | { 51 | "key": "sessionId", 52 | "value": "", 53 | "enabled": true 54 | }, 55 | { 56 | "key": "role", 57 | "value": "owner", 58 | "enabled": true 59 | }, 60 | { 61 | "key": "channelid", 62 | "value": "*", 63 | "enabled": true 64 | }, 65 | { 66 | "key": "doc", 67 | "value": "hotel_10026", 68 | "enabled": true 69 | }, 70 | { 71 | "key": "keys", 72 | "value": "", 73 | "enabled": true 74 | }, 75 | { 76 | "key": "startkey", 77 | "value": "", 78 | "enabled": true 79 | }, 80 | { 81 | "key": "remotedb", 82 | "value": "{{publicUrl}}/{{db}}", 83 | "enabled": true 84 | }, 85 | { 86 | "key": "atts_since", 87 | "value": "[]", 88 | "enabled": true 89 | }, 90 | { 91 | "key": "open_revs", 92 | "value": "", 93 | "enabled": true 94 | }, 95 | { 96 | "key": "doc2", 97 | "value": "{{name}}_doc2", 98 | "enabled": true 99 | }, 100 | { 101 | "key": "batch", 102 | "value": "ok", 103 | "enabled": true 104 | }, 105 | { 106 | "key": "filter", 107 | "value": "", 108 | "enabled": true 109 | }, 110 | { 111 | "key": "channels", 112 | "value": "[{{channelid}}]", 113 | "enabled": true 114 | }, 115 | { 116 | "key": "since", 117 | "value": "", 118 | "enabled": true 119 | }, 120 | { 121 | "key": "endkey", 122 | "value": "", 123 | "enabled": true 124 | }, 125 | { 126 | "key": "attachment", 127 | "value": "image", 128 | "enabled": true 129 | }, 130 | { 131 | "key": "offline", 132 | "value": "true", 133 | "enabled": true 134 | }, 135 | { 136 | "key": "provider", 137 | "value": "", 138 | "enabled": true 139 | }, 140 | { 141 | "key": "code", 142 | "value": "", 143 | "enabled": true 144 | }, 145 | { 146 | "key": "refresh_token", 147 | "value": "", 148 | "enabled": true 149 | }, 150 | { 151 | "key": "ddoc", 152 | "value": "foobar", 153 | "enabled": true 154 | }, 155 | { 156 | "key": "view", 157 | "value": "foobarview", 158 | "enabled": true 159 | }, 160 | { 161 | "key": "ddocrev", 162 | "value": "", 163 | "enabled": true 164 | }, 165 | { 166 | "key": "conflicts", 167 | "value": "true", 168 | "enabled": true 169 | }, 170 | { 171 | "key": "descending", 172 | "value": "false", 173 | "enabled": true 174 | }, 175 | { 176 | "key": "end_key", 177 | "value": "", 178 | "enabled": true 179 | }, 180 | { 181 | "key": "start_key", 182 | "value": "", 183 | "enabled": true 184 | }, 185 | { 186 | "key": "endkey_docid", 187 | "value": "", 188 | "enabled": true 189 | }, 190 | { 191 | "key": "end_key_doc_id", 192 | "value": "", 193 | "enabled": true 194 | }, 195 | { 196 | "key": "include_docs", 197 | "value": "true", 198 | "enabled": true 199 | }, 200 | { 201 | "key": "inclusive_end", 202 | "value": "true", 203 | "enabled": true 204 | }, 205 | { 206 | "key": "group", 207 | "value": "", 208 | "enabled": true 209 | }, 210 | { 211 | "key": "group_level", 212 | "value": "", 213 | "enabled": true 214 | }, 215 | { 216 | "key": "skip", 217 | "value": "", 218 | "enabled": true 219 | }, 220 | { 221 | "key": "stale", 222 | "value": "", 223 | "enabled": true 224 | }, 225 | { 226 | "key": "startkey_docid", 227 | "value": "", 228 | "enabled": true 229 | }, 230 | { 231 | "key": "update_seq", 232 | "value": "false", 233 | "enabled": true 234 | }, 235 | { 236 | "key": "key", 237 | "value": "", 238 | "enabled": true 239 | }, 240 | { 241 | "key": "replicationId", 242 | "value": "repl101", 243 | "enabled": true 244 | }, 245 | { 246 | "key": "body", 247 | "value": "foo", 248 | "enabled": true 249 | }, 250 | { 251 | "key": "newedits", 252 | "value": "true", 253 | "enabled": true 254 | }, 255 | { 256 | "key": "updatedbody", 257 | "value": "bar", 258 | "enabled": true 259 | }, 260 | { 261 | "key": "docid", 262 | "value": "hotel_10025", 263 | "enabled": true 264 | }, 265 | { 266 | "key": "rev", 267 | "value": "", 268 | "enabled": true 269 | }, 270 | { 271 | "key": "bulkbody", 272 | "value": "foobar", 273 | "enabled": true 274 | }, 275 | { 276 | "key": "bulkdocid", 277 | "value": "", 278 | "enabled": true 279 | }, 280 | { 281 | "key": "bulkrev", 282 | "value": "", 283 | "enabled": true 284 | }, 285 | { 286 | "key": "localbody", 287 | "value": "helloworld", 288 | "enabled": true 289 | }, 290 | { 291 | "key": "updatedlocalbody", 292 | "value": "helloworld again", 293 | "enabled": true 294 | }, 295 | { 296 | "key": "user", 297 | "value": "walrususer", 298 | "enabled": true 299 | }, 300 | { 301 | "key": "metricsUrl", 302 | "value": "localhost:4986", 303 | "enabled": true 304 | }, 305 | { 306 | "key": "local_doc", 307 | "value": "", 308 | "enabled": true 309 | }, 310 | { 311 | "key": "style", 312 | "value": "main_only", 313 | "enabled": true 314 | }, 315 | { 316 | "key": "active_only", 317 | "value": "false", 318 | "enabled": true 319 | }, 320 | { 321 | "key": "doc_ids", 322 | "value": "[{{docid}}]", 323 | "enabled": true 324 | }, 325 | { 326 | "key": "feed", 327 | "value": "normal", 328 | "enabled": true 329 | }, 330 | { 331 | "key": "heartbeat", 332 | "value": "0", 333 | "enabled": true 334 | }, 335 | { 336 | "key": "timeout", 337 | "value": "300000", 338 | "enabled": true 339 | }, 340 | { 341 | "key": "include_attachments", 342 | "value": "false", 343 | "enabled": true 344 | }, 345 | { 346 | "key": "include_revs", 347 | "value": "false", 348 | "enabled": true 349 | }, 350 | { 351 | "key": "show_exp", 352 | "value": "true", 353 | "enabled": true 354 | }, 355 | { 356 | "key": "new_edits", 357 | "value": "true", 358 | "enabled": true 359 | }, 360 | { 361 | "key": "access", 362 | "value": "true", 363 | "enabled": true 364 | }, 365 | { 366 | "key": "include_channels", 367 | "value": "true", 368 | "enabled": true 369 | }, 370 | { 371 | "key": "action", 372 | "value": "start", 373 | "enabled": true 374 | }, 375 | { 376 | "key": "revs_limit", 377 | "value": "1", 378 | "enabled": true 379 | }, 380 | { 381 | "key": "local_only", 382 | "value": "false", 383 | "enabled": true 384 | }, 385 | { 386 | "key": "include_error", 387 | "value": "false", 388 | "enabled": true 389 | }, 390 | { 391 | "key": "include_config", 392 | "value": "false", 393 | "enabled": true 394 | }, 395 | { 396 | "key": "preview", 397 | "value": "false", 398 | "enabled": true 399 | }, 400 | { 401 | "key": "level", 402 | "value": "debug", 403 | "enabled": true 404 | }, 405 | { 406 | "key": "logLevel", 407 | "value": "debug", 408 | "enabled": true 409 | }, 410 | { 411 | "key": "include_javascript", 412 | "value": "true", 413 | "enabled": true 414 | }, 415 | { 416 | "key": "include_runtime", 417 | "value": "true", 418 | "enabled": true 419 | }, 420 | { 421 | "key": "newdoc", 422 | "value": "hotel-test01", 423 | "enabled": true 424 | }, 425 | { 426 | "key": "newdoc2", 427 | "value": "", 428 | "enabled": true 429 | }, 430 | { 431 | "key": "attachmentid", 432 | "value": "blob_%2F{{attachment}}", 433 | "enabled": true 434 | }, 435 | { 436 | "key": "userdisabled", 437 | "value": "false", 438 | "enabled": true 439 | }, 440 | { 441 | "key": "publicUrl", 442 | "value": "localhost:4984", 443 | "enabled": true 444 | }, 445 | { 446 | "key": "clusteradmin", 447 | "value": "sgw_cluster", 448 | "enabled": true 449 | }, 450 | { 451 | "key": "dbadmin", 452 | "value": "sgw_admin", 453 | "enabled": true 454 | } 455 | ], 456 | "_postman_variable_scope": "environment", 457 | "_postman_exported_at": "2021-11-23T19:45:17.852Z", 458 | "_postman_exported_using": "Postman/7.36.5" 459 | } 460 | -------------------------------------------------------------------------------- /travel-sample/Sync-Gateway-3.0-TravelSample-Metrics-API.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "2c267672-6a78-4057-959e-3c5679b4d47f", 4 | "name": "Sync Gateway 3.0 TravelSample Metrics API", 5 | "description": "This is a developer preview of the documentation for the Sync Gateway Metrics Rest API.\n", 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 7 | }, 8 | "item": [ 9 | { 10 | "name": "Debugging/monitoring at runtime", 11 | "request": { 12 | "auth": { 13 | "type": "basic", 14 | "basic": [ 15 | { 16 | "key": "username", 17 | "value": "{{clusteradmin}}", 18 | "type": "string" 19 | }, 20 | { 21 | "key": "password", 22 | "value": "password", 23 | "type": "string" 24 | } 25 | ] 26 | }, 27 | "method": "GET", 28 | "header": [], 29 | "url": { 30 | "raw": "{{metricsUrl}}/_expvar", 31 | "host": [ 32 | "{{metricsUrl}}" 33 | ], 34 | "path": [ 35 | "_expvar" 36 | ] 37 | }, 38 | "description": "The ```Expvars``` method returns Sync Gateways' numerous statistics, and other runtime variables, in JSON format.\nMaking them readily available for debugging or performance monitoring purposes.\n\n**See** : [Sync Gateway Statistics Schema](./../stats-monitoring.html) for more details on the metrics collected and reported by Sync Gateway.\n\n" 39 | }, 40 | "response": [ 41 | { 42 | "name": "Expvars Results-Success", 43 | "originalRequest": { 44 | "method": "GET", 45 | "header": [], 46 | "url": { 47 | "raw": "{{metricsUrl}}/_expvar", 48 | "host": [ 49 | "{{metricsUrl}}" 50 | ], 51 | "path": [ 52 | "_expvar" 53 | ] 54 | } 55 | }, 56 | "status": "OK", 57 | "code": 200, 58 | "_postman_previewlanguage": "json", 59 | "header": [ 60 | { 61 | "key": "Content-Encoding", 62 | "value": "gzip" 63 | }, 64 | { 65 | "key": "Content-Type", 66 | "value": "application/json; charset=utf-8" 67 | }, 68 | { 69 | "key": "Server", 70 | "value": "Couchbase Sync Gateway/3.0.0 EE" 71 | }, 72 | { 73 | "key": "Date", 74 | "value": "Mon, 22 Nov 2021 23:21:39 GMT" 75 | }, 76 | { 77 | "key": "Transfer-Encoding", 78 | "value": "chunked" 79 | } 80 | ], 81 | "cookie": [], 82 | "body": "{\n \"cb\": {\n \"ops\": {},\n \"pools\": {}\n },\n \"cmdline\": [\n \"sync_gateway\",\n \"--defaultLogFilePath=/var/log/sync_gateway\",\n \"-adminInterface\",\n \":4985\",\n \"/etc/sync_gateway/sync_gateway.json\"\n ],\n \"goblip\": {},\n \"mc\": {\n \"recv\": {\n \"bytes\": {\n \"0x1f\": 476,\n \"0x89\": 408,\n \"SASL_AUTH\": 408,\n \"SASL_LIST_MECHS\": 1122,\n \"UPR_OPEN\": 408,\n \"total\": 2822\n },\n \"errs\": {},\n \"ops\": {\n \"0x1f\": 17,\n \"0x89\": 17,\n \"SASL_AUTH\": 17,\n \"SASL_LIST_MECHS\": 17,\n \"UPR_OPEN\": 17,\n \"total\": 85\n }\n },\n \"tap\": {\n \"bytes\": {},\n \"errs\": {},\n \"ops\": {}\n },\n \"xmit\": {\n \"bytes\": {\n \"0x1f\": 1684,\n \"0x89\": 629,\n \"SASL_AUTH\": 748,\n \"SASL_LIST_MECHS\": 408,\n \"UPR_CONTROL\": 2329,\n \"UPR_OPEN\": 1497,\n \"UPR_STREAMREQ\": 137664,\n \"total\": 144959\n },\n \"errs\": {},\n \"ops\": {\n \"0x1f\": 17,\n \"0x89\": 17,\n \"SASL_AUTH\": 17,\n \"SASL_LIST_MECHS\": 17,\n \"UPR_CONTROL\": 51,\n \"UPR_OPEN\": 17,\n \"UPR_STREAMREQ\": 1912,\n \"total\": 2048\n }\n }\n },\n \"memstats\": {\n \"Alloc\": 97150584,\n \"TotalAlloc\": 270398120,\n \"Sys\": 215505960,\n \"Lookups\": 0,\n \"Mallocs\": 1289868,\n \"Frees\": 965914,\n \"HeapAlloc\": 97150584,\n \"HeapSys\": 199262208,\n \"HeapIdle\": 95313920,\n \"HeapInuse\": 103948288,\n \"HeapReleased\": 62251008,\n \"HeapObjects\": 323954,\n \"StackInuse\": 2064384,\n \"StackSys\": 2064384,\n \"MSpanInuse\": 498576,\n \"MSpanSys\": 933888,\n \"MCacheInuse\": 7200,\n \"MCacheSys\": 16384,\n \"BuckHashSys\": 1477080,\n \"GCSys\": 10606920,\n \"OtherSys\": 1145096,\n \"NextGC\": 154526672,\n \"LastGC\": 1637623291588021800,\n \"PauseTotalNs\": 6071900,\n \"PauseNs\": [\n 180200,\n 342200,\n 115500,\n 120600,\n 180600,\n 159700,\n 4973100,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n \"PauseEnd\": [\n 1637623288909061400,\n 1637623288914657700,\n 1637623289005815300,\n 1637623289078079100,\n 1637623289107362400,\n 1637623290913936100,\n 1637623291588021800,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n \"NumGC\": 7,\n \"NumForcedGC\": 0,\n \"GCCPUFraction\": 0.0037882450589711383,\n \"EnableGC\": true,\n \"DebugGC\": false,\n \"BySize\": [\n {\n \"Size\": 0,\n \"Mallocs\": 0,\n \"Frees\": 0\n },\n {\n \"Size\": 8,\n \"Mallocs\": 59767,\n \"Frees\": 44352\n },\n {\n \"Size\": 16,\n \"Mallocs\": 366635,\n \"Frees\": 269578\n },\n {\n \"Size\": 24,\n \"Mallocs\": 183240,\n \"Frees\": 132024\n },\n {\n \"Size\": 32,\n \"Mallocs\": 171567,\n \"Frees\": 91792\n },\n {\n \"Size\": 48,\n \"Mallocs\": 118405,\n \"Frees\": 92725\n },\n {\n \"Size\": 64,\n \"Mallocs\": 30431,\n \"Frees\": 21381\n },\n {\n \"Size\": 80,\n \"Mallocs\": 32020,\n \"Frees\": 23634\n },\n {\n \"Size\": 96,\n \"Mallocs\": 27664,\n \"Frees\": 19645\n },\n {\n \"Size\": 112,\n \"Mallocs\": 8770,\n \"Frees\": 6353\n },\n {\n \"Size\": 128,\n \"Mallocs\": 6129,\n \"Frees\": 4879\n },\n {\n \"Size\": 144,\n \"Mallocs\": 1442,\n \"Frees\": 964\n },\n {\n \"Size\": 160,\n \"Mallocs\": 14356,\n \"Frees\": 10323\n },\n {\n \"Size\": 176,\n \"Mallocs\": 5562,\n \"Frees\": 4575\n },\n {\n \"Size\": 192,\n \"Mallocs\": 1057,\n \"Frees\": 745\n },\n {\n \"Size\": 208,\n \"Mallocs\": 16258,\n \"Frees\": 11668\n },\n {\n \"Size\": 224,\n \"Mallocs\": 1974,\n \"Frees\": 1384\n },\n {\n \"Size\": 240,\n \"Mallocs\": 399,\n \"Frees\": 220\n },\n {\n \"Size\": 256,\n \"Mallocs\": 1525,\n \"Frees\": 1111\n },\n {\n \"Size\": 288,\n \"Mallocs\": 3597,\n \"Frees\": 2571\n },\n {\n \"Size\": 320,\n \"Mallocs\": 18214,\n \"Frees\": 12834\n },\n {\n \"Size\": 352,\n \"Mallocs\": 1489,\n \"Frees\": 1081\n },\n {\n \"Size\": 384,\n \"Mallocs\": 608,\n \"Frees\": 185\n },\n {\n \"Size\": 416,\n \"Mallocs\": 298,\n \"Frees\": 212\n },\n {\n \"Size\": 448,\n \"Mallocs\": 1299,\n \"Frees\": 661\n },\n {\n \"Size\": 480,\n \"Mallocs\": 81,\n \"Frees\": 56\n },\n {\n \"Size\": 512,\n \"Mallocs\": 628,\n \"Frees\": 497\n },\n {\n \"Size\": 576,\n \"Mallocs\": 716,\n \"Frees\": 541\n },\n {\n \"Size\": 640,\n \"Mallocs\": 989,\n \"Frees\": 743\n },\n {\n \"Size\": 704,\n \"Mallocs\": 303,\n \"Frees\": 199\n },\n {\n \"Size\": 768,\n \"Mallocs\": 321,\n \"Frees\": 224\n },\n {\n \"Size\": 896,\n \"Mallocs\": 825,\n \"Frees\": 432\n },\n {\n \"Size\": 1024,\n \"Mallocs\": 1385,\n \"Frees\": 663\n },\n {\n \"Size\": 1152,\n \"Mallocs\": 1234,\n \"Frees\": 1025\n },\n {\n \"Size\": 1280,\n \"Mallocs\": 1414,\n \"Frees\": 942\n },\n {\n \"Size\": 1408,\n \"Mallocs\": 2325,\n \"Frees\": 1632\n },\n {\n \"Size\": 1536,\n \"Mallocs\": 2625,\n \"Frees\": 1920\n },\n {\n \"Size\": 1792,\n \"Mallocs\": 3696,\n \"Frees\": 2671\n },\n {\n \"Size\": 2048,\n \"Mallocs\": 533,\n \"Frees\": 365\n },\n {\n \"Size\": 2304,\n \"Mallocs\": 149,\n \"Frees\": 93\n },\n {\n \"Size\": 2688,\n \"Mallocs\": 119,\n \"Frees\": 55\n },\n {\n \"Size\": 3072,\n \"Mallocs\": 77,\n \"Frees\": 51\n },\n {\n \"Size\": 3200,\n \"Mallocs\": 12,\n \"Frees\": 9\n },\n {\n \"Size\": 3456,\n \"Mallocs\": 80,\n \"Frees\": 59\n },\n {\n \"Size\": 4096,\n \"Mallocs\": 747,\n \"Frees\": 637\n },\n {\n \"Size\": 4864,\n \"Mallocs\": 61,\n \"Frees\": 25\n },\n {\n \"Size\": 5376,\n \"Mallocs\": 102,\n \"Frees\": 60\n },\n {\n \"Size\": 6144,\n \"Mallocs\": 41,\n \"Frees\": 27\n },\n {\n \"Size\": 6528,\n \"Mallocs\": 19,\n \"Frees\": 13\n },\n {\n \"Size\": 6784,\n \"Mallocs\": 16,\n \"Frees\": 13\n },\n {\n \"Size\": 6912,\n \"Mallocs\": 14,\n \"Frees\": 13\n },\n {\n \"Size\": 8192,\n \"Mallocs\": 314,\n \"Frees\": 196\n },\n {\n \"Size\": 9472,\n \"Mallocs\": 554,\n \"Frees\": 515\n },\n {\n \"Size\": 9728,\n \"Mallocs\": 23,\n \"Frees\": 10\n },\n {\n \"Size\": 10240,\n \"Mallocs\": 20,\n \"Frees\": 13\n },\n {\n \"Size\": 10880,\n \"Mallocs\": 13,\n \"Frees\": 9\n },\n {\n \"Size\": 12288,\n \"Mallocs\": 80,\n \"Frees\": 56\n },\n {\n \"Size\": 13568,\n \"Mallocs\": 43,\n \"Frees\": 27\n },\n {\n \"Size\": 14336,\n \"Mallocs\": 14,\n \"Frees\": 11\n },\n {\n \"Size\": 16384,\n \"Mallocs\": 99,\n \"Frees\": 63\n },\n {\n \"Size\": 18432,\n \"Mallocs\": 222,\n \"Frees\": 52\n }\n ]\n },\n \"syncgateway\": {\n \"global\": {\n \"resource_utilization\": {\n \"admin_net_bytes_recv\": 0,\n \"admin_net_bytes_sent\": 0,\n \"error_count\": 0,\n \"go_memstats_heapalloc\": 0,\n \"go_memstats_heapidle\": 0,\n \"go_memstats_heapinuse\": 0,\n \"go_memstats_heapreleased\": 0,\n \"go_memstats_pausetotalns\": 0,\n \"go_memstats_stackinuse\": 0,\n \"go_memstats_stacksys\": 0,\n \"go_memstats_sys\": 0,\n \"goroutines_high_watermark\": 0,\n \"num_goroutines\": 0,\n \"process_cpu_percent_utilization\": 0,\n \"process_memory_resident\": 0,\n \"pub_net_bytes_recv\": 0,\n \"pub_net_bytes_sent\": 0,\n \"system_memory_total\": 0,\n \"warn_count\": 1,\n \"uptime\": 10661081800\n }\n },\n \"per_db\": {\n \"travel-sample\": {\n \"cache\": {\n \"abandoned_seqs\": 0,\n \"chan_cache_active_revs\": 0,\n \"chan_cache_bypass_count\": 0,\n \"chan_cache_channels_added\": 0,\n \"chan_cache_channels_evicted_inactive\": 0,\n \"chan_cache_channels_evicted_nru\": 0,\n \"chan_cache_compact_count\": 0,\n \"chan_cache_compact_time\": 0,\n \"chan_cache_hits\": 0,\n \"chan_cache_max_entries\": 0,\n \"chan_cache_misses\": 0,\n \"chan_cache_num_channels\": 0,\n \"chan_cache_pending_queries\": 0,\n \"chan_cache_removal_revs\": 0,\n \"chan_cache_tombstone_revs\": 0,\n \"high_seq_cached\": 0,\n \"high_seq_stable\": 0,\n \"non_mobile_ignored_count\": 0,\n \"num_active_channels\": 0,\n \"num_skipped_seqs\": 0,\n \"pending_seq_len\": 0,\n \"rev_cache_bypass\": 0,\n \"rev_cache_hits\": 0,\n \"rev_cache_misses\": 0,\n \"skipped_seq_len\": 0,\n \"view_queries\": 0\n },\n \"cbl_replication_pull\": {\n \"attachment_pull_bytes\": 0,\n \"attachment_pull_count\": 0,\n \"max_pending\": 0,\n \"num_replications_active\": 0,\n \"num_pull_repl_active_continuous\": 0,\n \"num_pull_repl_active_one_shot\": 0,\n \"num_pull_repl_caught_up\": 0,\n \"num_pull_repl_total_caught_up\": 0,\n \"num_pull_repl_since_zero\": 0,\n \"num_pull_repl_total_continuous\": 0,\n \"num_pull_repl_total_one_shot\": 0,\n \"request_changes_count\": 0,\n \"request_changes_time\": 0,\n \"rev_processing_time\": 0,\n \"rev_send_count\": 0,\n \"rev_send_latency\": 0\n },\n \"cbl_replication_push\": {\n \"attachment_push_bytes\": 0,\n \"attachment_push_count\": 0,\n \"doc_push_count\": 0,\n \"propose_change_count\": 0,\n \"propose_change_time\": 0,\n \"sync_function_count\": 0,\n \"sync_function_time\": 0,\n \"write_processing_time\": 0\n },\n \"database\": {\n \"conflict_write_count\": 0,\n \"crc32c_match_count\": 0,\n \"dcp_caching_count\": 0,\n \"dcp_caching_time\": 0,\n \"dcp_received_count\": 0,\n \"dcp_received_time\": 0,\n \"doc_reads_bytes_blip\": 0,\n \"doc_writes_bytes\": 0,\n \"doc_writes_bytes_blip\": 0,\n \"doc_writes_xattr_bytes\": 0,\n \"high_seq_feed\": 0,\n \"num_doc_reads_blip\": 0,\n \"num_doc_reads_rest\": 0,\n \"num_doc_writes\": 0,\n \"num_replications_active\": 0,\n \"num_replications_total\": 0,\n \"num_tombstones_compacted\": 0,\n \"sequence_assigned_count\": 0,\n \"sequence_get_count\": 2,\n \"sequence_incr_count\": 0,\n \"sequence_released_count\": 0,\n \"sequence_reserved_count\": 0,\n \"warn_channel_name_size_count\": 0,\n \"warn_channels_per_doc_count\": 0,\n \"warn_grants_per_doc_count\": 0,\n \"warn_xattr_size_count\": 0,\n \"cache_feed\": {},\n \"import_feed\": {}\n },\n \"gsi_views\": {\n \"access_query_count\": 0,\n \"access_query_error_count\": 0,\n \"access_query_time\": 0,\n \"allDocs_query_count\": 0,\n \"allDocs_query_error_count\": 0,\n \"allDocs_query_time\": 0,\n \"channelsStar_query_count\": 0,\n \"channelsStar_query_error_count\": 0,\n \"channelsStar_query_time\": 0,\n \"channels_query_count\": 0,\n \"channels_query_error_count\": 0,\n \"channels_query_time\": 0,\n \"principals_query_count\": 0,\n \"principals_query_error_count\": 0,\n \"principals_query_time\": 0,\n \"resync_query_count\": 0,\n \"resync_query_error_count\": 0,\n \"resync_query_time\": 0,\n \"roleAccess_query_count\": 0,\n \"roleAccess_query_error_count\": 0,\n \"roleAccess_query_time\": 0,\n \"sequences_query_count\": 0,\n \"sequences_query_error_count\": 0,\n \"sequences_query_time\": 0,\n \"sessions_query_count\": 0,\n \"sessions_query_error_count\": 0,\n \"sessions_query_time\": 0,\n \"tombstones_query_count\": 0,\n \"tombstones_query_error_count\": 0,\n \"tombstones_query_time\": 0\n },\n \"security\": {\n \"auth_failed_count\": 0,\n \"auth_success_count\": 0,\n \"num_access_errors\": 0,\n \"num_docs_rejected\": 0,\n \"total_auth_time\": 0\n },\n \"shared_bucket_import\": {\n \"import_count\": 0,\n \"import_cancel_cas\": 0,\n \"import_error_count\": 0,\n \"import_processing_time\": 0,\n \"import_high_seq\": 0,\n \"import_partitions\": 16\n }\n }\n },\n \"per_replication\": {}\n }\n}" 83 | }, 84 | { 85 | "name": "OK - indicates success", 86 | "originalRequest": { 87 | "method": "GET", 88 | "header": [], 89 | "url": { 90 | "raw": "{{metricsUrl}}/_expvar", 91 | "host": [ 92 | "{{metricsUrl}}" 93 | ], 94 | "path": [ 95 | "_expvar" 96 | ] 97 | } 98 | }, 99 | "status": "OK", 100 | "code": 200, 101 | "_postman_previewlanguage": "json", 102 | "header": [ 103 | { 104 | "key": "Content-Type", 105 | "value": "application/json" 106 | } 107 | ], 108 | "cookie": [], 109 | "body": "{\n \"cmdline\": {},\n \"memstats\": {},\n \"cb\": {},\n \"mc\": {},\n \"syncGateway_changeCache\": {\n \"maxPending\": {},\n \"lag-tap-0000ms\": {},\n \"lag-queue-0000ms\": {},\n \"lag-total-0000ms\": {},\n \"outOfOrder\": {},\n \"view_queries\": {}\n },\n \"syncGateway_db\": {\n \"channelChangesFeeds\": {},\n \"channelLogAdds\": {},\n \"channelLogAppends\": {},\n \"channelLogCacheHits\": {},\n \"channelLogRewrites\": {},\n \"channelLogRewriteCollisions\": {},\n \"document_gets\": {},\n \"revisionCache_adds\": {},\n \"revisionCache_hits\": {},\n \"revisionCache_misses\": {},\n \"revs_added\": {},\n \"sequence_gets\": {},\n \"sequence_reserves\": {}\n },\n \"syncgateway\": {\n \"global\": {\n \"resource_utilization\": {\n \"admin_net_bytes_recv\": 5669006,\n \"admin_net_bytes_sent\": 51059695,\n \"error_count\": -419626,\n \"go_memstats_heapalloc\": 76186951,\n \"go_memstats_heapidle\": -57870390,\n \"go_memstats_heapinuse\": -41888315,\n \"go_memstats_heapreleased\": 58812201,\n \"go_memstats_pausetotalns\": -90762235,\n \"go_memstats_stackinuse\": -49194587,\n \"go_memstats_stacksys\": 44673172,\n \"go_memstats_sys\": 50422318,\n \"goroutines_high_watermark\": -85435126,\n \"num_goroutines\": -5442029,\n \"process_cpu_percent_utilization\": 12179981,\n \"process_memory_resident\": -70780112,\n \"pub_net_bytes_recv\": -62166019,\n \"pub_net_bytes_sent\": 49943280,\n \"system_memory_total\": 20464858,\n \"warn_count\": 1513217\n }\n },\n \"per_db\": [\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n },\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n }\n ],\n \"per_replication\": [\n {\n \"$replication_id\": {\n \"sgr_active\": true,\n \"sgr_docs_checked_sent\": 60966279,\n \"sgr_num_attachments_transferred\": -12680724,\n \"sgr_num_attachment_bytes_transferred\": 60977299,\n \"sgr_num_docs_failed_to_push\": 37148037,\n \"sgr_num_docs_pushed\": -64876276\n }\n },\n {\n \"$replication_id\": {\n \"sgr_active\": true,\n \"sgr_docs_checked_sent\": -14762040,\n \"sgr_num_attachments_transferred\": -9347796,\n \"sgr_num_attachment_bytes_transferred\": -30841306,\n \"sgr_num_docs_failed_to_push\": 39403997,\n \"sgr_num_docs_pushed\": -21794495\n }\n }\n ]\n }\n}" 110 | } 111 | ] 112 | }, 113 | { 114 | "name": "Debugging/monitoring runtime stats in Prometheus format", 115 | "request": { 116 | "auth": { 117 | "type": "basic", 118 | "basic": [ 119 | { 120 | "key": "username", 121 | "value": "{{clusteradmin}}", 122 | "type": "string" 123 | }, 124 | { 125 | "key": "password", 126 | "value": "password", 127 | "type": "string" 128 | } 129 | ] 130 | }, 131 | "method": "GET", 132 | "header": [], 133 | "url": { 134 | "raw": "{{metricsUrl}}/_metrics", 135 | "host": [ 136 | "{{metricsUrl}}" 137 | ], 138 | "path": [ 139 | "_metrics" 140 | ] 141 | }, 142 | "description": "The ```_metrics``` method returns Sync Gateway's statistics and other runtime variables in **Prometheus** format.\nThis makes for a convenient feed for your debugging or performance monitoring purposes.\n\n- For more details on the metrics collected and reported by Sync Gateway -- see: [Sync Gateway Statistics Schema](./../stats-monitoring.html).\n- For more details on Monitoring Sync Gateway using the ```_metrics``` feed -- see: our blog on [Monitoring and Visualization of Couchbase Sync Gateway with Prometheus and Grafana](https://blog.couchbase.com/monitoring-and-visualization-of-couchbase-sync-gateway-with-prometheus-and-grafana/)\n\n" 143 | }, 144 | "response": [ 145 | { 146 | "name": "Prometheus Stats-Success", 147 | "originalRequest": { 148 | "method": "GET", 149 | "header": [], 150 | "url": { 151 | "raw": "{{metricsUrl}}/_metrics", 152 | "host": [ 153 | "{{metricsUrl}}" 154 | ], 155 | "path": [ 156 | "_metrics" 157 | ] 158 | } 159 | }, 160 | "status": "OK", 161 | "code": 200, 162 | "_postman_previewlanguage": "plain", 163 | "header": [ 164 | { 165 | "key": "Content-Encoding", 166 | "value": "gzip" 167 | }, 168 | { 169 | "key": "Content-Type", 170 | "value": "text/plain; version=0.0.4; charset=utf-8" 171 | }, 172 | { 173 | "key": "Server", 174 | "value": "Couchbase Sync Gateway/3.0.0 EE" 175 | }, 176 | { 177 | "key": "Date", 178 | "value": "Mon, 22 Nov 2021 23:22:16 GMT" 179 | }, 180 | { 181 | "key": "Transfer-Encoding", 182 | "value": "chunked" 183 | } 184 | ], 185 | "cookie": [], 186 | "body": "# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0001155\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0001254\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0001597\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0001806\ngo_gc_duration_seconds{quantile=\"1\"} 0.0049731\ngo_gc_duration_seconds_sum 0.006334\ngo_gc_duration_seconds_count 9\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 205\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.16.6\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.74725568e+08\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 5.77613776e+08\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.485504e+06\n# HELP go_memstats_frees_total Total number of frees.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 1.886974e+06\n# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.\n# TYPE go_memstats_gc_cpu_fraction gauge\ngo_memstats_gc_cpu_fraction 0.0005904367920689457\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.7448552e+07\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.74725568e+08\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 1.14655232e+08\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 2.86031872e+08\n# HELP go_memstats_heap_objects Number of allocated objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 163872\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 6.078464e+07\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 4.00687104e+08\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.6376233111257215e+09\n# HELP go_memstats_lookups_total Total number of pointer lookups.\n# TYPE go_memstats_lookups_total counter\ngo_memstats_lookups_total 0\n# HELP go_memstats_mallocs_total Total number of mallocs.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 2.050846e+06\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 7200\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 16384\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 450568\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 1.130496e+06\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 2.86283328e+08\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 890672\n# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 1.96608e+06\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 1.96608e+06\n# HELP go_memstats_sys_bytes Number of bytes obtained from system.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 4.23624792e+08\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 14\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 5.05\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.048576e+06\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 63\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.08596992e+08\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.6376232877e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.537163264e+09\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\n# TYPE process_virtual_memory_max_bytes gauge\nprocess_virtual_memory_max_bytes -1\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP sgw_cache_abandoned_seqs abandoned_seqs\n# TYPE sgw_cache_abandoned_seqs counter\nsgw_cache_abandoned_seqs{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_active_revs chan_cache_active_revs\n# TYPE sgw_cache_chan_cache_active_revs gauge\nsgw_cache_chan_cache_active_revs{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_bypass_count chan_cache_bypass_count\n# TYPE sgw_cache_chan_cache_bypass_count counter\nsgw_cache_chan_cache_bypass_count{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_channels_added chan_cache_channels_added\n# TYPE sgw_cache_chan_cache_channels_added counter\nsgw_cache_chan_cache_channels_added{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_channels_evicted_inactive chan_cache_channels_evicted_inactive\n# TYPE sgw_cache_chan_cache_channels_evicted_inactive counter\nsgw_cache_chan_cache_channels_evicted_inactive{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_channels_evicted_nru chan_cache_channels_evicted_nru\n# TYPE sgw_cache_chan_cache_channels_evicted_nru counter\nsgw_cache_chan_cache_channels_evicted_nru{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_compact_count chan_cache_compact_count\n# TYPE sgw_cache_chan_cache_compact_count counter\nsgw_cache_chan_cache_compact_count{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_compact_time chan_cache_compact_time\n# TYPE sgw_cache_chan_cache_compact_time counter\nsgw_cache_chan_cache_compact_time{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_hits chan_cache_hits\n# TYPE sgw_cache_chan_cache_hits counter\nsgw_cache_chan_cache_hits{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_max_entries chan_cache_max_entries\n# TYPE sgw_cache_chan_cache_max_entries gauge\nsgw_cache_chan_cache_max_entries{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_misses chan_cache_misses\n# TYPE sgw_cache_chan_cache_misses counter\nsgw_cache_chan_cache_misses{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_num_channels chan_cache_num_channels\n# TYPE sgw_cache_chan_cache_num_channels gauge\nsgw_cache_chan_cache_num_channels{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_pending_queries chan_cache_pending_queries\n# TYPE sgw_cache_chan_cache_pending_queries gauge\nsgw_cache_chan_cache_pending_queries{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_removal_revs chan_cache_removal_revs\n# TYPE sgw_cache_chan_cache_removal_revs gauge\nsgw_cache_chan_cache_removal_revs{database=\"travel-sample\"} 0\n# HELP sgw_cache_chan_cache_tombstone_revs chan_cache_tombstone_revs\n# TYPE sgw_cache_chan_cache_tombstone_revs gauge\nsgw_cache_chan_cache_tombstone_revs{database=\"travel-sample\"} 0\n# HELP sgw_cache_high_seq_cached high_seq_cached\n# TYPE sgw_cache_high_seq_cached counter\nsgw_cache_high_seq_cached{database=\"travel-sample\"} 0\n# HELP sgw_cache_high_seq_stable high_seq_stable\n# TYPE sgw_cache_high_seq_stable counter\nsgw_cache_high_seq_stable{database=\"travel-sample\"} 0\n# HELP sgw_cache_non_mobile_ignored_count non_mobile_ignored_count\n# TYPE sgw_cache_non_mobile_ignored_count counter\nsgw_cache_non_mobile_ignored_count{database=\"travel-sample\"} 0\n# HELP sgw_cache_num_active_channels num_active_channels\n# TYPE sgw_cache_num_active_channels gauge\nsgw_cache_num_active_channels{database=\"travel-sample\"} 0\n# HELP sgw_cache_num_skipped_seqs num_skipped_seqs\n# TYPE sgw_cache_num_skipped_seqs counter\nsgw_cache_num_skipped_seqs{database=\"travel-sample\"} 0\n# HELP sgw_cache_pending_seq_len pending_seq_len\n# TYPE sgw_cache_pending_seq_len gauge\nsgw_cache_pending_seq_len{database=\"travel-sample\"} 0\n# HELP sgw_cache_rev_cache_bypass rev_cache_bypass\n# TYPE sgw_cache_rev_cache_bypass gauge\nsgw_cache_rev_cache_bypass{database=\"travel-sample\"} 0\n# HELP sgw_cache_rev_cache_hits rev_cache_hits\n# TYPE sgw_cache_rev_cache_hits counter\nsgw_cache_rev_cache_hits{database=\"travel-sample\"} 0\n# HELP sgw_cache_rev_cache_misses rev_cache_misses\n# TYPE sgw_cache_rev_cache_misses counter\nsgw_cache_rev_cache_misses{database=\"travel-sample\"} 0\n# HELP sgw_cache_skipped_seq_len skipped_seq_len\n# TYPE sgw_cache_skipped_seq_len gauge\nsgw_cache_skipped_seq_len{database=\"travel-sample\"} 0\n# HELP sgw_cache_view_queries view_queries\n# TYPE sgw_cache_view_queries counter\nsgw_cache_view_queries{database=\"travel-sample\"} 0\n# HELP sgw_database_conflict_write_count conflict_write_count\n# TYPE sgw_database_conflict_write_count counter\nsgw_database_conflict_write_count{database=\"travel-sample\"} 0\n# HELP sgw_database_crc32c_match_count crc32c_match_count\n# TYPE sgw_database_crc32c_match_count gauge\nsgw_database_crc32c_match_count{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_caching_count dcp_caching_count\n# TYPE sgw_database_dcp_caching_count gauge\nsgw_database_dcp_caching_count{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_caching_time dcp_caching_time\n# TYPE sgw_database_dcp_caching_time gauge\nsgw_database_dcp_caching_time{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_received_count dcp_received_count\n# TYPE sgw_database_dcp_received_count gauge\nsgw_database_dcp_received_count{database=\"travel-sample\"} 0\n# HELP sgw_database_dcp_received_time dcp_received_time\n# TYPE sgw_database_dcp_received_time gauge\nsgw_database_dcp_received_time{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_reads_bytes_blip doc_reads_bytes_blip\n# TYPE sgw_database_doc_reads_bytes_blip counter\nsgw_database_doc_reads_bytes_blip{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_writes_bytes doc_writes_bytes\n# TYPE sgw_database_doc_writes_bytes counter\nsgw_database_doc_writes_bytes{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_writes_bytes_blip doc_writes_bytes_blip\n# TYPE sgw_database_doc_writes_bytes_blip counter\nsgw_database_doc_writes_bytes_blip{database=\"travel-sample\"} 0\n# HELP sgw_database_doc_writes_xattr_bytes doc_writes_xattr_bytes\n# TYPE sgw_database_doc_writes_xattr_bytes counter\nsgw_database_doc_writes_xattr_bytes{database=\"travel-sample\"} 0\n# HELP sgw_database_high_seq_feed high_seq_feed\n# TYPE sgw_database_high_seq_feed counter\nsgw_database_high_seq_feed{database=\"travel-sample\"} 0\n# HELP sgw_database_num_doc_reads_blip num_doc_reads_blip\n# TYPE sgw_database_num_doc_reads_blip counter\nsgw_database_num_doc_reads_blip{database=\"travel-sample\"} 0\n# HELP sgw_database_num_doc_reads_rest num_doc_reads_rest\n# TYPE sgw_database_num_doc_reads_rest counter\nsgw_database_num_doc_reads_rest{database=\"travel-sample\"} 0\n# HELP sgw_database_num_doc_writes num_doc_writes\n# TYPE sgw_database_num_doc_writes counter\nsgw_database_num_doc_writes{database=\"travel-sample\"} 0\n# HELP sgw_database_num_replications_active num_replications_active\n# TYPE sgw_database_num_replications_active gauge\nsgw_database_num_replications_active{database=\"travel-sample\"} 0\n# HELP sgw_database_num_replications_total num_replications_total\n# TYPE sgw_database_num_replications_total counter\nsgw_database_num_replications_total{database=\"travel-sample\"} 0\n# HELP sgw_database_num_tombstones_compacted num_tombstones_compacted\n# TYPE sgw_database_num_tombstones_compacted counter\nsgw_database_num_tombstones_compacted{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_assigned_count sequence_assigned_count\n# TYPE sgw_database_sequence_assigned_count counter\nsgw_database_sequence_assigned_count{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_get_count sequence_get_count\n# TYPE sgw_database_sequence_get_count counter\nsgw_database_sequence_get_count{database=\"travel-sample\"} 2\n# HELP sgw_database_sequence_incr_count sequence_incr_count\n# TYPE sgw_database_sequence_incr_count counter\nsgw_database_sequence_incr_count{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_released_count sequence_released_count\n# TYPE sgw_database_sequence_released_count counter\nsgw_database_sequence_released_count{database=\"travel-sample\"} 0\n# HELP sgw_database_sequence_reserved_count sequence_reserved_count\n# TYPE sgw_database_sequence_reserved_count counter\nsgw_database_sequence_reserved_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_channel_name_size_count warn_channel_name_size_count\n# TYPE sgw_database_warn_channel_name_size_count counter\nsgw_database_warn_channel_name_size_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_channels_per_doc_count warn_channels_per_doc_count\n# TYPE sgw_database_warn_channels_per_doc_count counter\nsgw_database_warn_channels_per_doc_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_grants_per_doc_count warn_grants_per_doc_count\n# TYPE sgw_database_warn_grants_per_doc_count counter\nsgw_database_warn_grants_per_doc_count{database=\"travel-sample\"} 0\n# HELP sgw_database_warn_xattr_size_count warn_xattr_size_count\n# TYPE sgw_database_warn_xattr_size_count counter\nsgw_database_warn_xattr_size_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_access_count access_count\n# TYPE sgw_gsi_views_access_count counter\nsgw_gsi_views_access_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_access_error_count access_error_count\n# TYPE sgw_gsi_views_access_error_count counter\nsgw_gsi_views_access_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_access_time access_time\n# TYPE sgw_gsi_views_access_time counter\nsgw_gsi_views_access_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_allDocs_count allDocs_count\n# TYPE sgw_gsi_views_allDocs_count counter\nsgw_gsi_views_allDocs_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_allDocs_error_count allDocs_error_count\n# TYPE sgw_gsi_views_allDocs_error_count counter\nsgw_gsi_views_allDocs_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_allDocs_time allDocs_time\n# TYPE sgw_gsi_views_allDocs_time counter\nsgw_gsi_views_allDocs_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channelsStar_count channelsStar_count\n# TYPE sgw_gsi_views_channelsStar_count counter\nsgw_gsi_views_channelsStar_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channelsStar_error_count channelsStar_error_count\n# TYPE sgw_gsi_views_channelsStar_error_count counter\nsgw_gsi_views_channelsStar_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channelsStar_time channelsStar_time\n# TYPE sgw_gsi_views_channelsStar_time counter\nsgw_gsi_views_channelsStar_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channels_count channels_count\n# TYPE sgw_gsi_views_channels_count counter\nsgw_gsi_views_channels_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channels_error_count channels_error_count\n# TYPE sgw_gsi_views_channels_error_count counter\nsgw_gsi_views_channels_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_channels_time channels_time\n# TYPE sgw_gsi_views_channels_time counter\nsgw_gsi_views_channels_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_principals_count principals_count\n# TYPE sgw_gsi_views_principals_count counter\nsgw_gsi_views_principals_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_principals_error_count principals_error_count\n# TYPE sgw_gsi_views_principals_error_count counter\nsgw_gsi_views_principals_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_principals_time principals_time\n# TYPE sgw_gsi_views_principals_time counter\nsgw_gsi_views_principals_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_resync_count resync_count\n# TYPE sgw_gsi_views_resync_count counter\nsgw_gsi_views_resync_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_resync_error_count resync_error_count\n# TYPE sgw_gsi_views_resync_error_count counter\nsgw_gsi_views_resync_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_resync_time resync_time\n# TYPE sgw_gsi_views_resync_time counter\nsgw_gsi_views_resync_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_roleAccess_count roleAccess_count\n# TYPE sgw_gsi_views_roleAccess_count counter\nsgw_gsi_views_roleAccess_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_roleAccess_error_count roleAccess_error_count\n# TYPE sgw_gsi_views_roleAccess_error_count counter\nsgw_gsi_views_roleAccess_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_roleAccess_time roleAccess_time\n# TYPE sgw_gsi_views_roleAccess_time counter\nsgw_gsi_views_roleAccess_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sequences_count sequences_count\n# TYPE sgw_gsi_views_sequences_count counter\nsgw_gsi_views_sequences_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sequences_error_count sequences_error_count\n# TYPE sgw_gsi_views_sequences_error_count counter\nsgw_gsi_views_sequences_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sequences_time sequences_time\n# TYPE sgw_gsi_views_sequences_time counter\nsgw_gsi_views_sequences_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sessions_count sessions_count\n# TYPE sgw_gsi_views_sessions_count counter\nsgw_gsi_views_sessions_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sessions_error_count sessions_error_count\n# TYPE sgw_gsi_views_sessions_error_count counter\nsgw_gsi_views_sessions_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_sessions_time sessions_time\n# TYPE sgw_gsi_views_sessions_time counter\nsgw_gsi_views_sessions_time{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_tombstones_count tombstones_count\n# TYPE sgw_gsi_views_tombstones_count counter\nsgw_gsi_views_tombstones_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_tombstones_error_count tombstones_error_count\n# TYPE sgw_gsi_views_tombstones_error_count counter\nsgw_gsi_views_tombstones_error_count{database=\"travel-sample\"} 0\n# HELP sgw_gsi_views_tombstones_time tombstones_time\n# TYPE sgw_gsi_views_tombstones_time counter\nsgw_gsi_views_tombstones_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_attachment_pull_bytes attachment_pull_bytes\n# TYPE sgw_replication_pull_attachment_pull_bytes counter\nsgw_replication_pull_attachment_pull_bytes{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_attachment_pull_count attachment_pull_count\n# TYPE sgw_replication_pull_attachment_pull_count counter\nsgw_replication_pull_attachment_pull_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_max_pending max_pending\n# TYPE sgw_replication_pull_max_pending gauge\nsgw_replication_pull_max_pending{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_active_continuous num_pull_repl_active_continuous\n# TYPE sgw_replication_pull_num_pull_repl_active_continuous gauge\nsgw_replication_pull_num_pull_repl_active_continuous{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_active_one_shot num_pull_repl_active_one_shot\n# TYPE sgw_replication_pull_num_pull_repl_active_one_shot gauge\nsgw_replication_pull_num_pull_repl_active_one_shot{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_caught_up num_pull_repl_caught_up\n# TYPE sgw_replication_pull_num_pull_repl_caught_up gauge\nsgw_replication_pull_num_pull_repl_caught_up{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_since_zero num_pull_repl_since_zero\n# TYPE sgw_replication_pull_num_pull_repl_since_zero counter\nsgw_replication_pull_num_pull_repl_since_zero{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_total_caught_up num_pull_repl_total_caught_up\n# TYPE sgw_replication_pull_num_pull_repl_total_caught_up gauge\nsgw_replication_pull_num_pull_repl_total_caught_up{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_total_continuous num_pull_repl_total_continuous\n# TYPE sgw_replication_pull_num_pull_repl_total_continuous gauge\nsgw_replication_pull_num_pull_repl_total_continuous{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_pull_repl_total_one_shot num_pull_repl_total_one_shot\n# TYPE sgw_replication_pull_num_pull_repl_total_one_shot gauge\nsgw_replication_pull_num_pull_repl_total_one_shot{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_num_replications_active num_replications_active\n# TYPE sgw_replication_pull_num_replications_active gauge\nsgw_replication_pull_num_replications_active{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_request_changes_count request_changes_count\n# TYPE sgw_replication_pull_request_changes_count counter\nsgw_replication_pull_request_changes_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_request_changes_time request_changes_time\n# TYPE sgw_replication_pull_request_changes_time counter\nsgw_replication_pull_request_changes_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_rev_processing_time rev_processing_time\n# TYPE sgw_replication_pull_rev_processing_time gauge\nsgw_replication_pull_rev_processing_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_rev_send_count rev_send_count\n# TYPE sgw_replication_pull_rev_send_count counter\nsgw_replication_pull_rev_send_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_pull_rev_send_latency rev_send_latency\n# TYPE sgw_replication_pull_rev_send_latency counter\nsgw_replication_pull_rev_send_latency{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_attachment_push_bytes attachment_push_bytes\n# TYPE sgw_replication_push_attachment_push_bytes counter\nsgw_replication_push_attachment_push_bytes{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_attachment_push_count attachment_push_count\n# TYPE sgw_replication_push_attachment_push_count counter\nsgw_replication_push_attachment_push_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_doc_push_count doc_push_count\n# TYPE sgw_replication_push_doc_push_count gauge\nsgw_replication_push_doc_push_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_propose_change_count propose_change_count\n# TYPE sgw_replication_push_propose_change_count counter\nsgw_replication_push_propose_change_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_propose_change_time propose_change_time\n# TYPE sgw_replication_push_propose_change_time counter\nsgw_replication_push_propose_change_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_sync_function_count sync_function_count\n# TYPE sgw_replication_push_sync_function_count counter\nsgw_replication_push_sync_function_count{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_sync_function_time sync_function_time\n# TYPE sgw_replication_push_sync_function_time counter\nsgw_replication_push_sync_function_time{database=\"travel-sample\"} 0\n# HELP sgw_replication_push_write_processing_time write_processing_time\n# TYPE sgw_replication_push_write_processing_time gauge\nsgw_replication_push_write_processing_time{database=\"travel-sample\"} 0\n# HELP sgw_resource_utilization_admin_net_bytes_recv admin_net_bytes_recv\n# TYPE sgw_resource_utilization_admin_net_bytes_recv counter\nsgw_resource_utilization_admin_net_bytes_recv 0\n# HELP sgw_resource_utilization_admin_net_bytes_sent admin_net_bytes_sent\n# TYPE sgw_resource_utilization_admin_net_bytes_sent counter\nsgw_resource_utilization_admin_net_bytes_sent 0\n# HELP sgw_resource_utilization_error_count error_count\n# TYPE sgw_resource_utilization_error_count counter\nsgw_resource_utilization_error_count 0\n# HELP sgw_resource_utilization_go_memstats_heapalloc go_memstats_heapalloc\n# TYPE sgw_resource_utilization_go_memstats_heapalloc gauge\nsgw_resource_utilization_go_memstats_heapalloc 0\n# HELP sgw_resource_utilization_go_memstats_heapidle go_memstats_heapidle\n# TYPE sgw_resource_utilization_go_memstats_heapidle gauge\nsgw_resource_utilization_go_memstats_heapidle 0\n# HELP sgw_resource_utilization_go_memstats_heapinuse go_memstats_heapinuse\n# TYPE sgw_resource_utilization_go_memstats_heapinuse gauge\nsgw_resource_utilization_go_memstats_heapinuse 0\n# HELP sgw_resource_utilization_go_memstats_heapreleased go_memstats_heapreleased\n# TYPE sgw_resource_utilization_go_memstats_heapreleased gauge\nsgw_resource_utilization_go_memstats_heapreleased 0\n# HELP sgw_resource_utilization_go_memstats_pausetotalns go_memstats_pausetotalns\n# TYPE sgw_resource_utilization_go_memstats_pausetotalns gauge\nsgw_resource_utilization_go_memstats_pausetotalns 0\n# HELP sgw_resource_utilization_go_memstats_stackinuse go_memstats_stackinuse\n# TYPE sgw_resource_utilization_go_memstats_stackinuse gauge\nsgw_resource_utilization_go_memstats_stackinuse 0\n# HELP sgw_resource_utilization_go_memstats_stacksys go_memstats_stacksys\n# TYPE sgw_resource_utilization_go_memstats_stacksys gauge\nsgw_resource_utilization_go_memstats_stacksys 0\n# HELP sgw_resource_utilization_go_memstats_sys go_memstats_sys\n# TYPE sgw_resource_utilization_go_memstats_sys gauge\nsgw_resource_utilization_go_memstats_sys 0\n# HELP sgw_resource_utilization_goroutines_high_watermark goroutines_high_watermark\n# TYPE sgw_resource_utilization_goroutines_high_watermark gauge\nsgw_resource_utilization_goroutines_high_watermark 0\n# HELP sgw_resource_utilization_num_goroutines num_goroutines\n# TYPE sgw_resource_utilization_num_goroutines gauge\nsgw_resource_utilization_num_goroutines 0\n# HELP sgw_resource_utilization_process_cpu_percent_utilization process_cpu_percent_utilization\n# TYPE sgw_resource_utilization_process_cpu_percent_utilization gauge\nsgw_resource_utilization_process_cpu_percent_utilization 0\n# HELP sgw_resource_utilization_process_memory_resident process_memory_resident\n# TYPE sgw_resource_utilization_process_memory_resident gauge\nsgw_resource_utilization_process_memory_resident 0\n# HELP sgw_resource_utilization_pub_net_bytes_recv pub_net_bytes_recv\n# TYPE sgw_resource_utilization_pub_net_bytes_recv counter\nsgw_resource_utilization_pub_net_bytes_recv 0\n# HELP sgw_resource_utilization_pub_net_bytes_sent pub_net_bytes_sent\n# TYPE sgw_resource_utilization_pub_net_bytes_sent counter\nsgw_resource_utilization_pub_net_bytes_sent 0\n# HELP sgw_resource_utilization_system_memory_total system_memory_total\n# TYPE sgw_resource_utilization_system_memory_total gauge\nsgw_resource_utilization_system_memory_total 0\n# HELP sgw_resource_utilization_uptime uptime\n# TYPE sgw_resource_utilization_uptime counter\nsgw_resource_utilization_uptime 4.81563855e+10\n# HELP sgw_resource_utilization_warn_count warn_count\n# TYPE sgw_resource_utilization_warn_count counter\nsgw_resource_utilization_warn_count 1\n# HELP sgw_security_auth_failed_count auth_failed_count\n# TYPE sgw_security_auth_failed_count counter\nsgw_security_auth_failed_count{database=\"travel-sample\"} 0\n# HELP sgw_security_auth_success_count auth_success_count\n# TYPE sgw_security_auth_success_count counter\nsgw_security_auth_success_count{database=\"travel-sample\"} 0\n# HELP sgw_security_num_access_errors num_access_errors\n# TYPE sgw_security_num_access_errors counter\nsgw_security_num_access_errors{database=\"travel-sample\"} 0\n# HELP sgw_security_num_docs_rejected num_docs_rejected\n# TYPE sgw_security_num_docs_rejected counter\nsgw_security_num_docs_rejected{database=\"travel-sample\"} 0\n# HELP sgw_security_total_auth_time total_auth_time\n# TYPE sgw_security_total_auth_time gauge\nsgw_security_total_auth_time{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_cancel_cas import_cancel_cas\n# TYPE sgw_shared_bucket_import_import_cancel_cas counter\nsgw_shared_bucket_import_import_cancel_cas{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_count import_count\n# TYPE sgw_shared_bucket_import_import_count counter\nsgw_shared_bucket_import_import_count{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_error_count import_error_count\n# TYPE sgw_shared_bucket_import_import_error_count counter\nsgw_shared_bucket_import_import_error_count{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_high_seq import_high_seq\n# TYPE sgw_shared_bucket_import_import_high_seq counter\nsgw_shared_bucket_import_import_high_seq{database=\"travel-sample\"} 0\n# HELP sgw_shared_bucket_import_import_partitions import_partitions\n# TYPE sgw_shared_bucket_import_import_partitions gauge\nsgw_shared_bucket_import_import_partitions{database=\"travel-sample\"} 16\n# HELP sgw_shared_bucket_import_import_processing_time import_processing_time\n# TYPE sgw_shared_bucket_import_import_processing_time gauge\nsgw_shared_bucket_import_import_processing_time{database=\"travel-sample\"} 0\n# HELP sgw_up up\n# TYPE sgw_up gauge\nsgw_up 1\n" 187 | }, 188 | { 189 | "name": "OK - indicates success", 190 | "originalRequest": { 191 | "method": "GET", 192 | "header": [], 193 | "url": { 194 | "raw": "{{metricsUrl}}/_metrics", 195 | "host": [ 196 | "{{metricsUrl}}" 197 | ], 198 | "path": [ 199 | "_metrics" 200 | ] 201 | } 202 | }, 203 | "status": "OK", 204 | "code": 200, 205 | "_postman_previewlanguage": "json", 206 | "header": [ 207 | { 208 | "key": "Content-Type", 209 | "value": "application/json" 210 | } 211 | ], 212 | "cookie": [], 213 | "body": "{\n \"cmdline\": {},\n \"memstats\": {},\n \"cb\": {},\n \"mc\": {},\n \"syncGateway_changeCache\": {\n \"maxPending\": {},\n \"lag-tap-0000ms\": {},\n \"lag-queue-0000ms\": {},\n \"lag-total-0000ms\": {},\n \"outOfOrder\": {},\n \"view_queries\": {}\n },\n \"syncGateway_db\": {\n \"channelChangesFeeds\": {},\n \"channelLogAdds\": {},\n \"channelLogAppends\": {},\n \"channelLogCacheHits\": {},\n \"channelLogRewrites\": {},\n \"channelLogRewriteCollisions\": {},\n \"document_gets\": {},\n \"revisionCache_adds\": {},\n \"revisionCache_hits\": {},\n \"revisionCache_misses\": {},\n \"revs_added\": {},\n \"sequence_gets\": {},\n \"sequence_reserves\": {}\n },\n \"syncgateway\": {\n \"global\": {\n \"resource_utilization\": {\n \"admin_net_bytes_recv\": -57311046,\n \"admin_net_bytes_sent\": -5228289,\n \"error_count\": 44107022,\n \"go_memstats_heapalloc\": 91403591,\n \"go_memstats_heapidle\": -44357816,\n \"go_memstats_heapinuse\": -32866358,\n \"go_memstats_heapreleased\": -12494040,\n \"go_memstats_pausetotalns\": -49163664,\n \"go_memstats_stackinuse\": 59567577,\n \"go_memstats_stacksys\": 12893464,\n \"go_memstats_sys\": -24421981,\n \"goroutines_high_watermark\": 61595771,\n \"num_goroutines\": 5616588,\n \"process_cpu_percent_utilization\": -95103476,\n \"process_memory_resident\": 82145930,\n \"pub_net_bytes_recv\": 36535680,\n \"pub_net_bytes_sent\": -89928270,\n \"system_memory_total\": -75210282,\n \"warn_count\": 94429437\n }\n },\n \"per_db\": [\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n },\n {\n \"cache\": {},\n \"database\": {},\n \"security\": {}\n }\n ],\n \"per_replication\": [\n {\n \"$replication_id\": {\n \"sgr_active\": false,\n \"sgr_docs_checked_sent\": 98750922,\n \"sgr_num_attachments_transferred\": -16408056,\n \"sgr_num_attachment_bytes_transferred\": 66431901,\n \"sgr_num_docs_failed_to_push\": -15732903,\n \"sgr_num_docs_pushed\": -385332\n }\n },\n {\n \"$replication_id\": {\n \"sgr_active\": false,\n \"sgr_docs_checked_sent\": -89302600,\n \"sgr_num_attachments_transferred\": -64865268,\n \"sgr_num_attachment_bytes_transferred\": -57628620,\n \"sgr_num_docs_failed_to_push\": 39121396,\n \"sgr_num_docs_pushed\": -88218518\n }\n }\n ]\n }\n}" 214 | } 215 | ] 216 | } 217 | ], 218 | "variable": [ 219 | { 220 | "key": "metricsUrl", 221 | "value": "http://localhost:4986", 222 | "type": "string" 223 | } 224 | ] 225 | } -------------------------------------------------------------------------------- /travel-sample/Sync-Gateway-3.0-TravelSample-Public-API.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "33af2850-d99e-4466-a81e-cb1281f94b23", 4 | "name": "Sync Gateway 3.0 TravelSample Public API", 5 | "description": "This yaml API spec documents the Sync Gateway Public REST API.\n\nThe swagger spec isn’t officially supported or actively maintained. It is offered as a convenient starting point for developers.\n", 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 7 | }, 8 | "item": [ 9 | { 10 | "name": "{db}", 11 | "item": [ 12 | { 13 | "name": "{doc}", 14 | "item": [ 15 | { 16 | "name": "{attachment}", 17 | "item": [ 18 | { 19 | "name": "Get attachment", 20 | "event": [ 21 | { 22 | "listen": "test", 23 | "script": { 24 | "exec": [ 25 | "pm.test(\"Get Doc Success Test\", function () {", 26 | " pm.response.to.have.status(200);", 27 | " var jsonData = pm.response.json();", 28 | " var revId = jsonData[\"_rev\"];", 29 | " pm.environment.set(\"rev\",revId);", 30 | "});" 31 | ], 32 | "type": "text/javascript" 33 | } 34 | } 35 | ], 36 | "request": { 37 | "auth": { 38 | "type": "basic", 39 | "basic": [ 40 | { 41 | "key": "username", 42 | "value": "{{username}}", 43 | "type": "string" 44 | }, 45 | { 46 | "key": "password", 47 | "value": "password", 48 | "type": "string" 49 | } 50 | ] 51 | }, 52 | "method": "GET", 53 | "header": [], 54 | "url": { 55 | "raw": "{{publicUrl}}/{{db}}/{{newdoc}}/{{attachment}}?rev={{rev}}", 56 | "host": [ 57 | "{{publicUrl}}" 58 | ], 59 | "path": [ 60 | "{{db}}", 61 | "{{newdoc}}", 62 | "{{attachment}}" 63 | ], 64 | "query": [ 65 | { 66 | "key": "rev", 67 | "value": "{{rev}}", 68 | "description": "Revision identifier of the parent revision the new one should replace. (Not used when creating a new document.)" 69 | } 70 | ] 71 | }, 72 | "description": "This request retrieves a file attachment associated with the document. The raw data of the associated attachment is returned (just as if you were accessing a static file). The Content-Type response header is the same content type set when the document attachment was added to the database.\n\nTo remove an attachment from a document, simply update the `_attachments` dictionary of the document in the PUT `/{db}/{id}` request. From then on, the attachment will not be replicated but will still reside in the Couchbase Server bucket (see open ticket [#1648](https://github.com/couchbase/sync_gateway/issues/1648)).\n" 73 | }, 74 | "response": [ 75 | { 76 | "name": "Not Found, the specified database, document or attachment was not found.", 77 | "originalRequest": { 78 | "method": "GET", 79 | "header": [ 80 | { 81 | "description": "Added as a part of security scheme: apikey", 82 | "key": "Cookie", 83 | "value": "" 84 | } 85 | ], 86 | "url": { 87 | "raw": "{{publicUrl}}/{{db}}/{{doc}}/{{attachment}}?rev=", 88 | "host": [ 89 | "{{publicUrl}}" 90 | ], 91 | "path": [ 92 | "{{db}}", 93 | "{{doc}}", 94 | "{{attachment}}" 95 | ], 96 | "query": [ 97 | { 98 | "key": "rev", 99 | "value": "" 100 | } 101 | ], 102 | "variable": [ 103 | { 104 | "key": "db", 105 | "value": "", 106 | "description": "(Required) Database name" 107 | }, 108 | { 109 | "key": "doc", 110 | "value": "", 111 | "description": "(Required) Document ID" 112 | }, 113 | { 114 | "key": "attachment", 115 | "value": "", 116 | "description": "(Required) Attachment name. This value must be URL encoded. For example, if the attachment name is `blob_/avatar`, the path component passed to the URL should be `blob_%2Favatar` (tested with [URLEncoder](https://www.urlencoder.org/))." 117 | } 118 | ] 119 | } 120 | }, 121 | "status": "Not Found", 122 | "code": 404, 123 | "_postman_previewlanguage": "text", 124 | "header": [ 125 | { 126 | "key": "Content-Type", 127 | "value": "text/plain" 128 | } 129 | ], 130 | "cookie": [], 131 | "body": "" 132 | }, 133 | { 134 | "name": "The message body contains the attachment, in the format specified in the Content-Type header.", 135 | "originalRequest": { 136 | "method": "GET", 137 | "header": [ 138 | { 139 | "description": "Added as a part of security scheme: apikey", 140 | "key": "Cookie", 141 | "value": "" 142 | } 143 | ], 144 | "url": { 145 | "raw": "{{publicUrl}}/{{db}}/{{doc}}/{{attachment}}?rev=", 146 | "host": [ 147 | "{{publicUrl}}" 148 | ], 149 | "path": [ 150 | "{{db}}", 151 | "{{doc}}", 152 | "{{attachment}}" 153 | ], 154 | "query": [ 155 | { 156 | "key": "rev", 157 | "value": "" 158 | } 159 | ], 160 | "variable": [ 161 | { 162 | "key": "db", 163 | "value": "", 164 | "description": "(Required) Database name" 165 | }, 166 | { 167 | "key": "doc", 168 | "value": "", 169 | "description": "(Required) Document ID" 170 | }, 171 | { 172 | "key": "attachment", 173 | "value": "", 174 | "description": "(Required) Attachment name. This value must be URL encoded. For example, if the attachment name is `blob_/avatar`, the path component passed to the URL should be `blob_%2Favatar` (tested with [URLEncoder](https://www.urlencoder.org/))." 175 | } 176 | ] 177 | } 178 | }, 179 | "status": "OK", 180 | "code": 200, 181 | "_postman_previewlanguage": "json", 182 | "header": [ 183 | { 184 | "key": "Content-Type", 185 | "value": "application/json" 186 | } 187 | ], 188 | "cookie": [], 189 | "body": "\"incididunt elit commodo laborum\"" 190 | }, 191 | { 192 | "name": "Not Modified, the attachment wasn't modified if ETag equals the If-None-Match header", 193 | "originalRequest": { 194 | "method": "GET", 195 | "header": [ 196 | { 197 | "description": "Added as a part of security scheme: apikey", 198 | "key": "Cookie", 199 | "value": "" 200 | } 201 | ], 202 | "url": { 203 | "raw": "{{publicUrl}}/{{db}}/{{doc}}/{{attachment}}?rev=", 204 | "host": [ 205 | "{{publicUrl}}" 206 | ], 207 | "path": [ 208 | "{{db}}", 209 | "{{doc}}", 210 | "{{attachment}}" 211 | ], 212 | "query": [ 213 | { 214 | "key": "rev", 215 | "value": "" 216 | } 217 | ], 218 | "variable": [ 219 | { 220 | "key": "db", 221 | "value": "", 222 | "description": "(Required) Database name" 223 | }, 224 | { 225 | "key": "doc", 226 | "value": "", 227 | "description": "(Required) Document ID" 228 | }, 229 | { 230 | "key": "attachment", 231 | "value": "", 232 | "description": "(Required) Attachment name. This value must be URL encoded. For example, if the attachment name is `blob_/avatar`, the path component passed to the URL should be `blob_%2Favatar` (tested with [URLEncoder](https://www.urlencoder.org/))." 233 | } 234 | ] 235 | } 236 | }, 237 | "status": "Not Modified", 238 | "code": 304, 239 | "_postman_previewlanguage": "text", 240 | "header": [ 241 | { 242 | "key": "Content-Type", 243 | "value": "text/plain" 244 | } 245 | ], 246 | "cookie": [], 247 | "body": "" 248 | } 249 | ] 250 | }, 251 | { 252 | "name": "Add or update attachment", 253 | "event": [ 254 | { 255 | "listen": "test", 256 | "script": { 257 | "exec": [ 258 | "pm.test(\"Add Doc Attachment Success Test\", function () {", 259 | " pm.response.to.have.status(201);", 260 | " var jsonData = pm.response.json();", 261 | " var docId = jsonData[\"id\"];", 262 | " pm.expect(docId).to.eql(pm.environment.get(\"newdoc\"));", 263 | " var revId = jsonData[\"rev\"];", 264 | " pm.environment.set(\"rev\",revId);", 265 | "});" 266 | ], 267 | "type": "text/javascript" 268 | } 269 | } 270 | ], 271 | "request": { 272 | "auth": { 273 | "type": "basic", 274 | "basic": [ 275 | { 276 | "key": "username", 277 | "value": "{{username}}", 278 | "type": "string" 279 | }, 280 | { 281 | "key": "password", 282 | "value": "password", 283 | "type": "string" 284 | } 285 | ] 286 | }, 287 | "method": "PUT", 288 | "header": [ 289 | { 290 | "key": "Content-Type", 291 | "value": "application/json" 292 | } 293 | ], 294 | "body": { 295 | "mode": "file", 296 | "file": { 297 | "src": "/Users/priya.rajagopal/Downloads/Hotelcalifornia.jpg" 298 | } 299 | }, 300 | "url": { 301 | "raw": "{{publicUrl}}/{{db}}/{{newdoc}}/{{attachment}}?rev={{rev}}", 302 | "host": [ 303 | "{{publicUrl}}" 304 | ], 305 | "path": [ 306 | "{{db}}", 307 | "{{newdoc}}", 308 | "{{attachment}}" 309 | ], 310 | "query": [ 311 | { 312 | "key": "rev", 313 | "value": "{{rev}}", 314 | "description": "Revision identifier of the parent revision the new one should replace. (Not used when creating a new document.)" 315 | } 316 | ] 317 | }, 318 | "description": "This request adds or updates the supplied request content as an attachment to the specified document, the maximum content size of an attachment is 20MB. The attachment name must be a URL-encoded string (the file name). You must also supply either the rev query parameter or the If-Match HTTP header for validation, and the Content-Type headers (to set the attachment content type).\n\n When uploading an attachment using an existing attachment name, the corresponding stored content of the database will be updated. Because you must supply the revision information to add an attachment to the document, this serves as validation to update the existing attachment.\n\n Uploading an attachment updates the corresponding document revision. Revisions are tracked for the parent document, not individual attachments.\n\n To remove an attachment from a document, simply update the `_attachments` dictionary of the document in the PUT `/{db}/{id}` request. From then on, the attachment will not be replicated but will still reside in the Couchbase Server bucket (see open ticket [#1648](https://github.com/couchbase/sync_gateway/issues/1648)).\n" 319 | }, 320 | "response": [ 321 | { 322 | "name": "Conflict, the document revision wasn't specified or it's not the latest.", 323 | "originalRequest": { 324 | "method": "PUT", 325 | "header": [ 326 | { 327 | "description": "Added as a part of security scheme: apikey", 328 | "key": "Cookie", 329 | "value": "" 330 | }, 331 | { 332 | "description": "Attachment Content-Type", 333 | "key": "Content-Type", 334 | "value": "incididunt elit commodo laborum" 335 | } 336 | ], 337 | "body": { 338 | "mode": "file", 339 | "file": {}, 340 | "options": { 341 | "raw": { 342 | "language": "json" 343 | } 344 | } 345 | }, 346 | "url": { 347 | "raw": "{{publicUrl}}/{{db}}/{{doc}}/{{attachment}}?rev=", 348 | "host": [ 349 | "{{publicUrl}}" 350 | ], 351 | "path": [ 352 | "{{db}}", 353 | "{{doc}}", 354 | "{{attachment}}" 355 | ], 356 | "query": [ 357 | { 358 | "key": "rev", 359 | "value": "" 360 | } 361 | ], 362 | "variable": [ 363 | { 364 | "key": "db", 365 | "value": "", 366 | "description": "(Required) Database name" 367 | }, 368 | { 369 | "key": "doc", 370 | "value": "", 371 | "description": "(Required) Document ID" 372 | }, 373 | { 374 | "key": "attachment", 375 | "value": "", 376 | "description": "(Required) Attachment name. This value must be URL encoded. For example, if the attachment name is `blob_/avatar`, the path component passed to the URL should be `blob_%2Favatar` (tested with [URLEncoder](https://www.urlencoder.org/))." 377 | } 378 | ] 379 | } 380 | }, 381 | "status": "Conflict", 382 | "code": 409, 383 | "_postman_previewlanguage": "text", 384 | "header": [ 385 | { 386 | "key": "Content-Type", 387 | "value": "text/plain" 388 | } 389 | ], 390 | "cookie": [], 391 | "body": "" 392 | }, 393 | { 394 | "name": "Operation completed successfully", 395 | "originalRequest": { 396 | "method": "PUT", 397 | "header": [ 398 | { 399 | "description": "Added as a part of security scheme: apikey", 400 | "key": "Cookie", 401 | "value": "" 402 | }, 403 | { 404 | "description": "Attachment Content-Type", 405 | "key": "Content-Type", 406 | "value": "incididunt elit commodo laborum" 407 | } 408 | ], 409 | "body": { 410 | "mode": "file", 411 | "file": {}, 412 | "options": { 413 | "raw": { 414 | "language": "json" 415 | } 416 | } 417 | }, 418 | "url": { 419 | "raw": "{{publicUrl}}/{{db}}/{{doc}}/{{attachment}}?rev=", 420 | "host": [ 421 | "{{publicUrl}}" 422 | ], 423 | "path": [ 424 | "{{db}}", 425 | "{{doc}}", 426 | "{{attachment}}" 427 | ], 428 | "query": [ 429 | { 430 | "key": "rev", 431 | "value": "" 432 | } 433 | ], 434 | "variable": [ 435 | { 436 | "key": "db", 437 | "value": "", 438 | "description": "(Required) Database name" 439 | }, 440 | { 441 | "key": "doc", 442 | "value": "", 443 | "description": "(Required) Document ID" 444 | }, 445 | { 446 | "key": "attachment", 447 | "value": "", 448 | "description": "(Required) Attachment name. This value must be URL encoded. For example, if the attachment name is `blob_/avatar`, the path component passed to the URL should be `blob_%2Favatar` (tested with [URLEncoder](https://www.urlencoder.org/))." 449 | } 450 | ] 451 | } 452 | }, 453 | "status": "OK", 454 | "code": 200, 455 | "_postman_previewlanguage": "json", 456 | "header": [ 457 | { 458 | "key": "Content-Type", 459 | "value": "application/json" 460 | } 461 | ], 462 | "cookie": [], 463 | "body": "{\n \"id\": \"culpa ut\",\n \"rev\": \"pariatur Lorem\",\n \"ok\": true\n}" 464 | } 465 | ] 466 | } 467 | ] 468 | }, 469 | { 470 | "name": "Create or update document", 471 | "event": [ 472 | { 473 | "listen": "test", 474 | "script": { 475 | "exec": [ 476 | "pm.test(\"Create/Update Doc Success Test\", function () {", 477 | " pm.response.to.have.status(201);", 478 | " var jsonData = pm.response.json();", 479 | " var docId = jsonData[\"id\"];", 480 | " pm.expect(docId).to.eql(pm.environment.get(\"newdoc\"));", 481 | " var revId = jsonData[\"rev\"];", 482 | " pm.environment.set(\"rev\",revId);", 483 | "});" 484 | ], 485 | "type": "text/javascript" 486 | } 487 | } 488 | ], 489 | "request": { 490 | "auth": { 491 | "type": "basic", 492 | "basic": [ 493 | { 494 | "key": "username", 495 | "value": "{{username}}", 496 | "type": "string" 497 | }, 498 | { 499 | "key": "password", 500 | "value": "password", 501 | "type": "string" 502 | } 503 | ] 504 | }, 505 | "method": "PUT", 506 | "header": [ 507 | { 508 | "key": "Content-Type", 509 | "value": "application/json" 510 | } 511 | ], 512 | "body": { 513 | "mode": "raw", 514 | "raw": " { \n \"type\" : \"hotel\", \n \"address\": \"123 Main Street\", \n \"city\": \"Mountain View\",\n \"country\": \"USA\",\n \"description\": \"Welcome to the Hotel California. Such a lovely place (such a lovely place).Such a lovely face Plenty of room at the Hotel California. Any time of year (any time of year) you can find it here\",\n \"directions\": \"Metro Line A\",\n \"name\": \"Hotel California\",\n \"pets_ok\": false,\n \"phone\": \"555-234-1234\",\n \"free_breakfast\": true,\n \"free_internet\": true,\n \"free_parking\": false,\n \"state\": \"CA\",\n \"title\": \"Welcome to Hotel California\",\n \"tollfree\": null,\n \"url\": \"http://www.hotelcalifornia.com\",\n \"vacancy\": true\n } ", 515 | "options": { 516 | "raw": { 517 | "language": "json" 518 | } 519 | } 520 | }, 521 | "url": { 522 | "raw": "{{publicUrl}}/{{db}}/{{newdoc}}?new_edits={{new_edits}}&rev={{rev}}", 523 | "host": [ 524 | "{{publicUrl}}" 525 | ], 526 | "path": [ 527 | "{{db}}", 528 | "{{newdoc}}" 529 | ], 530 | "query": [ 531 | { 532 | "key": "new_edits", 533 | "value": "{{new_edits}}", 534 | "description": "Default is true. Setting this to false indicates that the request body is an already-existing revision that should be directly inserted into the database, instead of a modification to apply to the current document. (This mode is used by the replicato.) This option must be used in conjunction with the `_revisions` property in the request body." 535 | }, 536 | { 537 | "key": "rev", 538 | "value": "{{rev}}", 539 | "description": "(Required) Revision identifier of the revision to update. It must be the last revision in the history." 540 | } 541 | ] 542 | }, 543 | "description": "This request creates a new document or creates a new revision of an existing document. It enables you to specify the identifier for a new document rather than letting the software create an identifier. If you want to create a new document and let the software create an identifier, use the POST /db request.\nIf the document specified by doc does not exist, a new document is created and assigned the identifier specified in doc. If the document already exists, the document is updated with the JSON document in the message body and given a new revision. The maximum size allowed for a document is 20MB.\n\nSince Sync Gateway 1.3, an expiry property (`_exp`) can also be specified to purge the document after a given time. If **convergence** is enabled (introduced in Sync Gateway 1.5), the behaviour of the expiry feature changes in the following way: when the expiry value is reached, instead of getting purged, the **active** revision of the document is tombstoned. If there is another non-tombstoned revision for this document (i.e a conflict) it will become the active revision. The tombstoned revision will be purged when the server's metadata purge interval is reached.\n" 544 | }, 545 | "response": [ 546 | { 547 | "name": "The response is a JSON document that contains the following objects", 548 | "originalRequest": { 549 | "method": "PUT", 550 | "header": [ 551 | { 552 | "description": "Added as a part of security scheme: apikey", 553 | "key": "Cookie", 554 | "value": "" 555 | } 556 | ], 557 | "body": { 558 | "mode": "raw", 559 | "raw": "{\n \"_id\": \"\",\n \"_rev\": \"\",\n \"_exp\": \"\",\n \"_revisions\": {\n \"start\": \"\",\n \"ids\": [\n \"\",\n \"\"\n ]\n },\n \"_attachments\": {\n \"attachment_name\": {\n \"content_type\": \"\"\n }\n }\n}", 560 | "options": { 561 | "raw": { 562 | "language": "json" 563 | } 564 | } 565 | }, 566 | "url": { 567 | "raw": "{{publicUrl}}/{{db}}/{{doc}}?new_edits=true&rev=", 568 | "host": [ 569 | "{{publicUrl}}" 570 | ], 571 | "path": [ 572 | "{{db}}", 573 | "{{doc}}" 574 | ], 575 | "query": [ 576 | { 577 | "key": "new_edits", 578 | "value": "true" 579 | }, 580 | { 581 | "key": "rev", 582 | "value": "" 583 | } 584 | ], 585 | "variable": [ 586 | { 587 | "key": "db", 588 | "value": "", 589 | "description": "(Required) Database name" 590 | }, 591 | { 592 | "key": "doc", 593 | "value": "", 594 | "description": "(Required) Document ID" 595 | } 596 | ] 597 | } 598 | }, 599 | "status": "OK", 600 | "code": 200, 601 | "_postman_previewlanguage": "json", 602 | "header": [ 603 | { 604 | "key": "Content-Type", 605 | "value": "application/json" 606 | } 607 | ], 608 | "cookie": [], 609 | "body": "{\n \"id\": \"culpa ut\",\n \"rev\": \"pariatur Lorem\",\n \"ok\": true\n}" 610 | } 611 | ] 612 | }, 613 | { 614 | "name": "Get document", 615 | "event": [ 616 | { 617 | "listen": "test", 618 | "script": { 619 | "exec": [ 620 | "pm.test(\"Get Doc Success Test\", function () {", 621 | " pm.response.to.have.status(200);", 622 | " var jsonData = pm.response.json();", 623 | " var revId = jsonData[\"_rev\"];", 624 | " pm.environment.set(\"rev\",revId);", 625 | "});" 626 | ], 627 | "type": "text/javascript" 628 | } 629 | } 630 | ], 631 | "request": { 632 | "auth": { 633 | "type": "basic", 634 | "basic": [ 635 | { 636 | "key": "username", 637 | "value": "{{username}}", 638 | "type": "string" 639 | }, 640 | { 641 | "key": "password", 642 | "value": "password", 643 | "type": "string" 644 | } 645 | ] 646 | }, 647 | "method": "GET", 648 | "header": [], 649 | "url": { 650 | "raw": "{{publicUrl}}/{{db}}/{{newdoc}}?rev={{rev}}&attachments={{include_attachments}}&atts_since={{atts_since}}&open_revs={{open_revs}}&revs={{include_revs}}&show_exp={{show_exp}}", 651 | "host": [ 652 | "{{publicUrl}}" 653 | ], 654 | "path": [ 655 | "{{db}}", 656 | "{{newdoc}}" 657 | ], 658 | "query": [ 659 | { 660 | "key": "rev", 661 | "value": "{{rev}}", 662 | "description": "Revision identifier of the revision to get. By default, Sync Gateway returns the current revision. This parameter is generally only needed for conflict resolution. For example where the app might need to retrieve a conflicting leaf revision that isn't the current revision." 663 | }, 664 | { 665 | "key": "attachments", 666 | "value": "{{include_attachments}}", 667 | "description": "Default is false. Include attachment bodies in response." 668 | }, 669 | { 670 | "key": "atts_since", 671 | "value": "{{atts_since}}", 672 | "description": "Include attachments only since specified revisions. Does not include attachments for specified revisions." 673 | }, 674 | { 675 | "key": "open_revs", 676 | "value": "{{open_revs}}", 677 | "description": "Option to fetch specified revisions of the document. The value can be `all` to fetch all leaf revisions or an array of revision numbers (i.e. open_revs=[\"rev1\", \"rev2\"]). Only [leaf revision](glossary.html) bodies that haven't been pruned are guaranteed to be returned.\n\nIf this option is specified the response will be in multipart format. Use the `Accept: application/json` request header to get the result as a JSON object.\n" 678 | }, 679 | { 680 | "key": "revs", 681 | "value": "{{include_revs}}", 682 | "description": "Default is false. Indicates whether to include a _revisions property for each document in the response, which contains a revision history of the document. The length of the returned revision tree can be specified with the `revs_limit` querystring parameter." 683 | }, 684 | { 685 | "key": "show_exp", 686 | "value": "{{show_exp}}", 687 | "description": "Whether to show the _exp property in the response." 688 | } 689 | ] 690 | }, 691 | "description": "This request retrieves a document from a database." 692 | }, 693 | "response": [ 694 | { 695 | "name": "The message body contains the following objects in a JSON document.", 696 | "originalRequest": { 697 | "method": "GET", 698 | "header": [ 699 | { 700 | "description": "Added as a part of security scheme: apikey", 701 | "key": "Cookie", 702 | "value": "" 703 | } 704 | ], 705 | "url": { 706 | "raw": "{{publicUrl}}/{{db}}/{{doc}}?rev=&attachments=false&atts_since=,&open_revs=,&revs=false&show_exp=false", 707 | "host": [ 708 | "{{publicUrl}}" 709 | ], 710 | "path": [ 711 | "{{db}}", 712 | "{{doc}}" 713 | ], 714 | "query": [ 715 | { 716 | "key": "rev", 717 | "value": "" 718 | }, 719 | { 720 | "key": "attachments", 721 | "value": "false" 722 | }, 723 | { 724 | "key": "atts_since", 725 | "value": "," 726 | }, 727 | { 728 | "key": "open_revs", 729 | "value": "," 730 | }, 731 | { 732 | "key": "revs", 733 | "value": "false" 734 | }, 735 | { 736 | "key": "show_exp", 737 | "value": "false" 738 | } 739 | ], 740 | "variable": [ 741 | { 742 | "key": "db", 743 | "value": "", 744 | "description": "(Required) Database name" 745 | }, 746 | { 747 | "key": "doc", 748 | "value": "", 749 | "description": "(Required) Document ID" 750 | } 751 | ] 752 | } 753 | }, 754 | "status": "OK", 755 | "code": 200, 756 | "_postman_previewlanguage": "json", 757 | "header": [ 758 | { 759 | "key": "Content-Type", 760 | "value": "application/json" 761 | } 762 | ], 763 | "cookie": [], 764 | "body": "{}" 765 | } 766 | ] 767 | }, 768 | { 769 | "name": "Delete document", 770 | "event": [ 771 | { 772 | "listen": "test", 773 | "script": { 774 | "exec": [ 775 | "pm.test(\"Delete Doc Success Test\", function () {", 776 | " pm.response.to.have.status(200);", 777 | " var jsonData = pm.response.json();", 778 | " var docId = jsonData[\"id\"];", 779 | " pm.expect(docId).to.eql(pm.environment.get(\"newdoc\"));", 780 | " var revId = jsonData[\"rev\"];", 781 | " pm.environment.set(\"rev\",revId);", 782 | "});" 783 | ], 784 | "type": "text/javascript" 785 | } 786 | } 787 | ], 788 | "request": { 789 | "method": "DELETE", 790 | "header": [], 791 | "url": { 792 | "raw": "{{publicUrl}}/{{db}}/{{newdoc}}?rev={{rev}}", 793 | "host": [ 794 | "{{publicUrl}}" 795 | ], 796 | "path": [ 797 | "{{db}}", 798 | "{{newdoc}}" 799 | ], 800 | "query": [ 801 | { 802 | "key": "rev", 803 | "value": "{{rev}}", 804 | "description": "(Required) Revision identifier of the revision to delete. It must be the identifier of the latest revision in the history." 805 | } 806 | ] 807 | }, 808 | "description": "This request deletes a document from the database. When a document is deleted, the revision number is updated so the database can track the deletion in synchronized copies.\n" 809 | }, 810 | "response": [ 811 | { 812 | "name": "Document successfully removed", 813 | "originalRequest": { 814 | "method": "DELETE", 815 | "header": [ 816 | { 817 | "description": "Added as a part of security scheme: apikey", 818 | "key": "Cookie", 819 | "value": "" 820 | } 821 | ], 822 | "url": { 823 | "raw": "{{publicUrl}}/{{db}}/{{doc}}?rev=", 824 | "host": [ 825 | "{{publicUrl}}" 826 | ], 827 | "path": [ 828 | "{{db}}", 829 | "{{doc}}" 830 | ], 831 | "query": [ 832 | { 833 | "key": "rev", 834 | "value": "" 835 | } 836 | ], 837 | "variable": [ 838 | { 839 | "key": "db", 840 | "value": "", 841 | "description": "(Required) Database name" 842 | }, 843 | { 844 | "key": "doc", 845 | "value": "", 846 | "description": "(Required) Document ID" 847 | } 848 | ] 849 | } 850 | }, 851 | "status": "OK", 852 | "code": 200, 853 | "_postman_previewlanguage": "json", 854 | "header": [ 855 | { 856 | "key": "Content-Type", 857 | "value": "application/json" 858 | } 859 | ], 860 | "cookie": [], 861 | "body": "{\n \"id\": \"culpa ut\",\n \"rev\": \"pariatur Lorem\",\n \"ok\": true\n}" 862 | } 863 | ] 864 | }, 865 | { 866 | "name": "Create document", 867 | "event": [ 868 | { 869 | "listen": "test", 870 | "script": { 871 | "exec": [ 872 | "pm.test(\"Delete Doc Success Test\", function () {", 873 | " pm.response.to.have.status(200);", 874 | " var jsonData = pm.response.json();", 875 | " var docId = jsonData[\"id\"];", 876 | " pm.expect(docId).to.eql(pm.environment.get(\"newdoc\"));", 877 | " var revId = jsonData[\"rev\"];", 878 | " pm.environment.set(\"rev\",revId);", 879 | "});" 880 | ], 881 | "type": "text/javascript" 882 | } 883 | } 884 | ], 885 | "request": { 886 | "method": "POST", 887 | "header": [ 888 | { 889 | "key": "Content-Type", 890 | "value": "application/json" 891 | } 892 | ], 893 | "body": { 894 | "mode": "raw", 895 | "raw": " { \n \"type\" : \"hotel\", \n \"address\": \"300 Thayer Street\", \n \"city\": \"Ann Arbor\",\n \"country\": \"USA\",\n \"description\": \"Welcome to The Bell Tower Hotel, where old-world elegance and gracious service meet superb, modern accommodations. Outstanding amenities include complimentary breakfast buffet, free WiFi and daily New York Times. Located in the heart of downtown Ann Arbor and on the University of Michigan’s main campus, you can walk to stores, theaters, events, restaurants and U of M functions with ease. It’s the perfect place to enjoy all that Ann Arbor has to offe\",\n \"directions\": \"Metro Line A\",\n \"name\": \"Bell Tower Hotel\",\n \"pets_ok\": false,\n \"phone\": \"555-234-1234\",\n \"free_breakfast\": true,\n \"free_internet\": true,\n \"free_parking\": false,\n \"state\": \"CA\",\n \"title\": \"Welcome to Bell Tower Hotel\",\n \"tollfree\": null,\n \"url\": \"https://belltowerhotel.com/\",\n \"vacancy\": true\n } ", 896 | "options": { 897 | "raw": { 898 | "language": "json" 899 | } 900 | } 901 | }, 902 | "url": { 903 | "raw": "{{publicUrl}}/{{db}}/", 904 | "host": [ 905 | "{{publicUrl}}" 906 | ], 907 | "path": [ 908 | "{{db}}", 909 | "" 910 | ], 911 | "variable": [ 912 | { 913 | "key": "db", 914 | "value": "", 915 | "description": "(Required) Database name" 916 | } 917 | ] 918 | }, 919 | "description": "This request creates a new document in the specified database. You can either specify the document ID by including the _id in the request message body (the value must be a string), or let the software generate an ID.\n\nThe maximum size allowed for a document is 20MB.\n" 920 | }, 921 | "response": [ 922 | { 923 | "name": "The document was written successfully", 924 | "originalRequest": { 925 | "method": "POST", 926 | "header": [ 927 | { 928 | "description": "Added as a part of security scheme: apikey", 929 | "key": "Cookie", 930 | "value": "" 931 | } 932 | ], 933 | "body": { 934 | "mode": "raw", 935 | "raw": "\"\"", 936 | "options": { 937 | "raw": { 938 | "language": "json" 939 | } 940 | } 941 | }, 942 | "url": { 943 | "raw": "{{publicUrl}}/{{db}}/", 944 | "host": [ 945 | "{{publicUrl}}" 946 | ], 947 | "path": [ 948 | "{{db}}", 949 | "" 950 | ], 951 | "variable": [ 952 | { 953 | "key": "db", 954 | "value": "", 955 | "description": "(Required) Database name" 956 | } 957 | ] 958 | } 959 | }, 960 | "status": "Created", 961 | "code": 201, 962 | "_postman_previewlanguage": "json", 963 | "header": [ 964 | { 965 | "key": "Content-Type", 966 | "value": "application/json" 967 | } 968 | ], 969 | "cookie": [], 970 | "body": "{\n \"id\": \"culpa ut\",\n \"rev\": \"pariatur Lorem\",\n \"ok\": true\n}" 971 | } 972 | ] 973 | } 974 | ] 975 | }, 976 | { 977 | "name": " changes", 978 | "item": [ 979 | { 980 | "name": "Changes", 981 | "request": { 982 | "method": "GET", 983 | "header": [], 984 | "url": { 985 | "raw": "{{publicUrl}}/{{db}}/_changes?limit={{limit}}&style={{style}} &active_only={{active_only}}&include_docs={{include_docs}}&filter={{filter}}&channels={{channels}}&doc_ids={{doc_ids}} &feed={{feed}}&since={{since}}&heartbeat={{heartbeat}}&timeout={{timeout}}", 986 | "host": [ 987 | "{{publicUrl}}" 988 | ], 989 | "path": [ 990 | "{{db}}", 991 | "_changes" 992 | ], 993 | "query": [ 994 | { 995 | "key": "limit", 996 | "value": "{{limit}}", 997 | "description": "Limits the number of result rows to the specified value. Using a value of 0 has the same effect as the value 1." 998 | }, 999 | { 1000 | "key": "style", 1001 | "value": "{{style}} ", 1002 | "description": "Default is 'main_only'. Number of revisions to return in the changes array. main_only returns the current winning revision, all_docs returns all leaf revisions including conflicts and deleted former conflicts." 1003 | }, 1004 | { 1005 | "key": "active_only", 1006 | "value": "{{active_only}}", 1007 | "description": "Default is false. When true, the changes response doesn't include either deleted documents, or notification for documents that the user no longer has access to." 1008 | }, 1009 | { 1010 | "key": "include_docs", 1011 | "value": "{{include_docs}}", 1012 | "description": "Default is false. Indicates whether to include the associated document with each result. If there are conflicts, only the winning revision is returned." 1013 | }, 1014 | { 1015 | "key": "filter", 1016 | "value": "{{filter}}", 1017 | "description": "Indicates that the reported documents should be filtered. The valid values are sync_gateway/bychannel and _doc_ids." 1018 | }, 1019 | { 1020 | "key": "channels", 1021 | "value": "{{channels}}", 1022 | "description": "A comma-separated list of channel names. The response will be filtered to only documents in these channels. (This parameter must be used with the sync_gateway/bychannel filter parameter; see below.)" 1023 | }, 1024 | { 1025 | "key": "doc_ids", 1026 | "value": "{{doc_ids}} ", 1027 | "description": "A list of document IDs as a valid JSON array. The response will be filtered to only documents with these IDs. This parameter must be used with the `filter=_doc_ids` and `feed=normal` parameters." 1028 | }, 1029 | { 1030 | "key": "feed", 1031 | "value": "{{feed}}", 1032 | "description": "Default is 'normal'. Specifies type of change feed. Valid values are normal, continuous, longpoll, websocket." 1033 | }, 1034 | { 1035 | "key": "since", 1036 | "value": "{{since}}", 1037 | "description": "Starts the results from the change immediately after the given sequence ID. Sequence IDs should be considered opaque; they come from the last_seq property of a prior response." 1038 | }, 1039 | { 1040 | "key": "heartbeat", 1041 | "value": "{{heartbeat}}", 1042 | "description": "The `heartbeat` defines the interval (in milliseconds) at which an empty line (CRLF) is written to the response. It helps prevent Sync Gateway from deciding the socket is idle and closing it.\n\nThe `heartbeat` value overrides any `timeout` value, to keep the feed alive indefinitely.\n\nSetting `heartbeat=0` results in no heartbeat.\n\n**Default:** 0, which is no heartbeat\n\n**Constraints:**\n\n- Applies ONLY where `feed=longpoll` or `feed=continuous`.\n\n- Minimum: 25000 (25 seconds)\n\n- Maximum: None -- unless you define one in your configuration file using `MaxHeartbeat`\n\n" 1043 | }, 1044 | { 1045 | "key": "timeout", 1046 | "value": "{{timeout}}", 1047 | "description": "The `timeout` value defines the maximum period (in milliseconds) to wait for a change, before sending a response. This wait applies even when there are no results.\n\nSetting `timeout=0` results in no timeout.\n\n**Default:** 300000 (5 minutes/300 seconds)\n\n**Constraints:**\n\n- Applies ONLY where `feed=longpoll` or `feed=continuous`.\n\n- Minimum: 0, no timeout\n\n- Maximum: 1500000 (15 minutes)\n\n" 1048 | } 1049 | ] 1050 | }, 1051 | "description": "This request retrieves a sorted list of changes made to documents in the database, in time order of application. Each document appears at most once, ordered by its most recent change, regardless of how many times it's been changed.\nThis request can be used to listen for update and modifications to the database for post processing or synchronization. A continuously connected changes feed is a reasonable approach for generating a real-time log for most applications.\n" 1052 | }, 1053 | "response": [ 1054 | { 1055 | "name": "Request completed successfully", 1056 | "originalRequest": { 1057 | "method": "GET", 1058 | "header": [ 1059 | { 1060 | "description": "Added as a part of security scheme: apikey", 1061 | "key": "Cookie", 1062 | "value": "" 1063 | } 1064 | ], 1065 | "url": { 1066 | "raw": "{{publicUrl}}/{{db}}/_changes?limit=&style=main_only&active_only=false&include_docs=false&filter=&channels=&doc_ids=,&feed=normal&since=&heartbeat=0&timeout=300000", 1067 | "host": [ 1068 | "{{publicUrl}}" 1069 | ], 1070 | "path": [ 1071 | "{{db}}", 1072 | "_changes" 1073 | ], 1074 | "query": [ 1075 | { 1076 | "key": "limit", 1077 | "value": "" 1078 | }, 1079 | { 1080 | "key": "style", 1081 | "value": "main_only" 1082 | }, 1083 | { 1084 | "key": "active_only", 1085 | "value": "false" 1086 | }, 1087 | { 1088 | "key": "include_docs", 1089 | "value": "false" 1090 | }, 1091 | { 1092 | "key": "filter", 1093 | "value": "" 1094 | }, 1095 | { 1096 | "key": "channels", 1097 | "value": "" 1098 | }, 1099 | { 1100 | "key": "doc_ids", 1101 | "value": "," 1102 | }, 1103 | { 1104 | "key": "feed", 1105 | "value": "normal" 1106 | }, 1107 | { 1108 | "key": "since", 1109 | "value": "" 1110 | }, 1111 | { 1112 | "key": "heartbeat", 1113 | "value": "0" 1114 | }, 1115 | { 1116 | "key": "timeout", 1117 | "value": "300000" 1118 | } 1119 | ], 1120 | "variable": [ 1121 | { 1122 | "key": "db", 1123 | "value": "", 1124 | "description": "(Required) Database name" 1125 | } 1126 | ] 1127 | } 1128 | }, 1129 | "status": "OK", 1130 | "code": 200, 1131 | "_postman_previewlanguage": "json", 1132 | "header": [ 1133 | { 1134 | "key": "Content-Type", 1135 | "value": "application/json" 1136 | } 1137 | ], 1138 | "cookie": [], 1139 | "body": "{\n \"last_seq\": {},\n \"results\": [\n {\n \"changes\": [\n {\n \"rev\": \"com\"\n },\n {\n \"rev\": \"m\"\n }\n ],\n \"id\": \"labore aliqu\",\n \"seq\": 75478417,\n \"deleted\": false,\n \"doc\": {}\n },\n {\n \"changes\": [\n {\n \"rev\": \"aliquip\"\n },\n {\n \"rev\": \"Duis sint cillum\"\n }\n ],\n \"id\": \"qui esse Ut pariatur Duis\",\n \"seq\": 39017734,\n \"deleted\": false,\n \"doc\": {}\n }\n ]\n}" 1140 | } 1141 | ] 1142 | }, 1143 | { 1144 | "name": "Changes Feed", 1145 | "request": { 1146 | "method": "POST", 1147 | "header": [ 1148 | { 1149 | "key": "Content-Type", 1150 | "value": "application/json" 1151 | } 1152 | ], 1153 | "body": { 1154 | "mode": "raw", 1155 | "raw": "{\n \"limit\": {{limit}},\n \"style\": \"{{style}}\",\n \"active_only\": {{active_only}},\n \"include_docs\": {{include_docs}},\n \"feed\": \"{{feed}}\",\n \"since\": \"{{since}}\",\n \"heartbeat\": {{heartbeat}},\n \"timeout\": {{timeout}}\n}", 1156 | "options": { 1157 | "raw": { 1158 | "language": "json" 1159 | } 1160 | } 1161 | }, 1162 | "url": { 1163 | "raw": "{{publicUrl}}/{{db}}/_changes", 1164 | "host": [ 1165 | "{{publicUrl}}" 1166 | ], 1167 | "path": [ 1168 | "{{db}}", 1169 | "_changes" 1170 | ], 1171 | "variable": [ 1172 | { 1173 | "key": "db", 1174 | "value": "", 1175 | "description": "(Required) Database name" 1176 | } 1177 | ] 1178 | }, 1179 | "description": "Same as the GET /_changes request except the parameters are in the JSON body.\n" 1180 | }, 1181 | "response": [ 1182 | { 1183 | "name": "Request completed successfully", 1184 | "originalRequest": { 1185 | "method": "POST", 1186 | "header": [ 1187 | { 1188 | "description": "Added as a part of security scheme: apikey", 1189 | "key": "Cookie", 1190 | "value": "" 1191 | } 1192 | ], 1193 | "body": { 1194 | "mode": "raw", 1195 | "raw": "{\n \"limit\": \"\",\n \"style\": \"main_only\",\n \"active_only\": false,\n \"include_docs\": false,\n \"filter\": \"\",\n \"channels\": \"\",\n \"doc_ids\": [\n \"\",\n \"\"\n ],\n \"feed\": \"normal\",\n \"since\": \"\",\n \"heartbeat\": 0,\n \"timeout\": 300000\n}", 1196 | "options": { 1197 | "raw": { 1198 | "language": "json" 1199 | } 1200 | } 1201 | }, 1202 | "url": { 1203 | "raw": "{{publicUrl}}/{{db}}/_changes", 1204 | "host": [ 1205 | "{{publicUrl}}" 1206 | ], 1207 | "path": [ 1208 | "{{db}}", 1209 | "_changes" 1210 | ], 1211 | "variable": [ 1212 | { 1213 | "key": "db", 1214 | "value": "", 1215 | "description": "(Required) Database name" 1216 | } 1217 | ] 1218 | } 1219 | }, 1220 | "status": "OK", 1221 | "code": 200, 1222 | "_postman_previewlanguage": "json", 1223 | "header": [ 1224 | { 1225 | "key": "Content-Type", 1226 | "value": "application/json" 1227 | } 1228 | ], 1229 | "cookie": [], 1230 | "body": "{\n \"last_seq\": {},\n \"results\": [\n {\n \"changes\": [\n {\n \"rev\": \"ea\"\n },\n {\n \"rev\": \"reprehenderit pariatur consequat tempor\"\n }\n ],\n \"id\": \"Duis incididunt fugiat do\",\n \"seq\": -69451986,\n \"deleted\": false,\n \"doc\": {}\n },\n {\n \"changes\": [\n {\n \"rev\": \"in fugiat in\"\n },\n {\n \"rev\": \"ex Excepteur\"\n }\n ],\n \"id\": \"labore ex qui\",\n \"seq\": -5468252,\n \"deleted\": false,\n \"doc\": {}\n }\n ]\n}" 1231 | } 1232 | ] 1233 | }, 1234 | { 1235 | "name": "Used by the replicator", 1236 | "request": { 1237 | "method": "POST", 1238 | "header": [ 1239 | { 1240 | "key": "Content-Type", 1241 | "value": "application/json" 1242 | } 1243 | ], 1244 | "body": { 1245 | "mode": "raw", 1246 | "raw": "\"\"", 1247 | "options": { 1248 | "raw": { 1249 | "language": "json" 1250 | } 1251 | } 1252 | }, 1253 | "url": { 1254 | "raw": "{{publicUrl}}/{{db}}/_revs_diff", 1255 | "host": [ 1256 | "{{publicUrl}}" 1257 | ], 1258 | "path": [ 1259 | "{{db}}", 1260 | "_revs_diff" 1261 | ], 1262 | "variable": [ 1263 | { 1264 | "key": "db", 1265 | "value": "", 1266 | "description": "(Required) Database name" 1267 | } 1268 | ] 1269 | }, 1270 | "description": "Given a set of document/revision IDs, returns the subset of those that do not correspond to revisions stored in the database." 1271 | }, 1272 | "response": [ 1273 | { 1274 | "name": "The request was successful", 1275 | "originalRequest": { 1276 | "method": "POST", 1277 | "header": [ 1278 | { 1279 | "description": "Added as a part of security scheme: apikey", 1280 | "key": "Cookie", 1281 | "value": "" 1282 | } 1283 | ], 1284 | "body": { 1285 | "mode": "raw", 1286 | "raw": "\"\"", 1287 | "options": { 1288 | "raw": { 1289 | "language": "json" 1290 | } 1291 | } 1292 | }, 1293 | "url": { 1294 | "raw": "{{publicUrl}}/{{db}}/_revs_diff", 1295 | "host": [ 1296 | "{{publicUrl}}" 1297 | ], 1298 | "path": [ 1299 | "{{db}}", 1300 | "_revs_diff" 1301 | ], 1302 | "variable": [ 1303 | { 1304 | "key": "db", 1305 | "value": "", 1306 | "description": "(Required) Database name" 1307 | } 1308 | ] 1309 | } 1310 | }, 1311 | "status": "OK", 1312 | "code": 200, 1313 | "_postman_previewlanguage": "json", 1314 | "header": [ 1315 | { 1316 | "key": "Content-Type", 1317 | "value": "application/json" 1318 | } 1319 | ], 1320 | "cookie": [], 1321 | "body": "{}" 1322 | } 1323 | ] 1324 | } 1325 | ] 1326 | }, 1327 | { 1328 | "name": "docs", 1329 | "item": [ 1330 | { 1331 | "name": "Get All docs", 1332 | "request": { 1333 | "auth": { 1334 | "type": "basic", 1335 | "basic": [ 1336 | { 1337 | "key": "username", 1338 | "value": "{{username}}", 1339 | "type": "string" 1340 | }, 1341 | { 1342 | "key": "password", 1343 | "value": "password", 1344 | "type": "string" 1345 | } 1346 | ] 1347 | }, 1348 | "method": "POST", 1349 | "header": [ 1350 | { 1351 | "key": "Content-Type", 1352 | "value": "application/json" 1353 | } 1354 | ], 1355 | "body": { 1356 | "mode": "raw", 1357 | "raw": "{\n \"keys\": [\n \"{{newdoc}}\"\n ]\n}", 1358 | "options": { 1359 | "raw": { 1360 | "language": "json" 1361 | } 1362 | } 1363 | }, 1364 | "url": { 1365 | "raw": "{{publicUrl}}/{{db}}/_all_docs?access={{access}}&channels={{include_channels}} &include_docs={{include_docs}} &revs={{include_revs}} &update_seq={{update_seq}}", 1366 | "host": [ 1367 | "{{publicUrl}}" 1368 | ], 1369 | "path": [ 1370 | "{{db}}", 1371 | "_all_docs" 1372 | ], 1373 | "query": [ 1374 | { 1375 | "key": "access", 1376 | "value": "{{access}}", 1377 | "description": "Indicates whether to include in the response a list of what access this document grants (i.e. which users it allows to access which channels.) This option may only be used from the admin port." 1378 | }, 1379 | { 1380 | "key": "channels", 1381 | "value": "{{include_channels}} ", 1382 | "description": "Indicates whether to include in the response a channels property containing an array of channels this document is assigned to. (Channels not accessible by the user making the request will not be listed.)" 1383 | }, 1384 | { 1385 | "key": "include_docs", 1386 | "value": "{{include_docs}} ", 1387 | "description": "Default is false. Indicates whether to include the associated document with each result. If there are conflicts, only the winning revision is returned." 1388 | }, 1389 | { 1390 | "key": "revs", 1391 | "value": "{{include_revs}} ", 1392 | "description": "Default is false. Indicates whether to include a _revisions property for each document in the response, which contains a revision history of the document. The length of the returned revision tree can be specified with the `revs_limit` querystring parameter." 1393 | }, 1394 | { 1395 | "key": "update_seq", 1396 | "value": "{{update_seq}}", 1397 | "description": "Default is false. Indicates whether to include the update_seq (document sequence ID) property in the response." 1398 | } 1399 | ] 1400 | }, 1401 | "description": "This request retrieves specified documents from the database.\n" 1402 | }, 1403 | "response": [ 1404 | { 1405 | "name": "Query results", 1406 | "originalRequest": { 1407 | "method": "POST", 1408 | "header": [ 1409 | { 1410 | "description": "Added as a part of security scheme: apikey", 1411 | "key": "Cookie", 1412 | "value": "" 1413 | } 1414 | ], 1415 | "body": { 1416 | "mode": "raw", 1417 | "raw": "{\n \"keys\": [\n \"\",\n \"\"\n ]\n}", 1418 | "options": { 1419 | "raw": { 1420 | "language": "json" 1421 | } 1422 | } 1423 | }, 1424 | "url": { 1425 | "raw": "{{publicUrl}}/{{db}}/_all_docs?access=false&channels=false&include_docs=false&revs=false&update_seq=false", 1426 | "host": [ 1427 | "{{publicUrl}}" 1428 | ], 1429 | "path": [ 1430 | "{{db}}", 1431 | "_all_docs" 1432 | ], 1433 | "query": [ 1434 | { 1435 | "key": "access", 1436 | "value": "false" 1437 | }, 1438 | { 1439 | "key": "channels", 1440 | "value": "false" 1441 | }, 1442 | { 1443 | "key": "include_docs", 1444 | "value": "false" 1445 | }, 1446 | { 1447 | "key": "revs", 1448 | "value": "false" 1449 | }, 1450 | { 1451 | "key": "update_seq", 1452 | "value": "false" 1453 | } 1454 | ], 1455 | "variable": [ 1456 | { 1457 | "key": "db", 1458 | "value": "", 1459 | "description": "(Required) Database name" 1460 | } 1461 | ] 1462 | } 1463 | }, 1464 | "status": "OK", 1465 | "code": 200, 1466 | "_postman_previewlanguage": "json", 1467 | "header": [ 1468 | { 1469 | "key": "Content-Type", 1470 | "value": "application/json" 1471 | } 1472 | ], 1473 | "cookie": [], 1474 | "body": "{\n \"offset\": \"cul\",\n \"rows\": [\n {\n \"id\": \"minim labore reprehenderit ut\",\n \"key\": {},\n \"value\": {},\n \"doc\": {}\n },\n {\n \"id\": \"d\",\n \"key\": {},\n \"value\": {},\n \"doc\": {}\n }\n ],\n \"total_rows\": 30187116\n}" 1475 | } 1476 | ] 1477 | }, 1478 | { 1479 | "name": "Create Bulk Docs", 1480 | "request": { 1481 | "auth": { 1482 | "type": "basic", 1483 | "basic": [ 1484 | { 1485 | "key": "username", 1486 | "value": "{{username}}", 1487 | "type": "string" 1488 | }, 1489 | { 1490 | "key": "password", 1491 | "value": "password", 1492 | "type": "string" 1493 | } 1494 | ] 1495 | }, 1496 | "method": "POST", 1497 | "header": [ 1498 | { 1499 | "key": "Content-Type", 1500 | "value": "application/json" 1501 | } 1502 | ], 1503 | "body": { 1504 | "mode": "raw", 1505 | "raw": "{\n \"docs\": [\n { \n \"type\" : \"hotel\", \n \"address\": \"123 Main Street\", \n \"city\": \"Mountain View\",\n \"country\": \"USA\",\n \"description\": \"Welcome to the Hotel California. Such a lovely place (such a lovely place).Such a lovely face Plenty of room at the Hotel California. Any time of year (any time of year) you can find it here\",\n \"directions\": \"Metro Line A\",\n \"name\": \"Hotel California\",\n \"pets_ok\": false,\n \"phone\": \"555-234-1234\",\n \"free_breakfast\": true,\n \"free_internet\": true,\n \"free_parking\": false,\n \"state\": \"CA\",\n \"title\": \"Welcome to Hotel California\",\n \"tollfree\": null,\n \"url\": \"http://www.hotelcalifornia.com\",\n \"vacancy\": true\n } \n ],\n \"new_edits\": true\n}", 1506 | "options": { 1507 | "raw": { 1508 | "language": "json" 1509 | } 1510 | } 1511 | }, 1512 | "url": { 1513 | "raw": "{{publicUrl}}/{{db}}/_bulk_docs", 1514 | "host": [ 1515 | "{{publicUrl}}" 1516 | ], 1517 | "path": [ 1518 | "{{db}}", 1519 | "_bulk_docs" 1520 | ], 1521 | "variable": [ 1522 | { 1523 | "key": "db", 1524 | "value": "", 1525 | "description": "(Required) Database name" 1526 | } 1527 | ] 1528 | }, 1529 | "description": "This request enables you to add, update, or delete multiple documents to a database in a single request. To add new documents, you can either specify the ID (`_id`) or let the software create an ID. To update existing documents, you must provide the document ID, revision identifier (`_rev`), and new document values. To delete existing documents you must provide the document ID, revision identifier, and the deletion flag (`_deleted`).\n\nThe JSON returned by the `_bulk_docs` operation consists of an array of JSON structures, one for each document in the original submission. The returned JSON structure should be examined to ensure that all of the documents submitted in the original request were successfully added to the database.\n" 1530 | }, 1531 | "response": [ 1532 | { 1533 | "name": "The operation failed with a forbidden error. Probably because the document already exists in the database but a revision number wasn't specified.", 1534 | "originalRequest": { 1535 | "method": "POST", 1536 | "header": [ 1537 | { 1538 | "description": "Added as a part of security scheme: apikey", 1539 | "key": "Cookie", 1540 | "value": "" 1541 | } 1542 | ], 1543 | "body": { 1544 | "mode": "raw", 1545 | "raw": "{\n \"docs\": [\n {\n \"_id\": \"\",\n \"_rev\": \"\",\n \"_exp\": \"\",\n \"_revisions\": {\n \"start\": \"\",\n \"ids\": [\n \"\",\n \"\"\n ]\n },\n \"_attachments\": {\n \"attachment_name\": {\n \"content_type\": \"\"\n }\n }\n },\n {\n \"_id\": \"\",\n \"_rev\": \"\",\n \"_exp\": \"\",\n \"_revisions\": {\n \"start\": \"\",\n \"ids\": [\n \"\",\n \"\"\n ]\n },\n \"_attachments\": {\n \"attachment_name\": {\n \"content_type\": \"\"\n }\n }\n }\n ],\n \"new_edits\": true\n}", 1546 | "options": { 1547 | "raw": { 1548 | "language": "json" 1549 | } 1550 | } 1551 | }, 1552 | "url": { 1553 | "raw": "{{publicUrl}}/{{db}}/_bulk_docs", 1554 | "host": [ 1555 | "{{publicUrl}}" 1556 | ], 1557 | "path": [ 1558 | "{{db}}", 1559 | "_bulk_docs" 1560 | ], 1561 | "variable": [ 1562 | { 1563 | "key": "db", 1564 | "value": "", 1565 | "description": "(Required) Database name" 1566 | } 1567 | ] 1568 | } 1569 | }, 1570 | "status": "Conflict", 1571 | "code": 409, 1572 | "_postman_previewlanguage": "json", 1573 | "header": [ 1574 | { 1575 | "key": "Content-Type", 1576 | "value": "application/json" 1577 | } 1578 | ], 1579 | "cookie": [], 1580 | "body": "{\n \"error\": \"conflict\",\n \"id\": \"pariatur irure\",\n \"reason\": \"voluptate id adipisicing exercitation\",\n \"status\": 409\n}" 1581 | }, 1582 | { 1583 | "name": "Documents have been created or updated. The response object is an array with the status for each document submitted in the original request.", 1584 | "originalRequest": { 1585 | "method": "POST", 1586 | "header": [ 1587 | { 1588 | "description": "Added as a part of security scheme: apikey", 1589 | "key": "Cookie", 1590 | "value": "" 1591 | } 1592 | ], 1593 | "body": { 1594 | "mode": "raw", 1595 | "raw": "{\n \"docs\": [\n {\n \"_id\": \"\",\n \"_rev\": \"\",\n \"_exp\": \"\",\n \"_revisions\": {\n \"start\": \"\",\n \"ids\": [\n \"\",\n \"\"\n ]\n },\n \"_attachments\": {\n \"attachment_name\": {\n \"content_type\": \"\"\n }\n }\n },\n {\n \"_id\": \"\",\n \"_rev\": \"\",\n \"_exp\": \"\",\n \"_revisions\": {\n \"start\": \"\",\n \"ids\": [\n \"\",\n \"\"\n ]\n },\n \"_attachments\": {\n \"attachment_name\": {\n \"content_type\": \"\"\n }\n }\n }\n ],\n \"new_edits\": true\n}", 1596 | "options": { 1597 | "raw": { 1598 | "language": "json" 1599 | } 1600 | } 1601 | }, 1602 | "url": { 1603 | "raw": "{{publicUrl}}/{{db}}/_bulk_docs", 1604 | "host": [ 1605 | "{{publicUrl}}" 1606 | ], 1607 | "path": [ 1608 | "{{db}}", 1609 | "_bulk_docs" 1610 | ], 1611 | "variable": [ 1612 | { 1613 | "key": "db", 1614 | "value": "", 1615 | "description": "(Required) Database name" 1616 | } 1617 | ] 1618 | } 1619 | }, 1620 | "status": "Created", 1621 | "code": 201, 1622 | "_postman_previewlanguage": "json", 1623 | "header": [ 1624 | { 1625 | "key": "Content-Type", 1626 | "value": "application/json" 1627 | } 1628 | ], 1629 | "cookie": [], 1630 | "body": "[\n {\n \"id\": \"cupidatat in sit\",\n \"rev\": \"cupidatat veniam sit\"\n },\n {\n \"id\": \"elit\",\n \"rev\": \"cupidatat Lorem o\"\n }\n]" 1631 | } 1632 | ] 1633 | }, 1634 | { 1635 | "name": "Get Bulk Docs", 1636 | "request": { 1637 | "auth": { 1638 | "type": "basic", 1639 | "basic": [ 1640 | { 1641 | "key": "username", 1642 | "value": "{{username}}", 1643 | "type": "string" 1644 | }, 1645 | { 1646 | "key": "password", 1647 | "value": "password", 1648 | "type": "string" 1649 | } 1650 | ] 1651 | }, 1652 | "method": "POST", 1653 | "header": [ 1654 | { 1655 | "key": "Content-Type", 1656 | "value": "application/json" 1657 | } 1658 | ], 1659 | "body": { 1660 | "mode": "raw", 1661 | "raw": "{\n \"docs\": [\n {\n \"id\": \"{{docid}}\"\n },\n {\n \"id\": \"{{newdoc2}}\"\n },\n {\n \"id\": \"{{newdoc}}\"\n }\n ]\n}", 1662 | "options": { 1663 | "raw": { 1664 | "language": "json" 1665 | } 1666 | } 1667 | }, 1668 | "url": { 1669 | "raw": "{{publicUrl}}/{{db}}/_bulk_get?revs={{include_revs}} &revs_limit={{revs_limit}} &attachments={{include_attachments}}", 1670 | "host": [ 1671 | "{{publicUrl}}" 1672 | ], 1673 | "path": [ 1674 | "{{db}}", 1675 | "_bulk_get" 1676 | ], 1677 | "query": [ 1678 | { 1679 | "key": "revs", 1680 | "value": "{{include_revs}} ", 1681 | "description": "Default is false. Indicates whether to include a _revisions property for each document in the response, which contains a revision history of the document. The length of the returned revision tree can be specified with the `revs_limit` querystring parameter." 1682 | }, 1683 | { 1684 | "key": "revs_limit", 1685 | "value": "{{revs_limit}} ", 1686 | "description": "The number of revisions to include in the response from the document history. This parameter is only honoured if the `revs=true` querystring parameter is also sent in the request. If `revs=true` is specified and `revs_limit` isn't, the full revision history is returned." 1687 | }, 1688 | { 1689 | "key": "attachments", 1690 | "value": "{{include_attachments}}", 1691 | "description": "Default is false. Include attachment bodies in response." 1692 | } 1693 | ] 1694 | }, 1695 | "description": "This request returns any number of documents, as individual bodies in a MIME multipart response.\nEach enclosed body contains one requested document. The bodies appear in the same order as in the request, but can also be identified by their X-Doc-ID and X-Rev-ID headers.\nA body for a document with no attachments will have content type application/json and contain the document itself.\nA body for a document that has attachments will be written as a nested multipart/related body. Its first part will be the document's JSON, and the subsequent parts will be the attachments (each identified by a Content-Disposition header giving its attachment name.)\n" 1696 | }, 1697 | "response": [ 1698 | { 1699 | "name": "Request failed with a forbidden error. This usually happens because the user requesting that document doesn't have access to it. Access to documents is granted to users through channels.", 1700 | "originalRequest": { 1701 | "method": "POST", 1702 | "header": [ 1703 | { 1704 | "description": "Added as a part of security scheme: apikey", 1705 | "key": "Cookie", 1706 | "value": "" 1707 | } 1708 | ], 1709 | "body": { 1710 | "mode": "raw", 1711 | "raw": "{\n \"docs\": [\n {\n \"id\": \"\"\n },\n {\n \"id\": \"\"\n }\n ]\n}", 1712 | "options": { 1713 | "raw": { 1714 | "language": "json" 1715 | } 1716 | } 1717 | }, 1718 | "url": { 1719 | "raw": "{{publicUrl}}/{{db}}/_bulk_get?revs=false&revs_limit=&attachments=false", 1720 | "host": [ 1721 | "{{publicUrl}}" 1722 | ], 1723 | "path": [ 1724 | "{{db}}", 1725 | "_bulk_get" 1726 | ], 1727 | "query": [ 1728 | { 1729 | "key": "revs", 1730 | "value": "false" 1731 | }, 1732 | { 1733 | "key": "revs_limit", 1734 | "value": "" 1735 | }, 1736 | { 1737 | "key": "attachments", 1738 | "value": "false" 1739 | } 1740 | ], 1741 | "variable": [ 1742 | { 1743 | "key": "db", 1744 | "value": "", 1745 | "description": "(Required) Database name" 1746 | } 1747 | ] 1748 | } 1749 | }, 1750 | "status": "Moved Permanently", 1751 | "code": 301, 1752 | "_postman_previewlanguage": "text", 1753 | "header": [ 1754 | { 1755 | "key": "Content-Type", 1756 | "value": "multipart/mixed" 1757 | } 1758 | ], 1759 | "cookie": [], 1760 | "body": "" 1761 | }, 1762 | { 1763 | "name": "Request completed successfully", 1764 | "originalRequest": { 1765 | "method": "POST", 1766 | "header": [ 1767 | { 1768 | "description": "Added as a part of security scheme: apikey", 1769 | "key": "Cookie", 1770 | "value": "" 1771 | } 1772 | ], 1773 | "body": { 1774 | "mode": "raw", 1775 | "raw": "{\n \"docs\": [\n {\n \"id\": \"\"\n },\n {\n \"id\": \"\"\n }\n ]\n}", 1776 | "options": { 1777 | "raw": { 1778 | "language": "json" 1779 | } 1780 | } 1781 | }, 1782 | "url": { 1783 | "raw": "{{publicUrl}}/{{db}}/_bulk_get?revs=false&revs_limit=&attachments=false", 1784 | "host": [ 1785 | "{{publicUrl}}" 1786 | ], 1787 | "path": [ 1788 | "{{db}}", 1789 | "_bulk_get" 1790 | ], 1791 | "query": [ 1792 | { 1793 | "key": "revs", 1794 | "value": "false" 1795 | }, 1796 | { 1797 | "key": "revs_limit", 1798 | "value": "" 1799 | }, 1800 | { 1801 | "key": "attachments", 1802 | "value": "false" 1803 | } 1804 | ], 1805 | "variable": [ 1806 | { 1807 | "key": "db", 1808 | "value": "", 1809 | "description": "(Required) Database name" 1810 | } 1811 | ] 1812 | } 1813 | }, 1814 | "status": "OK", 1815 | "code": 200, 1816 | "_postman_previewlanguage": "text", 1817 | "header": [ 1818 | { 1819 | "key": "Content-Type", 1820 | "value": "multipart/mixed (document found)" 1821 | } 1822 | ], 1823 | "cookie": [], 1824 | "body": "--1cba224ff2aa106566e3ab65de9c861c24558ba368f8cd7f6fcde53b88f4\nContent-Type: application/json\n\n{\"_id\":\"doc123\",\"_rev\":\"1-c543d6514c609f65180f94af247aaffe\",\"hello\":\"world!\"}\n--1cba224ff2aa106566e3ab65de9c861c24558ba368f8cd7f6fcde53b88f4\n" 1825 | } 1826 | ] 1827 | }, 1828 | { 1829 | "name": "Get All docs", 1830 | "request": { 1831 | "auth": { 1832 | "type": "basic", 1833 | "basic": [ 1834 | { 1835 | "key": "username", 1836 | "value": "{{username}}", 1837 | "type": "string" 1838 | }, 1839 | { 1840 | "key": "password", 1841 | "value": "password", 1842 | "type": "string" 1843 | } 1844 | ] 1845 | }, 1846 | "method": "GET", 1847 | "header": [], 1848 | "url": { 1849 | "raw": "{{publicUrl}}/{{db}}/_all_docs?access={{access}}&channels={{channels}}&include_docs={{include_docs}} &revs={{include_revs}} &update_seq={{update_seq}} &limit={{limit}}&keys={{keys}}&startkey={{startkey}}&endkey={{endkey}}", 1850 | "host": [ 1851 | "{{publicUrl}}" 1852 | ], 1853 | "path": [ 1854 | "{{db}}", 1855 | "_all_docs" 1856 | ], 1857 | "query": [ 1858 | { 1859 | "key": "access", 1860 | "value": "{{access}}", 1861 | "description": "Indicates whether to include in the response a list of what access this document grants (i.e. which users it allows to access which channels.) This option may only be used from the admin port." 1862 | }, 1863 | { 1864 | "key": "channels", 1865 | "value": "{{channels}}", 1866 | "description": "Indicates whether to include in the response a channels property containing an array of channels this document is assigned to. (Channels not accessible by the user making the request will not be listed.)" 1867 | }, 1868 | { 1869 | "key": "include_docs", 1870 | "value": "{{include_docs}} ", 1871 | "description": "Default is false. Indicates whether to include the associated document with each result. If there are conflicts, only the winning revision is returned." 1872 | }, 1873 | { 1874 | "key": "revs", 1875 | "value": "{{include_revs}} ", 1876 | "description": "Default is false. Indicates whether to include a _revisions property for each document in the response, which contains a revision history of the document. The length of the returned revision tree can be specified with the `revs_limit` querystring parameter." 1877 | }, 1878 | { 1879 | "key": "update_seq", 1880 | "value": "{{update_seq}} ", 1881 | "description": "Default is false. Indicates whether to include the update_seq (document sequence ID) property in the response." 1882 | }, 1883 | { 1884 | "key": "limit", 1885 | "value": "{{limit}}", 1886 | "description": "Limits the number of result rows to the specified value. Using a value of 0 has the same effect as the value 1." 1887 | }, 1888 | { 1889 | "key": "keys", 1890 | "value": "{{keys}}", 1891 | "description": "Specify a list of document IDs." 1892 | }, 1893 | { 1894 | "key": "startkey", 1895 | "value": "{{startkey}}", 1896 | "description": "Returns records starting with the specified key." 1897 | }, 1898 | { 1899 | "key": "endkey", 1900 | "value": "{{endkey}}", 1901 | "description": "If this parameter is provided, stop returning records when the specified key is reached." 1902 | } 1903 | ] 1904 | }, 1905 | "description": "This request returns a built-in view of all the documents in the database.\n" 1906 | }, 1907 | "response": [ 1908 | { 1909 | "name": "Query results", 1910 | "originalRequest": { 1911 | "method": "GET", 1912 | "header": [ 1913 | { 1914 | "description": "Added as a part of security scheme: apikey", 1915 | "key": "Cookie", 1916 | "value": "" 1917 | } 1918 | ], 1919 | "url": { 1920 | "raw": "{{publicUrl}}/{{db}}/_all_docs?access=false&channels=false&include_docs=false&revs=false&update_seq=false&limit=&keys=,&startkey=&endkey=", 1921 | "host": [ 1922 | "{{publicUrl}}" 1923 | ], 1924 | "path": [ 1925 | "{{db}}", 1926 | "_all_docs" 1927 | ], 1928 | "query": [ 1929 | { 1930 | "key": "access", 1931 | "value": "false" 1932 | }, 1933 | { 1934 | "key": "channels", 1935 | "value": "false" 1936 | }, 1937 | { 1938 | "key": "include_docs", 1939 | "value": "false" 1940 | }, 1941 | { 1942 | "key": "revs", 1943 | "value": "false" 1944 | }, 1945 | { 1946 | "key": "update_seq", 1947 | "value": "false" 1948 | }, 1949 | { 1950 | "key": "limit", 1951 | "value": "" 1952 | }, 1953 | { 1954 | "key": "keys", 1955 | "value": "," 1956 | }, 1957 | { 1958 | "key": "startkey", 1959 | "value": "" 1960 | }, 1961 | { 1962 | "key": "endkey", 1963 | "value": "" 1964 | } 1965 | ], 1966 | "variable": [ 1967 | { 1968 | "key": "db", 1969 | "value": "", 1970 | "description": "(Required) Database name" 1971 | } 1972 | ] 1973 | } 1974 | }, 1975 | "status": "OK", 1976 | "code": 200, 1977 | "_postman_previewlanguage": "json", 1978 | "header": [ 1979 | { 1980 | "key": "Content-Type", 1981 | "value": "application/json" 1982 | } 1983 | ], 1984 | "cookie": [], 1985 | "body": "{\n \"offset\": \"fugiat id magna\",\n \"rows\": [\n {\n \"id\": \"proident laborum\",\n \"key\": {},\n \"value\": {},\n \"doc\": {}\n },\n {\n \"id\": \"incididunt et aliqua\",\n \"key\": {},\n \"value\": {},\n \"doc\": {}\n }\n ],\n \"total_rows\": 92176794\n}" 1986 | } 1987 | ] 1988 | } 1989 | ] 1990 | }, 1991 | { 1992 | "name": "db", 1993 | "item": [ 1994 | { 1995 | "name": "Database info", 1996 | "request": { 1997 | "auth": { 1998 | "type": "basic", 1999 | "basic": [ 2000 | { 2001 | "key": "password", 2002 | "value": "password", 2003 | "type": "string" 2004 | }, 2005 | { 2006 | "key": "username", 2007 | "value": "{{username}}", 2008 | "type": "string" 2009 | } 2010 | ] 2011 | }, 2012 | "method": "GET", 2013 | "header": [], 2014 | "url": { 2015 | "raw": "{{publicUrl}}/{{db}}/", 2016 | "host": [ 2017 | "{{publicUrl}}" 2018 | ], 2019 | "path": [ 2020 | "{{db}}", 2021 | "" 2022 | ], 2023 | "variable": [ 2024 | { 2025 | "key": "db", 2026 | "value": "", 2027 | "description": "(Required) Database name" 2028 | } 2029 | ] 2030 | }, 2031 | "description": "This request retrieves information about the database.\n" 2032 | }, 2033 | "response": [ 2034 | { 2035 | "name": "Unauthorized. Login required.", 2036 | "originalRequest": { 2037 | "method": "GET", 2038 | "header": [ 2039 | { 2040 | "description": "Added as a part of security scheme: apikey", 2041 | "key": "Cookie", 2042 | "value": "" 2043 | } 2044 | ], 2045 | "url": { 2046 | "raw": "{{publicUrl}}/{{db}}/", 2047 | "host": [ 2048 | "{{publicUrl}}" 2049 | ], 2050 | "path": [ 2051 | "{{db}}", 2052 | "" 2053 | ], 2054 | "variable": [ 2055 | { 2056 | "key": "db", 2057 | "value": "", 2058 | "description": "(Required) Database name" 2059 | } 2060 | ] 2061 | } 2062 | }, 2063 | "status": "Unauthorized", 2064 | "code": 401, 2065 | "_postman_previewlanguage": "text", 2066 | "header": [ 2067 | { 2068 | "key": "Content-Type", 2069 | "value": "text/plain" 2070 | } 2071 | ], 2072 | "cookie": [], 2073 | "body": "" 2074 | }, 2075 | { 2076 | "name": "Not Found. Requested database not found.", 2077 | "originalRequest": { 2078 | "method": "GET", 2079 | "header": [ 2080 | { 2081 | "description": "Added as a part of security scheme: apikey", 2082 | "key": "Cookie", 2083 | "value": "" 2084 | } 2085 | ], 2086 | "url": { 2087 | "raw": "{{publicUrl}}/{{db}}/", 2088 | "host": [ 2089 | "{{publicUrl}}" 2090 | ], 2091 | "path": [ 2092 | "{{db}}", 2093 | "" 2094 | ], 2095 | "variable": [ 2096 | { 2097 | "key": "db", 2098 | "value": "", 2099 | "description": "(Required) Database name" 2100 | } 2101 | ] 2102 | } 2103 | }, 2104 | "status": "Not Found", 2105 | "code": 404, 2106 | "_postman_previewlanguage": "text", 2107 | "header": [ 2108 | { 2109 | "key": "Content-Type", 2110 | "value": "text/plain" 2111 | } 2112 | ], 2113 | "cookie": [], 2114 | "body": "" 2115 | }, 2116 | { 2117 | "name": "Request completed successfully.", 2118 | "originalRequest": { 2119 | "method": "GET", 2120 | "header": [ 2121 | { 2122 | "description": "Added as a part of security scheme: apikey", 2123 | "key": "Cookie", 2124 | "value": "" 2125 | } 2126 | ], 2127 | "url": { 2128 | "raw": "{{publicUrl}}/{{db}}/", 2129 | "host": [ 2130 | "{{publicUrl}}" 2131 | ], 2132 | "path": [ 2133 | "{{db}}", 2134 | "" 2135 | ], 2136 | "variable": [ 2137 | { 2138 | "key": "db", 2139 | "value": "", 2140 | "description": "(Required) Database name" 2141 | } 2142 | ] 2143 | } 2144 | }, 2145 | "status": "OK", 2146 | "code": 200, 2147 | "_postman_previewlanguage": "json", 2148 | "header": [ 2149 | { 2150 | "key": "Content-Type", 2151 | "value": "application/json" 2152 | } 2153 | ], 2154 | "cookie": [], 2155 | "body": "{\n \"db_name\": \"in aliqua dolore\",\n \"db_uuid\": -16549896,\n \"disk_format_version\": -75572438,\n \"disk_size\": -6576797,\n \"instance_start_time\": \"labore reprehenderit\",\n \"state\": \"fugiat quis\",\n \"update_seq\": \"tempor laborum esse commodo\"\n}" 2156 | } 2157 | ] 2158 | } 2159 | ] 2160 | } 2161 | ] 2162 | }, 2163 | { 2164 | "name": "Server", 2165 | "request": { 2166 | "auth": { 2167 | "type": "basic", 2168 | "basic": [ 2169 | { 2170 | "key": "username", 2171 | "value": "{{clusteradmin}}", 2172 | "type": "string" 2173 | }, 2174 | { 2175 | "key": "password", 2176 | "value": "password", 2177 | "type": "string" 2178 | } 2179 | ] 2180 | }, 2181 | "method": "GET", 2182 | "header": [], 2183 | "url": { 2184 | "raw": "{{publicUrl}}/", 2185 | "host": [ 2186 | "{{publicUrl}}" 2187 | ], 2188 | "path": [ 2189 | "" 2190 | ] 2191 | }, 2192 | "description": "Returns meta-information about the server.\n" 2193 | }, 2194 | "response": [ 2195 | { 2196 | "name": "Sync Gateway Info-Success", 2197 | "originalRequest": { 2198 | "method": "GET", 2199 | "header": [], 2200 | "url": { 2201 | "raw": "{{publicUrl}}/", 2202 | "host": [ 2203 | "{{publicUrl}}" 2204 | ], 2205 | "path": [ 2206 | "" 2207 | ] 2208 | } 2209 | }, 2210 | "status": "OK", 2211 | "code": 200, 2212 | "_postman_previewlanguage": "json", 2213 | "header": [ 2214 | { 2215 | "key": "Content-Length", 2216 | "value": "137" 2217 | }, 2218 | { 2219 | "key": "Content-Type", 2220 | "value": "application/json" 2221 | }, 2222 | { 2223 | "key": "Server", 2224 | "value": "Couchbase Sync Gateway/3.0.0 EE" 2225 | }, 2226 | { 2227 | "key": "Date", 2228 | "value": "Mon, 22 Nov 2021 23:32:43 GMT" 2229 | } 2230 | ], 2231 | "cookie": [], 2232 | "body": "{\n \"couchdb\": \"Welcome\",\n \"vendor\": {\n \"name\": \"Couchbase Sync Gateway\",\n \"version\": \"3.0\"\n },\n \"version\": \"Couchbase Sync Gateway/3.0.0(460;26daced) EE\"\n}" 2233 | }, 2234 | { 2235 | "name": "Meta-information about the server.", 2236 | "originalRequest": { 2237 | "method": "GET", 2238 | "header": [ 2239 | { 2240 | "description": "Added as a part of security scheme: apikey", 2241 | "key": "Cookie", 2242 | "value": "" 2243 | } 2244 | ], 2245 | "url": { 2246 | "raw": "{{publicUrl}}/", 2247 | "host": [ 2248 | "{{publicUrl}}" 2249 | ], 2250 | "path": [ 2251 | "" 2252 | ] 2253 | } 2254 | }, 2255 | "status": "OK", 2256 | "code": 200, 2257 | "_postman_previewlanguage": "json", 2258 | "header": [ 2259 | { 2260 | "key": "Content-Type", 2261 | "value": "application/json" 2262 | } 2263 | ], 2264 | "cookie": [], 2265 | "body": "{\n \"couchdb\": \"tempor aute anim commodo\",\n \"vendor/name\": \"p\",\n \"vendor/version\": \"incididunt ex non eu\",\n \"version\": \"dolor adipisicing\"\n}" 2266 | } 2267 | ] 2268 | } 2269 | ], 2270 | "auth": { 2271 | "type": "apikey", 2272 | "apikey": [ 2273 | { 2274 | "key": "key", 2275 | "value": "Cookie", 2276 | "type": "string" 2277 | }, 2278 | { 2279 | "key": "value", 2280 | "value": "", 2281 | "type": "string" 2282 | }, 2283 | { 2284 | "key": "in", 2285 | "value": "header", 2286 | "type": "string" 2287 | } 2288 | ] 2289 | }, 2290 | "variable": [ 2291 | { 2292 | "key": "publicUrl", 2293 | "value": "http://localhost:4984/", 2294 | "type": "string" 2295 | } 2296 | ] 2297 | } -------------------------------------------------------------------------------- /travel-sample/sync-gateway-config-travelsample-bootstrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "bootstrap": { 3 | "server": "couchbases://cb-server", 4 | "server_tls_skip_verify": true, 5 | "username": "admin", 6 | "password": "password" 7 | }, 8 | "api": { 9 | "public_interface": ":4984", 10 | "admin_interface": ":4985", 11 | "metrics_interface": ":4986", 12 | "https": {} 13 | }, 14 | "logging": { 15 | "log_file_path": "/var/tmp/sglogs", 16 | "console": { 17 | "rotation": {}, 18 | "log_level": "debug", 19 | "log_keys": [ 20 | "*" 21 | ] 22 | }, 23 | "error": { 24 | "enabled": true, 25 | "rotation": { 26 | "max_size": 20, 27 | "max_age": 180 28 | } 29 | }, 30 | "warn": { 31 | "enabled": true, 32 | "rotation": { 33 | "max_size": 20, 34 | "max_age": 90 35 | } 36 | }, 37 | "info": { 38 | "enabled": false, 39 | "rotation": {} 40 | }, 41 | "debug": { 42 | "enabled": false, 43 | "rotation": {} 44 | }, 45 | "trace": { 46 | "rotation": {} 47 | }, 48 | "stats": { 49 | "rotation": {} 50 | } 51 | }, 52 | "auth": {}, 53 | "replicator": {}, 54 | "unsupported": {} 55 | } 56 | --------------------------------------------------------------------------------