diff --git a/modules/ROOT/assets/attachments/bundled-admin.yaml b/modules/ROOT/assets/attachments/bundled-admin.yaml index 2beae56c..1230a8de 100644 --- a/modules/ROOT/assets/attachments/bundled-admin.yaml +++ b/modules/ROOT/assets/attachments/bundled-admin.yaml @@ -54,7 +54,7 @@ paths: - name: db in: path required: true - schema: &ref_3 + schema: &ref_2 type: string example: db1 description: The name of the database to run the operation against. @@ -64,35 +64,55 @@ paths: responses: '200': description: Properties associated with a user session - content: &ref_4 + content: &ref_3 application/json: schema: type: object - properties: &ref_119 + properties: &ref_120 authentication_handlers: - description: The ways authentication can be established to authenticate as the user. + description: The ways authentication can be established to authenticate as a user. Used for CouchDB compatibility. Always contains "default" and "cookie". type: array - items: - type: string + enum: + - - default + - cookie + default: + - default + - cookie ok: + description: Used for CouchDB compatibility. Always true. type: boolean + enum: + - true userCtx: type: object properties: channels: - description: | - A map of the channels the user has access to and the sequence number each channel was created at. - - The key is the channel name and the value is the sequence number. + description: A map of the channels in the default collection that the user is in along with the sequence number the user was granted access. This does not include inherited channels through roles. type: object + additionalProperties: + x-additionalPropertiesName: channelName + type: number + minimum: 1 + description: The sequence number the user was granted access. + title: sequence number + example: + '!': 1 + channelA: 2 name: description: The name of the user. type: string - nullable: true + minLength: 1 + required: + - channels + - name + required: &ref_121 + - authentication_handlers + - ok + - userCtx title: User Session Information '404': description: Resource could not be found - content: &ref_2 + content: &ref_4 application/json: schema: type: object @@ -160,9 +180,9 @@ paths: session_id: c5af80a039db4ed9d2b6865576b6999935282689 expires: '2022-01-21T15:24:44Z' cookie_name: SyncGatewaySession - '400': - description: Origin is not in the approved list of allowed origins - content: &ref_106 + '401': + description: User does not have access to resource, or resource does not exist + content: &ref_150 application/json: schema: type: object @@ -170,8 +190,17 @@ paths: required: *ref_1 title: HTTP-Error '404': - description: Resource could not be found - content: *ref_2 + description: Return if database does not exist + content: + application/json: + schema: + type: object + properties: *ref_0 + required: *ref_1 + title: HTTP-Error + example: + error: not_found + reason: no such database "invalid-db" tags: - Session operationId: post_db-_session @@ -180,7 +209,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: sessionid @@ -202,10 +231,10 @@ paths: responses: '200': description: Properties associated with a user session - content: *ref_4 + content: *ref_3 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Session operationId: get_db-_session-sessionid @@ -223,7 +252,7 @@ paths: description: Successfully removed the user session '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Session operationId: delete_db-_session-sessionid @@ -273,7 +302,7 @@ paths: - name: include_doc in: query required: false - schema: &ref_111 + schema: &ref_112 type: string description: Include the body associated with the document. - name: redact @@ -388,7 +417,7 @@ paths: title: HTTP-Error '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: get_keyspace-_raw-docid @@ -435,7 +464,7 @@ paths: example: digraph graphname{"1-d4d949b7feafc8c31215684baa45b6cd" -> "2-4f3f24143ea43d85a9a340ac016fdfc4"; } '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: get_keyspace-_revtree-docid @@ -444,7 +473,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -524,7 +553,7 @@ paths: type: boolean '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Management operationId: get_db- @@ -548,7 +577,7 @@ paths: properties: {} '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: Cannot remove database from bucket content: @@ -574,7 +603,7 @@ paths: description: Database exists '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Management operationId: head_db- @@ -597,7 +626,7 @@ paths: in: query required: false description: If set, will not attempt to validate the configured OpenID Connect providers are reachable. - schema: &ref_41 + schema: &ref_42 type: boolean default: false requestBody: @@ -608,7 +637,7 @@ paths: description: The properties of a database configuration. type: object x-requirePropertiesSorted: true - properties: &ref_40 + properties: &ref_41 allow_empty_password: description: This controls whether users that are created can have an empty password or not. type: boolean @@ -790,24 +819,48 @@ paths: type: number default: 1 cors: - description: CORS configuration for this database; if present, overrides server's config. - type: object - properties: - headers: - description: List of allowed headers - type: array - items: - type: string - login_origin: - description: List of allowed login origins - type: array - items: - type: string - origin: - description: List of allowed origins, use ['*'] to allow access from everywhere - type: array - items: - type: string + allOf: + - type: object + properties: &ref_34 + headers: + description: |- + List of allowed headers. These headers will be added the `Access-Control-Allow-Headers` response to a valid CORS request. + + A recommended minimum set of values should be `["Accept-Encoding", "Authorization", "Content-Type", "If-Match"]`. + type: array + items: + type: string + example: + - Accept-Encoding + - Authorization + - Content-Type + - If-Match + login_origin: + description: |- + List of allowed origins to apply to public `/{db}/_session` API. + + To use cors on `/{db}/_session`, the domain must be present in both `login_origin` and `origin`. + + If configured, `Authorization` must be included in headers. + type: array + items: + type: string + example: + - https://example.com + max_age: + description: Value for `Access-Control-Maximum-Age`. Uses 0 by default. + type: integer + default: 0 + origin: + description: List of allowed origins for the public API. The request `Origin` header is checked against these values. If successful the `Origin` header is returned in the HTTP response header as `Access-Control-Allow-Origin`. + type: array + items: + type: string + example: + - https://example.com + title: Cors Configuration + - type: object + description: CORS configuration for this database; if present, overrides server's config. delta_sync: description: |- Delta sync configuration settings. @@ -1620,7 +1673,7 @@ paths: x-additionalPropertiesName: scopename description: Scope-specific configuration. type: object - properties: &ref_121 + properties: &ref_123 collections: description: An object keyed by collection name containing config for the specific collection. type: object @@ -1628,7 +1681,7 @@ paths: x-additionalPropertiesName: collectionname description: Collection-specific configuration. type: object - properties: &ref_120 + properties: &ref_122 sync: description: The Javascript function that newly created documents in this collection are ran through. type: string @@ -1749,6 +1802,14 @@ paths: remote_config_tls_skip_verify: description: Enable self-signed certificates for external JavaScript load. type: boolean + same_site_cookie: + description: Override the session cookie SameSite behavior. By default, a session cookie will have SameSite:None if CORS is enabled, and will have no SameSite attribute if CORS is not enabled. Setting this property to`Default` will omit the SameSite attribute from the cookie. + type: string + enum: + - Default + - Lax + - None + - Strict sgr_tls_skip_verify: description: Enable self-signed certificates for SG-replicate testing. type: boolean @@ -1909,15 +1970,15 @@ paths: - title: Simple description: The names of all databases. type: array - items: &ref_122 + items: &ref_124 type: string - example: &ref_123 + example: &ref_125 - db1 - db2 - title: Verbose description: Description of all databases. type: array - example: &ref_124 + example: &ref_126 - db_name: db1 bucket: bucket1 state: Online @@ -1928,7 +1989,7 @@ paths: state: Starting require_resync: true init_in_progress: true - items: &ref_125 + items: &ref_127 type: object properties: db_name: @@ -1959,7 +2020,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -1976,14 +2037,14 @@ paths: - name: name_only in: query required: false - schema: &ref_112 + schema: &ref_113 type: boolean default: true description: Whether to return user names only, or more detailed information for each user. - name: limit in: query required: false - schema: &ref_113 + schema: &ref_114 type: integer description: How many results to return. Using a value of `0` results in no limit. responses: @@ -2001,7 +2062,7 @@ paths: - Bob '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: get_db-_user- @@ -2028,7 +2089,7 @@ paths: description: New user created successfully '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: Resource already exists under that name content: &ref_18 @@ -2046,7 +2107,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: name @@ -2068,7 +2129,7 @@ paths: responses: '200': description: Properties associated with a user - content: &ref_148 + content: &ref_151 application/json: schema: description: Properties associated with a user @@ -2077,7 +2138,7 @@ paths: title: User '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: get_db-_user-name @@ -2100,7 +2161,7 @@ paths: description: New user created '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: put_db-_user-name @@ -2118,7 +2179,7 @@ paths: description: User deleted successfully '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: delete_db-_user-name @@ -2145,7 +2206,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: name @@ -2169,7 +2230,7 @@ paths: description: User now has no sessions '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Session operationId: delete_db-_user-name-_session @@ -2178,7 +2239,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: name @@ -2205,7 +2266,7 @@ paths: description: Session has been successfully removed as the user was associated with the session '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Session operationId: delete_db-_user-name-_session-sessionid @@ -2214,7 +2275,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -2254,7 +2315,7 @@ paths: - Moderator '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: get_db-_role- @@ -2281,7 +2342,7 @@ paths: description: New role created successfully '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: Resource already exists under that name content: *ref_18 @@ -2293,13 +2354,13 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: name in: path required: true - schema: &ref_114 + schema: &ref_115 type: string description: The name of the role. get: @@ -2315,7 +2376,7 @@ paths: responses: '200': description: Properties associated with a role - content: &ref_149 + content: &ref_152 application/json: schema: description: Properties associated with a role @@ -2324,7 +2385,7 @@ paths: title: Role '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: get_db-_role-name @@ -2347,7 +2408,7 @@ paths: description: Created '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: put_db-_role-name @@ -2365,7 +2426,7 @@ paths: description: OK '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security operationId: delete_db-_role-name @@ -2375,7 +2436,7 @@ paths: description: Role exists '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Security description: |- @@ -2393,7 +2454,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -2414,7 +2475,7 @@ paths: schema: description: Contains all the replication IDs with their corresponding replication configurations type: object - properties: &ref_126 + properties: &ref_128 replication_id: description: Properties of a replication allOf: &ref_22 @@ -2459,7 +2520,7 @@ paths: title: All replications '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Replication operationId: get_db-_replication- @@ -2494,7 +2555,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Replication operationId: post_db-_replication- @@ -2503,7 +2564,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: replicationid @@ -2533,7 +2594,7 @@ paths: title: Replication '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Replication operationId: get_db-_replication-replicationid @@ -2562,7 +2623,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Replication operationId: put_db-_replication-replicationid @@ -2582,7 +2643,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Replication operationId: delete_db-_replication-replicationid @@ -2607,7 +2668,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -2729,7 +2790,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: replicationid @@ -2830,7 +2891,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Replication operationId: put_db-_replicationStatus-replicationid @@ -2843,7 +2904,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Replication summary: Check if replication exists @@ -2914,7 +2975,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Profiling operationId: post__profile-profilename @@ -3001,7 +3062,7 @@ paths: in: query deprecated: true required: false - schema: &ref_39 + schema: &ref_40 type: boolean default: true description: No longer supported field. @@ -3019,7 +3080,7 @@ paths: schema: type: object x-requirePropertiesSorted: true - properties: &ref_131 + properties: &ref_133 api: description: Configuration settings for modifying how the REST API is interacted with. type: object @@ -3040,26 +3101,12 @@ paths: type: boolean default: true cors: - type: object - properties: - headers: - description: List of allowed headers - type: array - items: - type: string - login_origin: - description: List of allowed login origins - type: array - items: - type: string - max_age: - description: Maximum age of the CORS Options request - type: integer - origin: - description: List of allowed origins, use ['*'] to allow access from everywhere - type: array - items: - type: string + allOf: + - type: object + description: CORS configuration for all databases + - type: object + properties: *ref_34 + title: Cors Configuration enable_advanced_auth_dp: description: |- Whether to enable the DP permissions check feature of admin auth. @@ -3230,7 +3277,7 @@ paths: x-additionalPropertiesName: bucketname description: The configuration for the credentials set. type: object - properties: &ref_34 + properties: &ref_35 username: description: Username for authenticating to the bucket type: string @@ -3252,7 +3299,7 @@ paths: x-additionalPropertiesName: databasename description: The configuration for the credentials set. type: object - properties: *ref_34 + properties: *ref_35 title: Credentials config readOnly: true heap_profile_collection_threshold: @@ -3269,7 +3316,7 @@ paths: type: object allOf: - type: object - properties: &ref_35 + properties: &ref_36 log_file_path: description: Absolute or relative path on the filesystem to the log file directory. A relative path is from the directory that contains the Sync Gateway executable file. type: string @@ -3287,9 +3334,9 @@ paths: console: allOf: - title: Configuration for console logging. - allOf: &ref_128 + allOf: &ref_130 - type: object - properties: &ref_127 + properties: &ref_129 log_level: description: Log Level for the console output type: string @@ -3654,7 +3701,7 @@ paths: audit: type: object title: Audit logging config - properties: &ref_129 + properties: &ref_131 enabled: description: Toggle for this log output type: boolean @@ -3760,7 +3807,7 @@ paths: serverless: description: Configuration for when SG is running in serverless mode type: object - properties: &ref_130 + properties: &ref_132 enabled: description: Run SG in to serverless mode type: boolean @@ -3817,11 +3864,11 @@ paths: application/json: schema: type: object - properties: &ref_132 + properties: &ref_134 logging: allOf: - type: object - properties: *ref_35 + properties: *ref_36 max_concurrent_replications: description: Maximum number of concurrent replication connections allowed. If set to 0 this limit will be ignored. type: integer @@ -3852,7 +3899,7 @@ paths: application/json: schema: type: object - properties: &ref_133 + properties: &ref_135 databases: description: Contains a map of all the databases in the node along with their status. type: object @@ -3922,7 +3969,7 @@ paths: allOf: - description: Product vendor type: object - properties: &ref_56 + properties: &ref_57 name: description: Product name type: string @@ -3933,7 +3980,7 @@ paths: Omitted if `api.hide_product_version=true` type: string example: 3.1 - required: &ref_57 + required: &ref_58 - name title: Vendor title: Status @@ -4090,12 +4137,12 @@ paths: - name: seconds in: query description: If set, collect a delta profile for the given duration, instead of a snapshot. - schema: &ref_36 + schema: &ref_37 type: integer responses: '200': description: OK - content: &ref_37 + content: &ref_38 application/octet-stream: schema: description: pprof binary data @@ -4116,11 +4163,11 @@ paths: - name: seconds in: query description: If set, collect a delta profile for the given duration, instead of a snapshot. - schema: *ref_36 + schema: *ref_37 responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: post__debug-pprof-goroutine @@ -4205,11 +4252,11 @@ paths: - name: seconds in: query description: If set, collect a delta profile for the given duration, instead of a snapshot. - schema: *ref_36 + schema: *ref_37 responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: get__debug-pprof-heap @@ -4223,11 +4270,11 @@ paths: - name: seconds in: query description: If set, collect a delta profile for the given duration, instead of a snapshot. - schema: *ref_36 + schema: *ref_37 responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: post__debug-pprof-heap @@ -4242,11 +4289,11 @@ paths: - name: seconds in: query description: If set, collect a delta profile for the given duration, instead of a snapshot. - schema: *ref_36 + schema: *ref_37 responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: get__debug-pprof-profile @@ -4260,11 +4307,11 @@ paths: - name: seconds in: query description: If set, collect a delta profile for the given duration, instead of a snapshot. - schema: *ref_36 + schema: *ref_37 responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: post__debug-pprof-profile @@ -4281,7 +4328,7 @@ paths: - name: seconds in: query required: false - schema: &ref_38 + schema: &ref_39 type: integer default: 30 minimum: 0 @@ -4289,7 +4336,7 @@ paths: responses: '200': description: OK - content: *ref_37 + content: *ref_38 '403': description: Forbidden content: @@ -4317,12 +4364,12 @@ paths: - name: seconds in: query required: false - schema: *ref_38 + schema: *ref_39 description: The amount of seconds to run the profiler for. responses: '200': description: OK - content: *ref_37 + content: *ref_38 '403': description: Forbidden content: @@ -4348,7 +4395,7 @@ paths: responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: get__debug-pprof-threadcreate @@ -4361,7 +4408,7 @@ paths: responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: post__debug-pprof-threadcreate @@ -4378,12 +4425,12 @@ paths: - name: seconds in: query required: false - schema: *ref_38 + schema: *ref_39 description: The amount of seconds to run the profiler for. responses: '200': description: OK - content: *ref_37 + content: *ref_38 '403': description: Forbidden content: @@ -4411,12 +4458,12 @@ paths: - name: seconds in: query required: false - schema: *ref_38 + schema: *ref_39 description: The amount of seconds to run the profiler for. responses: '200': description: OK - content: *ref_37 + content: *ref_38 '403': description: Forbidden content: @@ -4450,7 +4497,7 @@ paths: responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: get__debug-pprof-trace @@ -4471,7 +4518,7 @@ paths: responses: '200': description: OK - content: *ref_37 + content: *ref_38 tags: - Profiling operationId: post__debug-pprof-trace @@ -4488,7 +4535,7 @@ paths: - name: seconds in: query required: false - schema: *ref_38 + schema: *ref_39 description: The amount of seconds to run the profiler for. responses: '200': @@ -4512,7 +4559,7 @@ paths: - name: seconds in: query required: false - schema: *ref_38 + schema: *ref_39 description: The amount of seconds to run the profiler for. responses: '200': @@ -4594,7 +4641,7 @@ paths: in: query deprecated: true required: false - schema: *ref_39 + schema: *ref_40 description: No longer supported field. - name: include_javascript in: query @@ -4605,7 +4652,7 @@ paths: - name: include_runtime in: query required: false - schema: &ref_115 + schema: &ref_116 type: boolean default: false description: Whether to include the values set at runtime, and default values. @@ -4629,11 +4676,11 @@ paths: description: The properties of a database configuration. type: object x-requirePropertiesSorted: true - properties: *ref_40 + properties: *ref_41 title: Database-config '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Configuration operationId: get_db-_config @@ -4652,14 +4699,14 @@ paths: - name: If-Match in: header required: false - schema: &ref_42 + schema: &ref_43 type: string description: If set to a configuration's Etag value, enables optimistic concurrency control for the request. Returns HTTP 412 if another update happened underneath this one. - name: disable_oidc_validation in: query required: false description: If set, will not attempt to validate the configured OpenID Connect providers are reachable. - schema: *ref_41 + schema: *ref_42 requestBody: description: The new database configuration to use content: @@ -4668,12 +4715,12 @@ paths: description: The properties of a database configuration. type: object x-requirePropertiesSorted: true - properties: *ref_40 + properties: *ref_41 title: Database-config responses: '201': description: Database configuration successfully updated - headers: &ref_43 + headers: &ref_44 Etag: schema: type: string @@ -4683,7 +4730,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '412': description: |- Precondition Failed @@ -4691,7 +4738,7 @@ paths: The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. - content: &ref_44 + content: &ref_45 application/json: schema: type: object @@ -4719,7 +4766,7 @@ paths: - name: If-Match in: header required: false - schema: *ref_42 + schema: *ref_43 description: If set to a configuration's Etag value, enables optimistic concurrency control for the request. Returns HTTP 412 if another update happened underneath this one. requestBody: description: The database configuration fields to update @@ -4729,12 +4776,12 @@ paths: description: The properties of a database configuration. type: object x-requirePropertiesSorted: true - properties: *ref_40 + properties: *ref_41 title: Database-config responses: '201': description: Database configuration successfully updated - headers: *ref_43 + headers: *ref_44 '400': description: There was a problem with your request content: *ref_11 @@ -4747,7 +4794,7 @@ paths: The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. - content: *ref_44 + content: *ref_45 tags: - Database Configuration operationId: post_db-_config @@ -4755,7 +4802,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. /{db}/_config/audit: @@ -4789,7 +4836,7 @@ paths: oneOf: - title: Simple description: A map of audit events and whether they are enabled or not. - properties: &ref_45 + properties: &ref_46 enabled: type: boolean events: @@ -4838,7 +4885,7 @@ paths: type: string - title: Verbose description: A map of detailed audit events. - properties: &ref_46 + properties: &ref_47 enabled: type: boolean events: @@ -4848,7 +4895,7 @@ paths: description: The audit event ID and whether it is enabled or not. title: audit-event-verbose type: object - properties: &ref_134 + properties: &ref_136 name: type: string description: The name of the audit event. @@ -4904,7 +4951,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Configuration operationId: get_db-_config-audit @@ -4926,10 +4973,10 @@ paths: oneOf: - title: Simple description: A map of audit events and whether they are enabled or not. - properties: *ref_45 + properties: *ref_46 - title: Verbose description: A map of detailed audit events. - properties: *ref_46 + properties: *ref_47 responses: '200': description: Database audit configuration successfully updated @@ -4938,7 +4985,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Configuration operationId: put_db-_config-audit @@ -4967,10 +5014,10 @@ paths: oneOf: - title: Simple description: A map of audit events and whether they are enabled or not. - properties: *ref_45 + properties: *ref_46 - title: Verbose description: A map of detailed audit events. - properties: *ref_46 + properties: *ref_47 responses: '200': description: Database audit configuration successfully updated @@ -4986,7 +5033,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. /{keyspace}/_config/sync: @@ -5028,7 +5075,7 @@ paths: } '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Configuration operationId: get_keyspace-_config-sync @@ -5044,13 +5091,13 @@ paths: - name: If-Match in: header required: false - schema: *ref_42 + schema: *ref_43 description: If set to a configuration's Etag value, enables optimistic concurrency control for the request. Returns HTTP 412 if another update happened underneath this one. - name: disable_oidc_validation in: query required: false description: If set, will not attempt to validate the configured OpenID Connect providers are reachable. - schema: *ref_41 + schema: *ref_42 requestBody: description: The new sync function to use content: @@ -5069,7 +5116,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '412': description: |- Precondition Failed @@ -5077,7 +5124,7 @@ paths: The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. - content: *ref_44 + content: *ref_45 tags: - Database Configuration operationId: put_keyspace-_config-sync @@ -5100,7 +5147,7 @@ paths: - name: If-Match in: header required: false - schema: &ref_81 + schema: &ref_82 type: string description: An optimistic concurrency control (OCC) value used to prevent conflicts. Use the value returned in the ETag response header of the GET request for the resource being updated, or the latest known Revision Tree ID or Current Version of the document. responses: @@ -5108,7 +5155,7 @@ paths: description: Successfully reset the sync function '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '412': description: |- Precondition Failed @@ -5116,7 +5163,7 @@ paths: The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. - content: *ref_44 + content: *ref_45 tags: - Database Configuration operationId: delete_keyspace-_config-sync @@ -5155,7 +5202,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Configuration operationId: get_keyspace-_config-import_filter @@ -5171,13 +5218,13 @@ paths: - name: If-Match in: header required: false - schema: *ref_42 + schema: *ref_43 description: If set to a configuration's Etag value, enables optimistic concurrency control for the request. Returns HTTP 412 if another update happened underneath this one. - name: disable_oidc_validation in: query required: false description: If set, will not attempt to validate the configured OpenID Connect providers are reachable. - schema: *ref_41 + schema: *ref_42 requestBody: description: The import filter to use content: @@ -5192,7 +5239,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '412': description: |- Precondition Failed @@ -5200,7 +5247,7 @@ paths: The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. - content: *ref_44 + content: *ref_45 tags: - Database Configuration operationId: put_keyspace-_config-import_filter @@ -5216,14 +5263,14 @@ paths: - name: If-Match in: header required: false - schema: *ref_42 + schema: *ref_43 description: If set to a configuration's Etag value, enables optimistic concurrency control for the request. Returns HTTP 412 if another update happened underneath this one. responses: '200': description: Successfully deleted the import filter '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '412': description: |- Precondition Failed @@ -5231,7 +5278,7 @@ paths: The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. - content: *ref_44 + content: *ref_45 tags: - Database Configuration operationId: delete_keyspace-_config-import_filter @@ -5240,7 +5287,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -5259,7 +5306,7 @@ paths: schema: description: The status of a resync operation type: object - properties: &ref_49 + properties: &ref_50 status: description: The status of the current operation. type: string @@ -5286,20 +5333,20 @@ paths: allOf: - description: scope name with one or more collection names for which resync will be triggered type: object - additionalProperties: &ref_47 + additionalProperties: &ref_48 allOf: - description: List of collection names type: array - items: &ref_135 + items: &ref_137 type: string example: - collection1 - collection2 - example: &ref_48 + example: &ref_49 scopeName: - collection1 - collection2 - required: &ref_50 + required: &ref_51 - status - start_time - last_error @@ -5308,7 +5355,7 @@ paths: title: Resync-status '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Management operationId: get_db-_resync @@ -5362,8 +5409,8 @@ paths: allOf: - description: scope name with one or more collection names for which resync will be triggered type: object - additionalProperties: *ref_47 - example: *ref_48 + additionalProperties: *ref_48 + example: *ref_49 regenerate_sequences: description: This can be used as an alternative to query param `regenerate_sequences`. If either query param or this is set to true, then the request will regenerate the sequence numbers for each document processed. type: boolean @@ -5376,8 +5423,8 @@ paths: schema: description: The status of a resync operation type: object - properties: *ref_49 - required: *ref_50 + properties: *ref_50 + required: *ref_51 title: Resync-status '503': description: Service Unavailable @@ -5396,7 +5443,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -5434,7 +5481,7 @@ paths: allOf: - type: object description: Settings for Global Secondary Indexes (GSI). - properties: &ref_51 + properties: &ref_52 create_separate_principal_indexes: description: |- Whether to create separate indexes for users and roles instead of a single larger syncDocs index. @@ -5458,7 +5505,7 @@ paths: schema: description: The status of an asynchronous indexes initialization operation. type: object - properties: &ref_52 + properties: &ref_53 status: description: The status of the current operation. type: string @@ -5504,8 +5551,8 @@ paths: allOf: - type: object description: Settings for Global Secondary Indexes (GSI). - properties: *ref_51 - required: &ref_53 + properties: *ref_52 + required: &ref_54 - status - start_time - last_error @@ -5539,12 +5586,12 @@ paths: schema: description: The status of an asynchronous indexes initialization operation. type: object - properties: *ref_52 - required: *ref_53 + properties: *ref_53 + required: *ref_54 title: IndexInitStatus '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Management operationId: get_db-_index_init @@ -5645,7 +5692,7 @@ paths: title: HTTP-Error '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: post_keyspace-_purge @@ -5654,7 +5701,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -5674,7 +5721,7 @@ paths: description: Successfully flushed the bucket '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '503': description: The bucket does not support flush or delete content: @@ -5692,7 +5739,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -5730,7 +5777,7 @@ paths: description: Database will be brought online immediately or with the specified delay '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '503': description: An error occurred content: @@ -5748,7 +5795,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -5776,7 +5823,7 @@ paths: description: Database has been taken offline successfully '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '503': description: An error occurred while trying to take the database offline content: @@ -5794,13 +5841,13 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: view in: path required: true - schema: &ref_54 + schema: &ref_55 type: string description: The view to target. get: @@ -5823,7 +5870,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: Internal Server Error content: @@ -5841,13 +5888,13 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: view in: path required: true - schema: *ref_54 + schema: *ref_55 description: The view to target. get: summary: Query a view on the default design document | Unsupported @@ -5865,67 +5912,67 @@ paths: in: query required: false description: Indicates whether the specified end key should be included in the result. - schema: &ref_61 + schema: &ref_62 type: boolean - name: descending in: query required: false description: Return documents in descending order. - schema: &ref_62 + schema: &ref_63 type: boolean - name: include_docs in: query required: false description: Only works when using Couchbase Server 3.0 and earlier. Indicates whether to include the full content of the documents in the response. - schema: &ref_63 + schema: &ref_64 type: boolean - name: reduce in: query required: false description: Whether to execute a reduce function on the response or not. - schema: &ref_64 + schema: &ref_65 type: boolean - name: group in: query required: false description: Group the results using the reduce function to a group or single row. - schema: &ref_65 + schema: &ref_66 type: boolean - name: skip in: query required: false description: Skip the specified number of documents before starting to return results. - schema: &ref_66 + schema: &ref_67 type: integer - name: limit in: query required: false description: Return only the specified number of documents - schema: &ref_67 + schema: &ref_68 type: integer - name: group_level in: query required: false description: Specify the group level to be used. - schema: &ref_68 + schema: &ref_69 type: integer - name: startkey_docid in: query required: false description: Return documents starting with the specified document identifier. - schema: &ref_69 + schema: &ref_70 type: string - name: endkey_docid in: query required: false description: Stop returning records when the specified document identifier is reached. - schema: &ref_70 + schema: &ref_71 type: string - name: stale in: query required: false description: Allow the results from a stale view to be used, without triggering a rebuild of all views within the encompassing design document. - schema: &ref_71 + schema: &ref_72 type: string enum: - ok @@ -5933,25 +5980,25 @@ paths: - name: startkey in: query required: false - schema: &ref_72 + schema: &ref_73 type: string description: Return records starting with the specified key. - name: endkey in: query required: false - schema: &ref_73 + schema: &ref_74 type: string description: Stop returning records when this key is reached. - name: key in: query required: false description: Return only the document that matches the specified key. - schema: &ref_74 + schema: &ref_75 type: string - name: keys in: query required: false - schema: &ref_75 + schema: &ref_76 type: array items: type: string @@ -5995,7 +6042,7 @@ paths: description: Forbidden '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: get_db-_view-view @@ -6042,7 +6089,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: get_keyspace-_dumpchannel-channel @@ -6051,7 +6098,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -6073,7 +6120,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -6094,7 +6141,7 @@ paths: - name: type in: query required: false - schema: &ref_55 + schema: &ref_56 type: string default: tombstone enum: @@ -6137,7 +6184,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '503': description: Cannot start compaction due to another compaction operation still running. content: @@ -6162,7 +6209,7 @@ paths: - name: type in: query required: false - schema: *ref_55 + schema: *ref_56 description: |- This is the type of compaction to use. The type must be either: * `attachment` for cleaning up legacy (pre-3.0) attachments @@ -6175,7 +6222,7 @@ paths: schema: description: The status returned from a compaction. type: object - properties: &ref_136 + properties: &ref_138 status: description: The status of the current operation. type: string @@ -6225,7 +6272,7 @@ paths: - mark - sweep - cleanup - required: &ref_137 + required: &ref_139 - status - start_time - last_error @@ -6235,7 +6282,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Management operationId: get_db-_compact @@ -6244,7 +6291,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -6280,7 +6327,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '503': description: Cannot start attachment migration due to another migration operation still running. content: @@ -6309,7 +6356,7 @@ paths: schema: description: The status of a attachment migration operation type: object - properties: &ref_138 + properties: &ref_140 status: description: The status of the current attachment migration operation. type: string @@ -6337,7 +6384,7 @@ paths: docs_failed: description: The amount of docs that have failed to be processed through the attachment migration operation. type: integer - required: &ref_139 + required: &ref_141 - status - start_time - last_error @@ -6349,7 +6396,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Database Management operationId: get_db-_attachment_migration @@ -6376,7 +6423,7 @@ paths: - name: roundtrip in: query required: false - schema: &ref_78 + schema: &ref_79 type: boolean description: Block until document has been received by change cache requestBody: @@ -6386,7 +6433,7 @@ paths: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: &ref_82 + properties: &ref_83 _id: description: The ID of the document. type: string @@ -6443,7 +6490,7 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: &ref_76 + properties: &ref_77 id: description: The ID of the document. type: string @@ -6456,7 +6503,7 @@ paths: cv: description: The CV of the document. type: string - required: &ref_77 + required: &ref_78 - id - ok - rev @@ -6466,13 +6513,13 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: Resource already exists under that name content: *ref_18 '415': description: Invalid content type - content: &ref_83 + content: &ref_84 application/json: schema: type: object @@ -6506,7 +6553,7 @@ paths: application/json: schema: type: object - properties: &ref_140 + properties: &ref_142 cmdline: description: Built-in variables from the Go runtime, lists the command-line arguments type: object @@ -6752,7 +6799,7 @@ paths: application/json: schema: type: object - properties: &ref_141 + properties: &ref_143 ADMIN: description: '`true` if the request is from the Admin API - otherwise omitted.' type: boolean @@ -6765,8 +6812,8 @@ paths: allOf: - description: Product vendor type: object - properties: *ref_56 - required: *ref_57 + properties: *ref_57 + required: *ref_58 title: Vendor version: description: |- @@ -6780,7 +6827,7 @@ paths: `true` if the sync gateway node is running in persistent config mode. type: boolean example: true - required: &ref_142 + required: &ref_144 - couchdb - vendor tags: @@ -6861,7 +6908,7 @@ paths: - name: include_docs in: query required: false - schema: &ref_91 + schema: &ref_92 type: boolean description: Include the body associated with each document. - name: revocations @@ -6935,12 +6982,12 @@ paths: responses: '200': description: Successfully returned the changes feed - content: &ref_58 + content: &ref_59 application/json: schema: description: Properties of a changes feed type: object - properties: &ref_143 + properties: &ref_145 results: type: array items: @@ -6979,7 +7026,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: get_keyspace-_changes @@ -7050,13 +7097,13 @@ paths: responses: '200': description: Successfully returned the changes feed - content: *ref_58 + content: *ref_59 '400': description: There was a problem with your request content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: post_keyspace-_changes @@ -7065,13 +7112,13 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: ddoc in: path required: true - schema: &ref_60 + schema: &ref_61 type: string description: The design document name. get: @@ -7093,7 +7140,7 @@ paths: schema: description: Properties of a design document type: object - properties: &ref_59 + properties: &ref_60 language: type: string views: @@ -7122,7 +7169,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: get_db-_design-ddoc @@ -7142,7 +7189,7 @@ paths: schema: description: Properties of a design document type: object - properties: *ref_59 + properties: *ref_60 responses: '200': description: Design document changes successfully @@ -7150,7 +7197,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: put_db-_design-ddoc @@ -7171,7 +7218,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: delete_db-_design-ddoc @@ -7183,7 +7230,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported description: |- @@ -7202,18 +7249,18 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. - name: ddoc in: path required: true - schema: *ref_60 + schema: *ref_61 description: The design document name. - name: view in: path required: true - schema: *ref_54 + schema: *ref_55 description: The view to target. get: summary: Query a view on a design document | Unsupported @@ -7231,76 +7278,76 @@ paths: in: query required: false description: Indicates whether the specified end key should be included in the result. - schema: *ref_61 + schema: *ref_62 - name: descending in: query required: false description: Return documents in descending order. - schema: *ref_62 + schema: *ref_63 - name: include_docs in: query required: false description: Only works when using Couchbase Server 3.0 and earlier. Indicates whether to include the full content of the documents in the response. - schema: *ref_63 + schema: *ref_64 - name: reduce in: query required: false description: Whether to execute a reduce function on the response or not. - schema: *ref_64 + schema: *ref_65 - name: group in: query required: false description: Group the results using the reduce function to a group or single row. - schema: *ref_65 + schema: *ref_66 - name: skip in: query required: false description: Skip the specified number of documents before starting to return results. - schema: *ref_66 + schema: *ref_67 - name: limit in: query required: false description: Return only the specified number of documents - schema: *ref_67 + schema: *ref_68 - name: group_level in: query required: false description: Specify the group level to be used. - schema: *ref_68 + schema: *ref_69 - name: startkey_docid in: query required: false description: Return documents starting with the specified document identifier. - schema: *ref_69 + schema: *ref_70 - name: endkey_docid in: query required: false description: Stop returning records when the specified document identifier is reached. - schema: *ref_70 + schema: *ref_71 - name: stale in: query required: false description: Allow the results from a stale view to be used, without triggering a rebuild of all views within the encompassing design document. - schema: *ref_71 + schema: *ref_72 - name: startkey in: query required: false - schema: *ref_72 + schema: *ref_73 description: Return records starting with the specified key. - name: endkey in: query required: false - schema: *ref_73 + schema: *ref_74 description: Stop returning records when this key is reached. - name: key in: query required: false description: Return only the document that matches the specified key. - schema: *ref_74 + schema: *ref_75 - name: keys in: query required: false - schema: *ref_75 + schema: *ref_76 description: An array of document ID strings to filter by. responses: '200': @@ -7341,7 +7388,7 @@ paths: description: Forbidden '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: get_db-_design-ddoc-_view-view @@ -7399,7 +7446,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: post_keyspace-_revs_diff @@ -7439,7 +7486,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: get_keyspace-_local-docid @@ -7472,15 +7519,15 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_76 - required: *ref_77 + properties: *ref_77 + required: *ref_78 title: New-revision '400': description: There was a problem with your request content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: A conflict would result from updating this document revision. tags: @@ -7511,7 +7558,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: A conflict would result from deleting this document revision. tags: @@ -7526,7 +7573,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document summary: Check if local document exists @@ -7570,14 +7617,14 @@ paths: - name: rev in: query required: false - schema: &ref_80 + schema: &ref_81 type: string example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: open_revs in: query required: false - schema: &ref_85 + schema: &ref_86 type: array items: type: string @@ -7585,13 +7632,13 @@ paths: - name: show_exp in: query required: false - schema: &ref_86 + schema: &ref_87 type: boolean description: Whether to show the expiry property (`_exp`) in the response. - name: revs_from in: query required: false - schema: &ref_87 + schema: &ref_88 type: array items: type: string @@ -7599,7 +7646,7 @@ paths: - name: atts_since in: query required: false - schema: &ref_88 + schema: &ref_89 type: array items: type: string @@ -7607,19 +7654,19 @@ paths: - name: revs_limit in: query required: false - schema: &ref_89 + schema: &ref_90 type: integer description: Maximum amount of revisions to return for each document. - name: attachments in: query required: false - schema: &ref_90 + schema: &ref_91 type: boolean description: Include attachment bodies in response. - name: replicator2 in: query required: false - schema: &ref_79 + schema: &ref_80 type: boolean description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. responses: @@ -7654,7 +7701,7 @@ paths: Document ID is not in an allowed format therefore is invalid. This could be because it is over 250 characters or is prefixed with an underscore ("_"). - content: &ref_84 + content: &ref_85 application/json: schema: type: object @@ -7663,7 +7710,7 @@ paths: title: HTTP-Error '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '501': description: Not Implemented. It is likely this error was caused due to trying to use an enterprise-only feature on the community edition. content: @@ -7694,30 +7741,30 @@ paths: - name: roundtrip in: query required: false - schema: *ref_78 + schema: *ref_79 description: Block until document has been received by change cache - name: replicator2 in: query required: false - schema: *ref_79 + schema: *ref_80 description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. - name: new_edits in: query required: false - schema: &ref_116 + schema: &ref_117 type: boolean default: true description: 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 for replication. This option must be used in conjunction with the `_revisions` property in the request body. - name: rev in: query required: false - schema: *ref_80 + schema: *ref_81 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: If-Match in: header required: false - schema: *ref_81 + schema: *ref_82 description: An optimistic concurrency control (OCC) value used to prevent conflicts. Use the value returned in the ETag response header of the GET request for the resource being updated, or the latest known Revision Tree ID or Current Version of the document. requestBody: content: @@ -7726,7 +7773,7 @@ paths: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: *ref_82 + properties: *ref_83 responses: '201': description: Created @@ -7740,21 +7787,21 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_76 - required: *ref_77 + properties: *ref_77 + required: *ref_78 title: New-revision '400': description: There was a problem with your request content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: Resource already exists under that name content: *ref_18 '415': description: Invalid content type - content: *ref_83 + content: *ref_84 tags: - Document operationId: put_keyspace-docid @@ -7772,31 +7819,31 @@ paths: - name: rev in: query required: false - schema: *ref_80 + schema: *ref_81 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: If-Match in: header required: false - schema: *ref_81 + schema: *ref_82 description: An optimistic concurrency control (OCC) value used to prevent conflicts. Use the value returned in the ETag response header of the GET request for the resource being updated, or the latest known Revision Tree ID or Current Version of the document. responses: '200': description: New revision created successfully - content: &ref_150 + content: &ref_153 application/json: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_76 - required: *ref_77 + properties: *ref_77 + required: *ref_78 title: New-revision '400': description: There was a problem with your request content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: delete_keyspace-docid @@ -7809,10 +7856,10 @@ paths: Document ID is not in an allowed format therefore is invalid. This could be because it is over 250 characters or is prefixed with an underscore ("_"). - content: *ref_84 + content: *ref_85 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document summary: Check if a document exists @@ -7820,43 +7867,43 @@ paths: - name: rev in: query required: false - schema: *ref_80 + schema: *ref_81 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: open_revs in: query required: false - schema: *ref_85 + schema: *ref_86 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 bodies that haven''t been pruned are guaranteed to be returned. If 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.' - name: show_exp in: query required: false - schema: *ref_86 + schema: *ref_87 description: Whether to show the expiry property (`_exp`) in the response. - name: revs_from in: query required: false - schema: *ref_87 + schema: *ref_88 description: Trim the revision history to stop at the first revision in the provided list. If no match is found, the revisions will be trimmed to the `revs_limit`. - name: atts_since in: query required: false - schema: *ref_88 + schema: *ref_89 description: Include attachments only since specified revisions. Excludes the attachments for the specified revisions. Only gets used if `attachments=true`. - name: revs_limit in: query required: false - schema: *ref_89 + schema: *ref_90 description: Maximum amount of revisions to return for each document. - name: attachments in: query required: false - schema: *ref_90 + schema: *ref_91 description: Include attachment bodies in response. - name: replicator2 in: query required: false - schema: *ref_79 + schema: *ref_80 description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. description: |- Return a status code based on if the document exists or not. @@ -7906,7 +7953,7 @@ paths: - name: rev in: query required: false - schema: *ref_80 + schema: *ref_81 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: content_encoding @@ -7943,7 +7990,7 @@ paths: description: Partial attachment content returned '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '416': description: Requested range exceeds content length tags: @@ -7998,12 +8045,12 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_76 - required: *ref_77 + properties: *ref_77 + required: *ref_78 title: New-revision '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: Resource already exists under that name content: *ref_18 @@ -8025,7 +8072,7 @@ paths: description: The attachment digest. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document summary: Check if attachment exists @@ -8040,7 +8087,7 @@ paths: - name: rev in: query required: false - schema: *ref_80 + schema: *ref_81 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) operationId: head_keyspace-docid-attach @@ -8074,12 +8121,12 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_76 - required: *ref_77 + properties: *ref_77 + required: *ref_78 title: New-revision '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '409': description: Resource already exists under that name content: *ref_18 @@ -8113,57 +8160,57 @@ paths: - name: include_docs in: query required: false - schema: *ref_91 + schema: *ref_92 description: Include the body associated with each document. - name: channels in: query required: false - schema: &ref_92 + schema: &ref_93 type: boolean description: Include the channels each document is part of that the calling user also has access too. - name: access in: query required: false - schema: &ref_93 + schema: &ref_94 type: boolean description: Include what user/roles that each document grants access too. - name: revs in: query required: false - schema: &ref_94 + schema: &ref_95 type: boolean description: Include all the revisions for each document under the `_revisions` property. - name: update_seq in: query required: false - schema: &ref_95 + schema: &ref_96 type: boolean description: Include the document sequence number `update_seq` property for each document. - name: keys in: query required: false - schema: *ref_75 + schema: *ref_76 description: An array of document ID strings to filter by. - name: startkey in: query required: false - schema: *ref_72 + schema: *ref_73 description: Return records starting with the specified key. - name: endkey in: query required: false - schema: *ref_73 + schema: *ref_74 description: Stop returning records when this key is reached. - name: limit in: query required: false - schema: &ref_96 + schema: &ref_97 type: number description: This limits the number of result rows returned. Using a value of `0` has the same effect as the value `1`. responses: '200': description: Operation ran successfully - content: &ref_97 + content: &ref_98 application/json: schema: type: object @@ -8198,7 +8245,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: get_keyspace-_all_docs @@ -8218,42 +8265,42 @@ paths: - name: include_docs in: query required: false - schema: *ref_91 + schema: *ref_92 description: Include the body associated with each document. - name: channels in: query required: false - schema: *ref_92 + schema: *ref_93 description: Include the channels each document is part of that the calling user also has access too. - name: access in: query required: false - schema: *ref_93 + schema: *ref_94 description: Include what user/roles that each document grants access too. - name: revs in: query required: false - schema: *ref_94 + schema: *ref_95 description: Include all the revisions for each document under the `_revisions` property. - name: update_seq in: query required: false - schema: *ref_95 + schema: *ref_96 description: Include the document sequence number `update_seq` property for each document. - name: startkey in: query required: false - schema: *ref_72 + schema: *ref_73 description: Return records starting with the specified key. - name: endkey in: query required: false - schema: *ref_73 + schema: *ref_74 description: Stop returning records when this key is reached. - name: limit in: query required: false - schema: *ref_96 + schema: *ref_97 description: This limits the number of result rows returned. Using a value of `0` has the same effect as the value `1`. requestBody: content: @@ -8271,13 +8318,13 @@ paths: responses: '200': description: Operation ran successfully - content: *ref_97 + content: *ref_98 '400': description: There was a problem with your request content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: post_keyspace-_all_docs @@ -8322,7 +8369,7 @@ paths: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: *ref_82 + properties: *ref_83 required: - docs example: @@ -8394,7 +8441,7 @@ paths: content: *ref_11 '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: post_keyspace-_bulk_docs @@ -8434,7 +8481,7 @@ paths: - name: revs in: query required: false - schema: *ref_94 + schema: *ref_95 description: Include all the revisions for each document under the `_revisions` property. - name: revs_limit in: query @@ -8481,7 +8528,7 @@ paths: description: Bad Request '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Document operationId: post_keyspace-_bulk_get @@ -8490,7 +8537,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8500,13 +8547,13 @@ paths: - name: provider in: query required: false - schema: &ref_98 + schema: &ref_99 type: string description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. - name: offline in: query required: false - schema: &ref_99 + schema: &ref_100 type: string description: If true, the OpenID Connect provider is requested to confirm with the user the permissions requested and refresh the OIDC token. To do this, access_type=offline and prompt=consent is set on the redirection link. responses: @@ -8521,7 +8568,7 @@ paths: description: 'The provider provided is not defined in the Sync Gateway config. If no provided was specified then there is no default provider set. ' '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: Unable to connect and validate with the OpenID Connect provider requested tags: @@ -8532,7 +8579,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8542,12 +8589,12 @@ paths: - name: provider in: query required: false - schema: *ref_98 + schema: *ref_99 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. - name: offline in: query required: false - schema: *ref_99 + schema: *ref_100 description: If true, the OpenID Connect provider is requested to confirm with the user the permissions requested and refresh the OIDC token. To do this, access_type=offline and prompt=consent is set on the redirection link. responses: '400': @@ -8561,7 +8608,7 @@ paths: description: The OpenID Connect authentication URL. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: Unable to connect and validate with the OpenID Connect provider requested tags: @@ -8572,7 +8619,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8587,28 +8634,28 @@ paths: - name: code in: query required: true - schema: &ref_117 + schema: &ref_118 type: string description: The OpenID Connect authentication code. - name: provider in: query required: false - schema: *ref_98 + schema: *ref_99 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. - name: state in: query required: false - schema: &ref_118 + schema: &ref_119 type: string description: The OpenID Connect state to verify against the state cookie. This is used to prevent cross-site request forgery (CSRF). This is not required if `disable_callback_state=true` for the provider config (NOT recommended). responses: '200': description: Successfully authenticated with OpenID Connect. - content: &ref_100 + content: &ref_101 application/json: schema: type: object - properties: &ref_144 + properties: &ref_146 id_token: description: The OpenID Connect ID token type: string @@ -8637,7 +8684,7 @@ paths: description: An error was received from the OpenID Connect provider. This means the error query parameter was filled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: A problem occurred in regards to the token content: @@ -8657,7 +8704,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8673,17 +8720,17 @@ paths: - name: provider in: query required: false - schema: *ref_98 + schema: *ref_99 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. responses: '200': description: Successfully authenticated with OpenID Connect. - content: *ref_100 + content: *ref_101 '400': description: 'The provider provided is not defined in the Sync Gateway config. If no provided was specified then there is no default provider set. ' '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: Unable to connect and validate with the OpenID Connect provider requested tags: @@ -8694,7 +8741,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8739,7 +8786,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: get_db-_oidc_testing-.well-known-openid-configuration @@ -8748,7 +8795,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8758,7 +8805,7 @@ paths: - name: scope in: query required: true - schema: &ref_101 + schema: &ref_102 type: string description: The OpenID Connect authentication scope. responses: @@ -8766,7 +8813,7 @@ paths: description: OK '400': description: A validation error occurred with the scope. - content: &ref_102 + content: &ref_103 application/json: schema: type: object @@ -8777,10 +8824,10 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: An error occurred. - content: &ref_103 + content: &ref_104 application/json: schema: type: object @@ -8797,22 +8844,22 @@ paths: - name: scope in: query required: true - schema: *ref_101 + schema: *ref_102 description: The OpenID Connect authentication scope. responses: '200': description: OK '400': description: A validation error occurred with the scope. - content: *ref_102 + content: *ref_103 '403': description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: An error occurred. - content: *ref_103 + content: *ref_104 tags: - Unsupported operationId: post_db-_oidc_testing-authorize @@ -8821,7 +8868,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -8847,12 +8894,12 @@ paths: responses: '200': description: Properties expected back from an OpenID Connect provider after successful authentication - content: &ref_151 + content: &ref_154 application/json: schema: description: Properties expected back from an OpenID Connect provider after successful authentication type: object - properties: &ref_145 + properties: &ref_147 access_token: type: string token_type: @@ -8870,7 +8917,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: post_db-_oidc_testing-token @@ -8879,7 +8926,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8920,7 +8967,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '500': description: An error occurred while getting the private RSA key content: @@ -8940,7 +8987,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -8950,13 +8997,13 @@ paths: - name: redirect_uri in: query required: false - schema: &ref_104 + schema: &ref_105 type: string description: The Sync Gateway OpenID Connect callback URL. - name: scope in: query required: true - schema: *ref_101 + schema: *ref_102 description: The OpenID Connect authentication scope. - name: username in: query @@ -8981,7 +9028,7 @@ paths: responses: '302': description: Redirecting to Sync Gateway OpenID Connect callback URL - headers: &ref_105 + headers: &ref_106 Location: schema: type: string @@ -8990,7 +9037,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: get_db-_oidc_testing-authenticate @@ -9001,20 +9048,20 @@ paths: - name: redirect_uri in: query required: false - schema: *ref_104 + schema: *ref_105 description: The Sync Gateway OpenID Connect callback URL. - name: scope in: query required: true - schema: *ref_101 + schema: *ref_102 description: The OpenID Connect authentication scope. requestBody: - content: &ref_152 + content: &ref_155 application/json: schema: description: Properties passed from the OpenID Connect mock login page to the handler type: object - properties: &ref_146 + properties: &ref_148 username: type: string tokenttl: @@ -9023,7 +9070,7 @@ paths: type: string authenticated: type: string - required: &ref_147 + required: &ref_149 - username - tokenttl - identity-token-formats @@ -9032,12 +9079,12 @@ paths: responses: '302': description: Redirecting to Sync Gateway OpenID Connect callback URL - headers: *ref_105 + headers: *ref_106 '403': description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 tags: - Unsupported operationId: post_db-_oidc_testing-authenticate @@ -9046,7 +9093,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. get: @@ -9072,7 +9119,7 @@ paths: description: Upgraded to a web socket connection '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '426': description: Cannot upgrade connection to a web socket connection content: @@ -9093,7 +9140,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -9101,7 +9148,7 @@ paths: description: |- Creates a new session based on a Facebook user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls. - If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned. + If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options. requestBody: content: application/json: @@ -9117,8 +9164,17 @@ paths: '200': description: Session created successfully '400': - description: Origin is not in the approved list of allowed origins - content: *ref_106 + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: &ref_107 + application/json: + schema: + type: object + properties: *ref_0 + required: *ref_1 + title: HTTP-Error + example: + error: Bad Request + reason: No CORS '401': description: Received error from Facebook verifier content: @@ -9132,7 +9188,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '502': description: Received invalid response from the Facebook verifier content: @@ -9164,7 +9220,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -9172,7 +9228,7 @@ paths: description: |- Creates a new session based on a Google user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls. - If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned. + If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options. requestBody: content: application/json: @@ -9188,8 +9244,8 @@ paths: '200': description: Session created successfully '400': - description: Origin is not in the approved list of allowed origins - content: *ref_106 + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: *ref_107 '401': description: Received error from Google token verifier or invalid application ID in the config content: @@ -9203,7 +9259,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_4 '502': description: Received invalid response from the Google token verifier content: @@ -9226,7 +9282,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. post: @@ -9276,11 +9332,11 @@ paths: schema: description: A map of log keys and whether they are enabled or not. type: object - example: &ref_107 + example: &ref_108 HTTP: true CRUD: false Changes: true - additionalProperties: &ref_108 + additionalProperties: &ref_109 description: The log key and whether it is enabled or not. type: boolean deprecated: true @@ -9300,7 +9356,7 @@ paths: - name: logLevel in: query required: false - schema: &ref_109 + schema: &ref_110 type: string enum: - none @@ -9313,7 +9369,7 @@ paths: - name: level in: query required: false - schema: &ref_110 + schema: &ref_111 type: integer maximum: 3 minimum: 1 @@ -9329,8 +9385,8 @@ paths: schema: description: A map of log keys and whether they are enabled or not. type: object - example: *ref_107 - additionalProperties: *ref_108 + example: *ref_108 + additionalProperties: *ref_109 responses: '200': description: Log keys successfully replaced. @@ -9354,12 +9410,12 @@ paths: - name: logLevel in: query required: false - schema: *ref_109 + schema: *ref_110 description: The is what to set the console log level too. - name: level in: query required: false - schema: *ref_110 + schema: *ref_111 deprecated: true description: |- **Deprecated: use log level instead.** @@ -9372,8 +9428,8 @@ paths: schema: description: A map of log keys and whether they are enabled or not. type: object - example: *ref_107 - additionalProperties: *ref_108 + example: *ref_108 + additionalProperties: *ref_109 responses: '200': description: Log keys successfully updated. @@ -9390,7 +9446,7 @@ components: name: db in: path required: true - schema: *ref_3 + schema: *ref_2 example: db1 description: The name of the database to run the operation against. sessionid: @@ -9420,25 +9476,25 @@ components: name: include_doc in: query required: false - schema: *ref_111 + schema: *ref_112 description: Include the body associated with the document. disable_oidc_validation: name: disable_oidc_validation in: query required: false description: If set, will not attempt to validate the configured OpenID Connect providers are reachable. - schema: *ref_41 + schema: *ref_42 usersNameOnly: name: name_only in: query required: false - schema: *ref_112 + schema: *ref_113 description: Whether to return user names only, or more detailed information for each user. usersLimit: name: limit in: query required: false - schema: *ref_113 + schema: *ref_114 description: How many results to return. Using a value of `0` results in no limit. user-name: name: name @@ -9450,7 +9506,7 @@ components: name: name in: path required: true - schema: *ref_114 + schema: *ref_115 description: The name of the role. replicationid: name: replicationid @@ -9487,138 +9543,138 @@ components: in: query deprecated: true required: false - schema: *ref_39 + schema: *ref_40 description: No longer supported field. pprof-seconds: name: seconds in: query description: If set, collect a delta profile for the given duration, instead of a snapshot. - schema: *ref_36 + schema: *ref_37 debug-profile-seconds: name: seconds in: query required: false - schema: *ref_38 + schema: *ref_39 description: The amount of seconds to run the profiler for. include_runtime: name: include_runtime in: query required: false - schema: *ref_115 + schema: *ref_116 description: Whether to include the values set at runtime, and default values. DB-config-If-Match: name: If-Match in: header required: false - schema: *ref_42 + schema: *ref_43 description: If set to a configuration's Etag value, enables optimistic concurrency control for the request. Returns HTTP 412 if another update happened underneath this one. Document-If-Match: name: If-Match in: header required: false - schema: *ref_81 + schema: *ref_82 description: An optimistic concurrency control (OCC) value used to prevent conflicts. Use the value returned in the ETag response header of the GET request for the resource being updated, or the latest known Revision Tree ID or Current Version of the document. view: name: view in: path required: true - schema: *ref_54 + schema: *ref_55 description: The view to target. inclusive_end: name: inclusive_end in: query required: false description: Indicates whether the specified end key should be included in the result. - schema: *ref_61 + schema: *ref_62 descending: name: descending in: query required: false description: Return documents in descending order. - schema: *ref_62 + schema: *ref_63 include_docs-cbs3: name: include_docs in: query required: false description: Only works when using Couchbase Server 3.0 and earlier. Indicates whether to include the full content of the documents in the response. - schema: *ref_63 + schema: *ref_64 reduce: name: reduce in: query required: false description: Whether to execute a reduce function on the response or not. - schema: *ref_64 + schema: *ref_65 group: name: group in: query required: false description: Group the results using the reduce function to a group or single row. - schema: *ref_65 + schema: *ref_66 skip: name: skip in: query required: false description: Skip the specified number of documents before starting to return results. - schema: *ref_66 + schema: *ref_67 limit: name: limit in: query required: false description: Return only the specified number of documents - schema: *ref_67 + schema: *ref_68 group_level: name: group_level in: query required: false description: Specify the group level to be used. - schema: *ref_68 + schema: *ref_69 startkey_docid: name: startkey_docid in: query required: false description: Return documents starting with the specified document identifier. - schema: *ref_69 + schema: *ref_70 endkey_docid: name: endkey_docid in: query required: false description: Stop returning records when the specified document identifier is reached. - schema: *ref_70 + schema: *ref_71 stale: name: stale in: query required: false description: Allow the results from a stale view to be used, without triggering a rebuild of all views within the encompassing design document. - schema: *ref_71 + schema: *ref_72 startkey: name: startkey in: query required: false - schema: *ref_72 + schema: *ref_73 description: Return records starting with the specified key. endkey: name: endkey in: query required: false - schema: *ref_73 + schema: *ref_74 description: Stop returning records when this key is reached. key: name: key in: query required: false description: Return only the document that matches the specified key. - schema: *ref_74 + schema: *ref_75 keys: name: keys in: query required: false - schema: *ref_75 + schema: *ref_76 description: An array of document ID strings to filter by. compact-type: name: type in: query required: false - schema: *ref_55 + schema: *ref_56 description: |- This is the type of compaction to use. The type must be either: * `attachment` for cleaning up legacy (pre-3.0) attachments @@ -9627,152 +9683,152 @@ components: name: roundtrip in: query required: false - schema: *ref_78 + schema: *ref_79 description: Block until document has been received by change cache include_docs: name: include_docs in: query required: false - schema: *ref_91 + schema: *ref_92 description: Include the body associated with each document. ddoc: name: ddoc in: path required: true - schema: *ref_60 + schema: *ref_61 description: The design document name. rev: name: rev in: query required: false - schema: *ref_80 + schema: *ref_81 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) open_revs: name: open_revs in: query required: false - schema: *ref_85 + schema: *ref_86 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 bodies that haven''t been pruned are guaranteed to be returned. If 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.' show_exp: name: show_exp in: query required: false - schema: *ref_86 + schema: *ref_87 description: Whether to show the expiry property (`_exp`) in the response. revs_from: name: revs_from in: query required: false - schema: *ref_87 + schema: *ref_88 description: Trim the revision history to stop at the first revision in the provided list. If no match is found, the revisions will be trimmed to the `revs_limit`. atts_since: name: atts_since in: query required: false - schema: *ref_88 + schema: *ref_89 description: Include attachments only since specified revisions. Excludes the attachments for the specified revisions. Only gets used if `attachments=true`. revs_limit: name: revs_limit in: query required: false - schema: *ref_89 + schema: *ref_90 description: Maximum amount of revisions to return for each document. includeAttachments: name: attachments in: query required: false - schema: *ref_90 + schema: *ref_91 description: Include attachment bodies in response. replicator2: name: replicator2 in: query required: false - schema: *ref_79 + schema: *ref_80 description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. new_edits: name: new_edits in: query required: false - schema: *ref_116 + schema: *ref_117 description: 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 for replication. This option must be used in conjunction with the `_revisions` property in the request body. Include-channels: name: channels in: query required: false - schema: *ref_92 + schema: *ref_93 description: Include the channels each document is part of that the calling user also has access too. include-access: name: access in: query required: false - schema: *ref_93 + schema: *ref_94 description: Include what user/roles that each document grants access too. include-revs: name: revs in: query required: false - schema: *ref_94 + schema: *ref_95 description: Include all the revisions for each document under the `_revisions` property. include-seqs: name: update_seq in: query required: false - schema: *ref_95 + schema: *ref_96 description: Include the document sequence number `update_seq` property for each document. limit-result-rows: name: limit in: query required: false - schema: *ref_96 + schema: *ref_97 description: This limits the number of result rows returned. Using a value of `0` has the same effect as the value `1`. provider: name: provider in: query required: false - schema: *ref_98 + schema: *ref_99 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. offline: name: offline in: query required: false - schema: *ref_99 + schema: *ref_100 description: If true, the OpenID Connect provider is requested to confirm with the user the permissions requested and refresh the OIDC token. To do this, access_type=offline and prompt=consent is set on the redirection link. oidc-code: name: code in: query required: true - schema: *ref_117 + schema: *ref_118 description: The OpenID Connect authentication code. oidc-state: name: state in: query required: false - schema: *ref_118 + schema: *ref_119 description: The OpenID Connect state to verify against the state cookie. This is used to prevent cross-site request forgery (CSRF). This is not required if `disable_callback_state=true` for the provider config (NOT recommended). oidc-scope: name: scope in: query required: true - schema: *ref_101 + schema: *ref_102 description: The OpenID Connect authentication scope. oidc-redirect_uri: name: redirect_uri in: query required: false - schema: *ref_104 + schema: *ref_105 description: The Sync Gateway OpenID Connect callback URL. log-level: name: logLevel in: query required: false - schema: *ref_109 + schema: *ref_110 description: The is what to set the console log level too. log-level-int: name: level in: query required: false - schema: *ref_110 + schema: *ref_111 deprecated: true description: |- **Deprecated: use log level instead.** @@ -9781,7 +9837,8 @@ components: schemas: User-session-information: type: object - properties: *ref_119 + properties: *ref_120 + required: *ref_121 title: User Session Information HTTP-Error: type: object @@ -9793,6 +9850,10 @@ components: type: string enum: *ref_12 x-enumDescriptions: *ref_13 + CORS: + type: object + properties: *ref_34 + title: Cors Configuration Event-config: type: object properties: *ref_8 @@ -9825,31 +9886,31 @@ components: CollectionConfig: description: Collection-specific configuration. type: object - properties: *ref_120 + properties: *ref_122 title: Collection config Scopes: description: Scope-specific configuration. type: object - properties: *ref_121 + properties: *ref_123 title: Scopes Database: description: The properties of a database configuration. type: object x-requirePropertiesSorted: true - properties: *ref_40 + properties: *ref_41 title: Database-config All DBs: title: Simple description: The names of all databases. type: array - items: *ref_122 - example: *ref_123 + items: *ref_124 + example: *ref_125 All DBs Verbose: title: Verbose description: Description of all databases. type: array - example: *ref_124 - items: *ref_125 + example: *ref_126 + items: *ref_127 ISGRReplicationState: description: This is the state that the replicator is in or that trying to transition in to. type: string @@ -9863,7 +9924,7 @@ components: All-replications: description: Contains all the replication IDs with their corresponding replication configurations type: object - properties: *ref_126 + properties: *ref_128 title: All replications Replication-status: type: object @@ -9873,149 +9934,149 @@ components: CredentialsConfig: description: The configuration for the credentials set. type: object - properties: *ref_34 + properties: *ref_35 title: Credentials config Console-logging-keys-level: type: object - properties: *ref_127 + properties: *ref_129 Console-logging-config: title: Configuration for console logging. - allOf: *ref_128 + allOf: *ref_130 Audit-logging-config: type: object title: Audit logging config - properties: *ref_129 + properties: *ref_131 Logging-config: type: object - properties: *ref_35 + properties: *ref_36 Serverless: description: Configuration for when SG is running in serverless mode type: object - properties: *ref_130 + properties: *ref_132 Startup-config: type: object x-requirePropertiesSorted: true - properties: *ref_131 + properties: *ref_133 title: Startup-config Runtime-config: type: object - properties: *ref_132 + properties: *ref_134 title: Runtime-config Vendor: description: Product vendor type: object - properties: *ref_56 - required: *ref_57 + properties: *ref_57 + required: *ref_58 title: Vendor Status: type: object - properties: *ref_133 + properties: *ref_135 title: Status Database-audit: title: Simple description: A map of audit events and whether they are enabled or not. - properties: *ref_45 + properties: *ref_46 AuditEventVerbose: title: audit-event-verbose description: Detailed information about an audit event. type: object - properties: *ref_134 + properties: *ref_136 Database-audit-verbose: title: Verbose description: A map of detailed audit events. - properties: *ref_46 + properties: *ref_47 CollectionNames: description: List of collection names type: array - items: *ref_135 + items: *ref_137 ResyncScopesMap: description: scope name with one or more collection names for which resync will be triggered type: object - additionalProperties: *ref_47 - example: *ref_48 + additionalProperties: *ref_48 + example: *ref_49 Resync-status: description: The status of a resync operation type: object - properties: *ref_49 - required: *ref_50 + properties: *ref_50 + required: *ref_51 title: Resync-status IndexSettings: type: object description: Settings for Global Secondary Indexes (GSI). - properties: *ref_51 + properties: *ref_52 IndexInitStatus: description: The status of an asynchronous indexes initialization operation. type: object - properties: *ref_52 - required: *ref_53 + properties: *ref_53 + required: *ref_54 title: IndexInitStatus Compact-status: description: The status returned from a compaction. type: object - properties: *ref_136 - required: *ref_137 + properties: *ref_138 + required: *ref_139 title: Compact-status Attachment-Migration-status: description: The status of a attachment migration operation type: object - properties: *ref_138 - required: *ref_139 + properties: *ref_140 + required: *ref_141 title: Attachment-Migration-status Document: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: *ref_82 + properties: *ref_83 New-revision: description: Properties returned when a new document revision is created type: object - properties: *ref_76 - required: *ref_77 + properties: *ref_77 + required: *ref_78 title: New-revision ExpVars: type: object - properties: *ref_140 + properties: *ref_142 NodeInfo: type: object - properties: *ref_141 - required: *ref_142 + properties: *ref_143 + required: *ref_144 Changes-feed: description: Properties of a changes feed type: object - properties: *ref_143 + properties: *ref_145 Design-doc: description: Properties of a design document type: object - properties: *ref_59 + properties: *ref_60 OIDC-callback: type: object - properties: *ref_144 + properties: *ref_146 title: OpenID Connect callback properties OIDC-token: description: Properties expected back from an OpenID Connect provider after successful authentication type: object - properties: *ref_145 + properties: *ref_147 title: OIDC-token OIDC-login-page-handler: description: Properties passed from the OpenID Connect mock login page to the handler type: object - properties: *ref_146 - required: *ref_147 + properties: *ref_148 + required: *ref_149 DeprecatedLogKeyMap: description: A map of log keys and whether they are enabled or not. type: object - example: *ref_107 - additionalProperties: *ref_108 + example: *ref_108 + additionalProperties: *ref_109 responses: User-session-information: description: Properties associated with a user session - content: *ref_4 + content: *ref_3 Not-found: description: Resource could not be found - content: *ref_2 - Invalid-CORS: - description: Origin is not in the approved list of allowed origins - content: *ref_106 + content: *ref_4 + Unauthorized: + description: User does not have access to resource, or resource does not exist + content: *ref_150 request-problem: description: There was a problem with your request content: *ref_11 @@ -10024,20 +10085,20 @@ components: content: *ref_18 User: description: Properties associated with a user - content: *ref_148 + content: *ref_151 Role: description: Properties associated with a role - content: *ref_149 + content: *ref_152 Replicator-updated: description: Updated existing configuration successfully Replicator-created: description: Created new replication successfully pprof-binary: description: OK - content: *ref_37 + content: *ref_38 DB-config-updated: description: Database configuration successfully updated - headers: *ref_43 + headers: *ref_44 DB-config-precondition-failed: description: |- Precondition Failed @@ -10045,13 +10106,13 @@ components: The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. - content: *ref_44 + content: *ref_45 Invalid-content-type: description: Invalid content type - content: *ref_83 + content: *ref_84 changes-feed: description: Successfully returned the changes feed - content: *ref_58 + content: *ref_59 ddoc-forbidden: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. invalid-doc-id: @@ -10059,34 +10120,37 @@ components: Document ID is not in an allowed format therefore is invalid. This could be because it is over 250 characters or is prefixed with an underscore ("_"). - content: *ref_84 + content: *ref_85 New-revision: description: New revision created successfully - content: *ref_150 + content: *ref_153 all-docs: description: Operation ran successfully - content: *ref_97 + content: *ref_98 OIDC-invalid-provider: description: 'The provider provided is not defined in the Sync Gateway config. If no provided was specified then there is no default provider set. ' OIDC-connection: description: Unable to connect and validate with the OpenID Connect provider requested OIDC-callback: description: Successfully authenticated with OpenID Connect. - content: *ref_100 + content: *ref_101 OIDC-test-provider-disabled: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. OIDC-invalid-scope: description: A validation error occurred with the scope. - content: *ref_102 + content: *ref_103 OIDC-testing-internal-error: description: An error occurred. - content: *ref_103 + content: *ref_104 OIDC-token: description: Properties expected back from an OpenID Connect provider after successful authentication - content: *ref_151 + content: *ref_154 OIDC-testing-redirect: description: Redirecting to Sync Gateway OpenID Connect callback URL - headers: *ref_105 + headers: *ref_106 + Invalid-CORS-LoginOrigin: + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: *ref_107 requestBodies: User: content: *ref_14 @@ -10100,5 +10164,5 @@ components: Profile: content: *ref_33 OIDC-login-page-handler: - content: *ref_152 + content: *ref_155 description: Properties passed from the OpenID Connect mock login page to the handler diff --git a/modules/ROOT/assets/attachments/bundled-public.yaml b/modules/ROOT/assets/attachments/bundled-public.yaml index fe088361..eaa856bd 100644 --- a/modules/ROOT/assets/attachments/bundled-public.yaml +++ b/modules/ROOT/assets/attachments/bundled-public.yaml @@ -51,7 +51,7 @@ paths: - name: db in: path required: true - schema: &ref_3 + schema: &ref_6 type: string example: db1 description: The name of the database to run the operation against. @@ -61,52 +61,69 @@ paths: responses: '200': description: Properties associated with a user session - content: &ref_74 + content: &ref_76 application/json: schema: type: object - properties: &ref_62 + properties: &ref_0 authentication_handlers: - description: The ways authentication can be established to authenticate as the user. + description: The ways authentication can be established to authenticate as a user. Used for CouchDB compatibility. Always contains "default" and "cookie". type: array - items: - type: string + enum: + - - default + - cookie + default: + - default + - cookie ok: + description: Used for CouchDB compatibility. Always true. type: boolean + enum: + - true userCtx: type: object properties: channels: - description: | - A map of the channels the user has access to and the sequence number each channel was created at. - - The key is the channel name and the value is the sequence number. + description: A map of the channels in the default collection that the user is in along with the sequence number the user was granted access. This does not include inherited channels through roles. type: object + additionalProperties: + x-additionalPropertiesName: channelName + type: number + minimum: 1 + description: The sequence number the user was granted access. + title: sequence number + example: + '!': 1 + channelA: 2 name: description: The name of the user. type: string - nullable: true + minLength: 1 + required: + - channels + - name + required: &ref_1 + - authentication_handlers + - ok + - userCtx title: User Session Information - '404': - description: Resource could not be found - content: &ref_2 + '401': + description: User does not have access to resource, or resource does not exist + content: &ref_4 application/json: schema: type: object - properties: &ref_0 + properties: &ref_2 error: description: The error name. type: string reason: description: The error description. type: string - required: &ref_1 + required: &ref_3 - error - reason title: HTTP-Error - example: - error: not_found - reason: no such database "invalid-db" tags: - Session operationId: get_db-_session @@ -115,19 +132,27 @@ paths: description: |- Generates a login session for the user based on the credentials provided in the request body or if that fails (due to invalid credentials or none provided at all), generates the new session for the currently authenticated user instead. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls. - If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned. + If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options. + parameters: + - name: one_time + description: Sets the session to only be valid for a single authentication. This session will expire in 5 minutes if not used. + in: query + schema: + type: boolean requestBody: - description: The body can depend on if using the Public or Admin APIs. + description: When name and password are included in the request body, the session will be created for the specified user. Otherwise the session will be created for the authenticated user making the request. + required: false content: application/json: schema: type: object + title: User Credentials properties: name: - description: User name to generate the session for. + description: User name to generate the session for. Omit this value to generate a session for the authenticated user. type: string password: - description: Password of the user to generate the session for. + description: Password of the user to generate the session for. Omit this value to generate a session for the authenticated user. type: string responses: '200': @@ -135,57 +160,32 @@ paths: content: application/json: schema: - type: object - properties: - authentication_handlers: - description: Used for CouchDB compatability. Always contains "default" and "cookie". - type: array - items: - type: string - enum: - - default - - cookie - ok: - description: Used for CouchDB compatability. Always true. - type: boolean - default: true - userCtx: - type: object + allOf: + - type: object + properties: *ref_0 + required: *ref_1 + title: User Session Information + - type: object properties: - channels: - description: A map of the channels the user is in along with the sequence number the user was granted access. - type: object - additionalProperties: - type: number - minimum: 1 - description: The sequence number the user was granted access. - title: sequence number - example: - '!': 1 - channelA: 2 - name: - description: The name of the user. + one_time_session_id: + description: The id of a single use session if `one_time=true` query parameter was used. type: string - minLength: 1 - required: - - channels - - name - required: - - authentication_handlers - - ok - - userCtx + example: c5af80a039db4ed9d2b6865576b6999935282689 '400': - description: Origin is not in the approved list of allowed origins - content: &ref_45 + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: &ref_5 application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error - '404': - description: Resource could not be found - content: *ref_2 + example: + error: Bad Request + reason: No CORS + '401': + description: User does not have access to resource, or resource does not exist + content: *ref_4 tags: - Session operationId: post_db-_session @@ -194,15 +194,28 @@ paths: description: |- Invalidates the session for the currently authenticated user and removes their session cookie. - If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned. + If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options. responses: '200': description: Successfully removed session (logged out) '400': - description: Bad Request + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: *ref_5 + '401': + description: User does not have access to resource, or resource does not exist + content: *ref_4 '404': - description: Resource could not be found - content: *ref_2 + description: Return if session not found. + content: + application/json: + schema: + type: object + properties: *ref_2 + required: *ref_3 + title: HTTP-Error + example: + error: not_found + reason: no session tags: - Session operationId: delete_db-_session @@ -211,7 +224,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -262,13 +275,13 @@ paths: allOf: - description: The state of the database. type: string - enum: &ref_63 + enum: &ref_65 - Online - Offline - Starting - Stopping - Resyncing - x-enumDescriptions: &ref_64 + x-enumDescriptions: &ref_66 Online: The database is online and available for use. Offline: The database is offline, resync and other offline only endpoints are allowed. Starting: The database is in the process of going online. @@ -280,7 +293,16 @@ paths: example: 995618a6a6cc9ac79731bd13240e19b5 '404': description: Resource could not be found - content: *ref_2 + content: &ref_7 + application/json: + schema: + type: object + properties: *ref_2 + required: *ref_3 + title: HTTP-Error + example: + error: not_found + reason: no such database "invalid-db" tags: - Database Management operationId: get_db- @@ -292,7 +314,7 @@ paths: description: Database exists '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Database Management operationId: head_db- @@ -307,7 +329,7 @@ paths: application/json: schema: type: object - properties: &ref_67 + properties: &ref_69 ADMIN: description: '`true` if the request is from the Admin API - otherwise omitted.' type: boolean @@ -320,7 +342,7 @@ paths: allOf: - description: Product vendor type: object - properties: &ref_65 + properties: &ref_67 name: description: Product name type: string @@ -331,7 +353,7 @@ paths: Omitted if `api.hide_product_version=true` type: string example: 3.1 - required: &ref_66 + required: &ref_68 - name title: Vendor version: @@ -346,7 +368,7 @@ paths: `true` if the sync gateway node is running in persistent config mode. type: boolean example: true - required: &ref_68 + required: &ref_70 - couchdb - vendor tags: @@ -381,9 +403,9 @@ paths: - name: keyspace in: path required: true - schema: &ref_6 + schema: &ref_10 type: string - examples: &ref_7 + examples: &ref_11 default: summary: Default scope and collection value: db1 @@ -412,7 +434,7 @@ paths: - name: roundtrip in: query required: false - schema: &ref_8 + schema: &ref_12 type: boolean description: Block until document has been received by change cache requestBody: @@ -422,7 +444,7 @@ paths: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: &ref_11 + properties: &ref_15 _id: description: The ID of the document. type: string @@ -479,7 +501,7 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: &ref_12 + properties: &ref_16 id: description: The ID of the document. type: string @@ -492,40 +514,40 @@ paths: cv: description: The CV of the document. type: string - required: &ref_13 + required: &ref_17 - id - ok - rev title: New-revision '400': description: There was a problem with your request - content: &ref_14 + content: &ref_18 application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '409': description: Resource already exists under that name - content: &ref_15 + content: &ref_19 application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error '415': description: Invalid content type - content: &ref_16 + content: &ref_20 application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error tags: - Document @@ -536,13 +558,13 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. - name: ddoc in: path required: true - schema: &ref_5 + schema: &ref_9 type: string description: The design document name. get: @@ -559,7 +581,7 @@ paths: schema: description: Properties of a design document type: object - properties: &ref_4 + properties: &ref_8 language: type: string views: @@ -588,7 +610,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: get_db-_design-ddoc @@ -604,7 +626,7 @@ paths: schema: description: Properties of a design document type: object - properties: *ref_4 + properties: *ref_8 responses: '200': description: Design document changes successfully @@ -612,7 +634,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: put_db-_design-ddoc @@ -629,7 +651,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: delete_db-_design-ddoc @@ -641,7 +663,7 @@ paths: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported description: |- @@ -656,18 +678,18 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. - name: ddoc in: path required: true - schema: *ref_5 + schema: *ref_9 description: The design document name. - name: view in: path required: true - schema: &ref_46 + schema: &ref_49 type: string description: The view to target. get: @@ -681,67 +703,67 @@ paths: in: query required: false description: Indicates whether the specified end key should be included in the result. - schema: &ref_47 + schema: &ref_50 type: boolean - name: descending in: query required: false description: Return documents in descending order. - schema: &ref_48 + schema: &ref_51 type: boolean - name: include_docs in: query required: false description: Only works when using Couchbase Server 3.0 and earlier. Indicates whether to include the full content of the documents in the response. - schema: &ref_49 + schema: &ref_52 type: boolean - name: reduce in: query required: false description: Whether to execute a reduce function on the response or not. - schema: &ref_50 + schema: &ref_53 type: boolean - name: group in: query required: false description: Group the results using the reduce function to a group or single row. - schema: &ref_51 + schema: &ref_54 type: boolean - name: skip in: query required: false description: Skip the specified number of documents before starting to return results. - schema: &ref_52 + schema: &ref_55 type: integer - name: limit in: query required: false description: Return only the specified number of documents - schema: &ref_53 + schema: &ref_56 type: integer - name: group_level in: query required: false description: Specify the group level to be used. - schema: &ref_54 + schema: &ref_57 type: integer - name: startkey_docid in: query required: false description: Return documents starting with the specified document identifier. - schema: &ref_55 + schema: &ref_58 type: string - name: endkey_docid in: query required: false description: Stop returning records when the specified document identifier is reached. - schema: &ref_56 + schema: &ref_59 type: string - name: stale in: query required: false description: Allow the results from a stale view to be used, without triggering a rebuild of all views within the encompassing design document. - schema: &ref_57 + schema: &ref_60 type: string enum: - ok @@ -749,25 +771,25 @@ paths: - name: startkey in: query required: false - schema: &ref_29 + schema: &ref_33 type: string description: Return records starting with the specified key. - name: endkey in: query required: false - schema: &ref_30 + schema: &ref_34 type: string description: Stop returning records when this key is reached. - name: key in: query required: false description: Return only the document that matches the specified key. - schema: &ref_58 + schema: &ref_61 type: string - name: keys in: query required: false - schema: &ref_28 + schema: &ref_32 type: array items: type: string @@ -811,7 +833,7 @@ paths: description: Forbidden '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: get_db-_design-ddoc-_view-view @@ -820,8 +842,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -829,7 +851,7 @@ paths: - name: docid in: path required: true - schema: &ref_25 + schema: &ref_29 type: string example: doc1 description: The document ID to run the operation against. @@ -840,14 +862,14 @@ paths: - name: rev in: query required: false - schema: &ref_10 + schema: &ref_14 type: string example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: open_revs in: query required: false - schema: &ref_19 + schema: &ref_23 type: array items: type: string @@ -855,13 +877,13 @@ paths: - name: show_exp in: query required: false - schema: &ref_20 + schema: &ref_24 type: boolean description: Whether to show the expiry property (`_exp`) in the response. - name: revs_from in: query required: false - schema: &ref_21 + schema: &ref_25 type: array items: type: string @@ -869,7 +891,7 @@ paths: - name: atts_since in: query required: false - schema: &ref_22 + schema: &ref_26 type: array items: type: string @@ -877,19 +899,19 @@ paths: - name: revs_limit in: query required: false - schema: &ref_23 + schema: &ref_27 type: integer description: Maximum amount of revisions to return for each document. - name: attachments in: query required: false - schema: &ref_24 + schema: &ref_28 type: boolean description: Include attachment bodies in response. - name: replicator2 in: query required: false - schema: &ref_9 + schema: &ref_13 type: boolean description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. responses: @@ -927,24 +949,24 @@ paths: Document ID is not in an allowed format therefore is invalid. This could be because it is over 250 characters or is prefixed with an underscore ("_"). - content: &ref_18 + content: &ref_22 application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '501': description: Not Implemented. It is likely this error was caused due to trying to use an enterprise-only feature on the community edition. content: application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error tags: - Document @@ -963,30 +985,30 @@ paths: - name: roundtrip in: query required: false - schema: *ref_8 + schema: *ref_12 description: Block until document has been received by change cache - name: replicator2 in: query required: false - schema: *ref_9 + schema: *ref_13 description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. - name: new_edits in: query required: false - schema: &ref_59 + schema: &ref_62 type: boolean default: true description: 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 for replication. This option must be used in conjunction with the `_revisions` property in the request body. - name: rev in: query required: false - schema: *ref_10 + schema: *ref_14 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: If-Match in: header required: false - schema: &ref_17 + schema: &ref_21 type: string description: An optimistic concurrency control (OCC) value used to prevent conflicts. Use the value returned in the ETag response header of the GET request for the resource being updated, or the latest known Revision Tree ID or Current Version of the document. requestBody: @@ -996,7 +1018,7 @@ paths: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: *ref_11 + properties: *ref_15 responses: '201': description: Created @@ -1010,21 +1032,21 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_12 - required: *ref_13 + properties: *ref_16 + required: *ref_17 title: New-revision '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '409': description: Resource already exists under that name - content: *ref_15 + content: *ref_19 '415': description: Invalid content type - content: *ref_16 + content: *ref_20 tags: - Document operationId: put_keyspace-docid @@ -1038,31 +1060,31 @@ paths: - name: rev in: query required: false - schema: *ref_10 + schema: *ref_14 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: If-Match in: header required: false - schema: *ref_17 + schema: *ref_21 description: An optimistic concurrency control (OCC) value used to prevent conflicts. Use the value returned in the ETag response header of the GET request for the resource being updated, or the latest known Revision Tree ID or Current Version of the document. responses: '200': description: New revision created successfully - content: &ref_75 + content: &ref_77 application/json: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_12 - required: *ref_13 + properties: *ref_16 + required: *ref_17 title: New-revision '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: delete_keyspace-docid @@ -1075,10 +1097,10 @@ paths: Document ID is not in an allowed format therefore is invalid. This could be because it is over 250 characters or is prefixed with an underscore ("_"). - content: *ref_18 + content: *ref_22 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document summary: Check if a document exists @@ -1086,43 +1108,43 @@ paths: - name: rev in: query required: false - schema: *ref_10 + schema: *ref_14 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: open_revs in: query required: false - schema: *ref_19 + schema: *ref_23 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 bodies that haven''t been pruned are guaranteed to be returned. If 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.' - name: show_exp in: query required: false - schema: *ref_20 + schema: *ref_24 description: Whether to show the expiry property (`_exp`) in the response. - name: revs_from in: query required: false - schema: *ref_21 + schema: *ref_25 description: Trim the revision history to stop at the first revision in the provided list. If no match is found, the revisions will be trimmed to the `revs_limit`. - name: atts_since in: query required: false - schema: *ref_22 + schema: *ref_26 description: Include attachments only since specified revisions. Excludes the attachments for the specified revisions. Only gets used if `attachments=true`. - name: revs_limit in: query required: false - schema: *ref_23 + schema: *ref_27 description: Maximum amount of revisions to return for each document. - name: attachments in: query required: false - schema: *ref_24 + schema: *ref_28 description: Include attachment bodies in response. - name: replicator2 in: query required: false - schema: *ref_9 + schema: *ref_13 description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. description: Return a status code based on if the document exists or not. operationId: head_keyspace-docid @@ -1131,8 +1153,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -1140,7 +1162,7 @@ paths: - name: docid in: path required: true - schema: *ref_25 + schema: *ref_29 example: doc1 description: The document ID to run the operation against. - name: attach @@ -1161,7 +1183,7 @@ paths: - name: rev in: query required: false - schema: *ref_10 + schema: *ref_14 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) - name: content_encoding @@ -1198,7 +1220,7 @@ paths: description: Partial attachment content returned '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '416': description: Requested range exceeds content length tags: @@ -1249,15 +1271,15 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_12 - required: *ref_13 + properties: *ref_16 + required: *ref_17 title: New-revision '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '409': description: Resource already exists under that name - content: *ref_15 + content: *ref_19 tags: - Document Attachment operationId: put_keyspace-docid-attach @@ -1276,7 +1298,7 @@ paths: description: The attachment digest. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document Attachment summary: Check if attachment exists @@ -1285,7 +1307,7 @@ paths: - name: rev in: query required: false - schema: *ref_10 + schema: *ref_14 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) operationId: head_keyspace-docid-attach @@ -1319,15 +1341,15 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_12 - required: *ref_13 + properties: *ref_16 + required: *ref_17 title: New-revision '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '409': description: Resource already exists under that name - content: *ref_15 + content: *ref_19 tags: - Document Attachment operationId: delete_keyspace-docid-attach @@ -1336,8 +1358,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -1377,7 +1399,7 @@ paths: - name: include_docs in: query required: false - schema: &ref_27 + schema: &ref_31 type: boolean description: Include the body associated with each document. - name: revocations @@ -1445,12 +1467,12 @@ paths: responses: '200': description: Successfully returned the changes feed - content: &ref_26 + content: &ref_30 application/json: schema: description: Properties of a changes feed type: object - properties: &ref_69 + properties: &ref_71 results: type: array items: @@ -1486,10 +1508,10 @@ paths: type: string '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: get_keyspace-_changes @@ -1541,13 +1563,13 @@ paths: responses: '200': description: Successfully returned the changes feed - content: *ref_26 + content: *ref_30 '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: post_keyspace-_changes @@ -1556,8 +1578,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -1573,57 +1595,57 @@ paths: - name: include_docs in: query required: false - schema: *ref_27 + schema: *ref_31 description: Include the body associated with each document. - name: channels in: query required: false - schema: &ref_31 + schema: &ref_35 type: boolean description: Include the channels each document is part of that the calling user also has access too. - name: access in: query required: false - schema: &ref_32 + schema: &ref_36 type: boolean description: Include what user/roles that each document grants access too. - name: revs in: query required: false - schema: &ref_33 + schema: &ref_37 type: boolean description: Include all the revisions for each document under the `_revisions` property. - name: update_seq in: query required: false - schema: &ref_34 + schema: &ref_38 type: boolean description: Include the document sequence number `update_seq` property for each document. - name: keys in: query required: false - schema: *ref_28 + schema: *ref_32 description: An array of document ID strings to filter by. - name: startkey in: query required: false - schema: *ref_29 + schema: *ref_33 description: Return records starting with the specified key. - name: endkey in: query required: false - schema: *ref_30 + schema: *ref_34 description: Stop returning records when this key is reached. - name: limit in: query required: false - schema: &ref_35 + schema: &ref_39 type: number description: This limits the number of result rows returned. Using a value of `0` has the same effect as the value `1`. responses: '200': description: Operation ran successfully - content: &ref_36 + content: &ref_40 application/json: schema: type: object @@ -1655,19 +1677,19 @@ paths: - update_seq '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '403': description: This API endpoint has been disabled by the administrator. content: application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: get_keyspace-_all_docs @@ -1682,42 +1704,42 @@ paths: - name: include_docs in: query required: false - schema: *ref_27 + schema: *ref_31 description: Include the body associated with each document. - name: channels in: query required: false - schema: *ref_31 + schema: *ref_35 description: Include the channels each document is part of that the calling user also has access too. - name: access in: query required: false - schema: *ref_32 + schema: *ref_36 description: Include what user/roles that each document grants access too. - name: revs in: query required: false - schema: *ref_33 + schema: *ref_37 description: Include all the revisions for each document under the `_revisions` property. - name: update_seq in: query required: false - schema: *ref_34 + schema: *ref_38 description: Include the document sequence number `update_seq` property for each document. - name: startkey in: query required: false - schema: *ref_29 + schema: *ref_33 description: Return records starting with the specified key. - name: endkey in: query required: false - schema: *ref_30 + schema: *ref_34 description: Stop returning records when this key is reached. - name: limit in: query required: false - schema: *ref_35 + schema: *ref_39 description: This limits the number of result rows returned. Using a value of `0` has the same effect as the value `1`. requestBody: content: @@ -1735,22 +1757,22 @@ paths: responses: '200': description: Operation ran successfully - content: *ref_36 + content: *ref_40 '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '403': description: This API endpoint has been disabled by the administrator. content: application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: post_keyspace-_all_docs @@ -1759,8 +1781,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -1791,7 +1813,7 @@ paths: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: *ref_11 + properties: *ref_15 required: - docs example: @@ -1860,10 +1882,10 @@ paths: status: 409 '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: post_keyspace-_bulk_docs @@ -1872,8 +1894,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -1898,7 +1920,7 @@ paths: - name: revs in: query required: false - schema: *ref_33 + schema: *ref_37 description: Include all the revisions for each document under the `_revisions` property. - name: revs_limit in: query @@ -1945,7 +1967,7 @@ paths: description: Bad Request '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: post_keyspace-_bulk_get @@ -1954,8 +1976,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -1977,10 +1999,10 @@ paths: description: Successfully found local document '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: get_keyspace-_local-docid @@ -2008,15 +2030,15 @@ paths: schema: description: Properties returned when a new document revision is created type: object - properties: *ref_12 - required: *ref_13 + properties: *ref_16 + required: *ref_17 title: New-revision '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '409': description: A conflict would result from updating this document revision. tags: @@ -2040,10 +2062,10 @@ paths: description: Successfully removed the local document. '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '409': description: A revision ID conflict would result from deleting this document revision. tags: @@ -2055,10 +2077,10 @@ paths: description: Document exists '400': description: There was a problem with your request - content: *ref_14 + content: *ref_18 '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document summary: Check if local document exists @@ -2072,8 +2094,8 @@ paths: - name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -2116,7 +2138,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Document operationId: post_keyspace-_revs_diff @@ -2125,7 +2147,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2135,13 +2157,13 @@ paths: - name: provider in: query required: false - schema: &ref_37 + schema: &ref_41 type: string description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. - name: offline in: query required: false - schema: &ref_38 + schema: &ref_42 type: string description: If true, the OpenID Connect provider is requested to confirm with the user the permissions requested and refresh the OIDC token. To do this, access_type=offline and prompt=consent is set on the redirection link. responses: @@ -2156,7 +2178,7 @@ paths: description: 'The provider provided is not defined in the Sync Gateway config. If no provided was specified then there is no default provider set. ' '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '500': description: Unable to connect and validate with the OpenID Connect provider requested tags: @@ -2167,7 +2189,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2177,12 +2199,12 @@ paths: - name: provider in: query required: false - schema: *ref_37 + schema: *ref_41 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. - name: offline in: query required: false - schema: *ref_38 + schema: *ref_42 description: If true, the OpenID Connect provider is requested to confirm with the user the permissions requested and refresh the OIDC token. To do this, access_type=offline and prompt=consent is set on the redirection link. responses: '400': @@ -2196,7 +2218,7 @@ paths: description: The OpenID Connect authentication URL. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '500': description: Unable to connect and validate with the OpenID Connect provider requested tags: @@ -2207,7 +2229,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2222,28 +2244,28 @@ paths: - name: code in: query required: true - schema: &ref_60 + schema: &ref_63 type: string description: The OpenID Connect authentication code. - name: provider in: query required: false - schema: *ref_37 + schema: *ref_41 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. - name: state in: query required: false - schema: &ref_61 + schema: &ref_64 type: string description: The OpenID Connect state to verify against the state cookie. This is used to prevent cross-site request forgery (CSRF). This is not required if `disable_callback_state=true` for the provider config (NOT recommended). responses: '200': description: Successfully authenticated with OpenID Connect. - content: &ref_39 + content: &ref_43 application/json: schema: type: object - properties: &ref_70 + properties: &ref_72 id_token: description: The OpenID Connect ID token type: string @@ -2272,7 +2294,7 @@ paths: description: An error was received from the OpenID Connect provider. This means the error query parameter was filled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '500': description: A problem occurred in regards to the token content: @@ -2292,7 +2314,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2308,17 +2330,17 @@ paths: - name: provider in: query required: false - schema: *ref_37 + schema: *ref_41 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. responses: '200': description: Successfully authenticated with OpenID Connect. - content: *ref_39 + content: *ref_43 '400': description: 'The provider provided is not defined in the Sync Gateway config. If no provided was specified then there is no default provider set. ' '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '500': description: Unable to connect and validate with the OpenID Connect provider requested tags: @@ -2330,7 +2352,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2375,7 +2397,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: get_db-_oidc_testing-.well-known-openid-configuration @@ -2385,7 +2407,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2395,7 +2417,7 @@ paths: - name: scope in: query required: true - schema: &ref_40 + schema: &ref_44 type: string description: The OpenID Connect authentication scope. responses: @@ -2403,26 +2425,26 @@ paths: description: OK '400': description: A validation error occurred with the scope. - content: &ref_41 + content: &ref_45 application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error '403': description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '500': description: An error occurred. - content: &ref_42 + content: &ref_46 application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error tags: - Unsupported @@ -2434,22 +2456,22 @@ paths: - name: scope in: query required: true - schema: *ref_40 + schema: *ref_44 description: The OpenID Connect authentication scope. responses: '200': description: OK '400': description: A validation error occurred with the scope. - content: *ref_41 + content: *ref_45 '403': description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '500': description: An error occurred. - content: *ref_42 + content: *ref_46 tags: - Unsupported operationId: post_db-_oidc_testing-authorize @@ -2459,7 +2481,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. post: @@ -2485,12 +2507,12 @@ paths: responses: '200': description: Properties expected back from an OpenID Connect provider after successful authentication - content: &ref_76 + content: &ref_78 application/json: schema: description: Properties expected back from an OpenID Connect provider after successful authentication type: object - properties: &ref_71 + properties: &ref_73 access_token: type: string token_type: @@ -2508,7 +2530,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: post_db-_oidc_testing-token @@ -2518,7 +2540,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2559,7 +2581,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '500': description: An error occurred while getting the private RSA key content: @@ -2580,7 +2602,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2590,13 +2612,13 @@ paths: - name: redirect_uri in: query required: false - schema: &ref_43 + schema: &ref_47 type: string description: The Sync Gateway OpenID Connect callback URL. - name: scope in: query required: true - schema: *ref_40 + schema: *ref_44 description: The OpenID Connect authentication scope. - name: username in: query @@ -2621,7 +2643,7 @@ paths: responses: '302': description: Redirecting to Sync Gateway OpenID Connect callback URL - headers: &ref_44 + headers: &ref_48 Location: schema: type: string @@ -2630,7 +2652,7 @@ paths: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: get_db-_oidc_testing-authenticate @@ -2641,20 +2663,20 @@ paths: - name: redirect_uri in: query required: false - schema: *ref_43 + schema: *ref_47 description: The Sync Gateway OpenID Connect callback URL. - name: scope in: query required: true - schema: *ref_40 + schema: *ref_44 description: The OpenID Connect authentication scope. requestBody: - content: &ref_77 + content: &ref_79 application/json: schema: description: Properties passed from the OpenID Connect mock login page to the handler type: object - properties: &ref_72 + properties: &ref_74 username: type: string tokenttl: @@ -2663,7 +2685,7 @@ paths: type: string authenticated: type: string - required: &ref_73 + required: &ref_75 - username - tokenttl - identity-token-formats @@ -2672,12 +2694,12 @@ paths: responses: '302': description: Redirecting to Sync Gateway OpenID Connect callback URL - headers: *ref_44 + headers: *ref_48 '403': description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 tags: - Unsupported operationId: post_db-_oidc_testing-authenticate @@ -2686,7 +2708,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. get: @@ -2707,15 +2729,15 @@ paths: description: Upgraded to a web socket connection '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '426': description: Cannot upgrade connection to a web socket connection content: application/json: schema: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error example: error: Upgrade Required @@ -2748,7 +2770,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. post: @@ -2756,7 +2778,7 @@ paths: description: |- Creates a new session based on a Facebook user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls. - If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned. + If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options. requestBody: content: application/json: @@ -2772,8 +2794,8 @@ paths: '200': description: Session created successfully '400': - description: Origin is not in the approved list of allowed origins - content: *ref_45 + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: *ref_5 '401': description: Received error from Facebook verifier content: @@ -2787,7 +2809,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '502': description: Received invalid response from the Facebook verifier content: @@ -2820,7 +2842,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. post: @@ -2828,7 +2850,7 @@ paths: description: |- Creates a new session based on a Google user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls. - If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned. + If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options. requestBody: content: application/json: @@ -2844,8 +2866,8 @@ paths: '200': description: Session created successfully '400': - description: Origin is not in the approved list of allowed origins - content: *ref_45 + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: *ref_5 '401': description: Received error from Google token verifier or invalid application ID in the config content: @@ -2859,7 +2881,7 @@ paths: type: string '404': description: Resource could not be found - content: *ref_2 + content: *ref_7 '502': description: Received invalid response from the Google token verifier content: @@ -2882,7 +2904,7 @@ paths: - name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. post: @@ -2920,15 +2942,15 @@ components: name: db in: path required: true - schema: *ref_3 + schema: *ref_6 example: db1 description: The name of the database to run the operation against. keyspace: name: keyspace in: path required: true - schema: *ref_6 - examples: *ref_7 + schema: *ref_10 + examples: *ref_11 description: |- The keyspace to run the operation against. @@ -2937,327 +2959,331 @@ components: name: roundtrip in: query required: false - schema: *ref_8 + schema: *ref_12 description: Block until document has been received by change cache ddoc: name: ddoc in: path required: true - schema: *ref_5 + schema: *ref_9 description: The design document name. view: name: view in: path required: true - schema: *ref_46 + schema: *ref_49 description: The view to target. inclusive_end: name: inclusive_end in: query required: false description: Indicates whether the specified end key should be included in the result. - schema: *ref_47 + schema: *ref_50 descending: name: descending in: query required: false description: Return documents in descending order. - schema: *ref_48 + schema: *ref_51 include_docs-cbs3: name: include_docs in: query required: false description: Only works when using Couchbase Server 3.0 and earlier. Indicates whether to include the full content of the documents in the response. - schema: *ref_49 + schema: *ref_52 reduce: name: reduce in: query required: false description: Whether to execute a reduce function on the response or not. - schema: *ref_50 + schema: *ref_53 group: name: group in: query required: false description: Group the results using the reduce function to a group or single row. - schema: *ref_51 + schema: *ref_54 skip: name: skip in: query required: false description: Skip the specified number of documents before starting to return results. - schema: *ref_52 + schema: *ref_55 limit: name: limit in: query required: false description: Return only the specified number of documents - schema: *ref_53 + schema: *ref_56 group_level: name: group_level in: query required: false description: Specify the group level to be used. - schema: *ref_54 + schema: *ref_57 startkey_docid: name: startkey_docid in: query required: false description: Return documents starting with the specified document identifier. - schema: *ref_55 + schema: *ref_58 endkey_docid: name: endkey_docid in: query required: false description: Stop returning records when the specified document identifier is reached. - schema: *ref_56 + schema: *ref_59 stale: name: stale in: query required: false description: Allow the results from a stale view to be used, without triggering a rebuild of all views within the encompassing design document. - schema: *ref_57 + schema: *ref_60 startkey: name: startkey in: query required: false - schema: *ref_29 + schema: *ref_33 description: Return records starting with the specified key. endkey: name: endkey in: query required: false - schema: *ref_30 + schema: *ref_34 description: Stop returning records when this key is reached. key: name: key in: query required: false description: Return only the document that matches the specified key. - schema: *ref_58 + schema: *ref_61 keys: name: keys in: query required: false - schema: *ref_28 + schema: *ref_32 description: An array of document ID strings to filter by. docid: name: docid in: path required: true - schema: *ref_25 + schema: *ref_29 example: doc1 description: The document ID to run the operation against. rev: name: rev in: query required: false - schema: *ref_10 + schema: *ref_14 example: 2-5145e1086bb8d1d71a531e9f6b543c58 description: The document revision to target. This can be a RevTree ID or a CV (Current Version) ID. If this is a CV value, ensure the query parameter is URL encoded (`+`->`%2B`, `@`->`%40`, etc.) open_revs: name: open_revs in: query required: false - schema: *ref_19 + schema: *ref_23 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 bodies that haven''t been pruned are guaranteed to be returned. If 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.' show_exp: name: show_exp in: query required: false - schema: *ref_20 + schema: *ref_24 description: Whether to show the expiry property (`_exp`) in the response. revs_from: name: revs_from in: query required: false - schema: *ref_21 + schema: *ref_25 description: Trim the revision history to stop at the first revision in the provided list. If no match is found, the revisions will be trimmed to the `revs_limit`. atts_since: name: atts_since in: query required: false - schema: *ref_22 + schema: *ref_26 description: Include attachments only since specified revisions. Excludes the attachments for the specified revisions. Only gets used if `attachments=true`. revs_limit: name: revs_limit in: query required: false - schema: *ref_23 + schema: *ref_27 description: Maximum amount of revisions to return for each document. includeAttachments: name: attachments in: query required: false - schema: *ref_24 + schema: *ref_28 description: Include attachment bodies in response. replicator2: name: replicator2 in: query required: false - schema: *ref_9 + schema: *ref_13 description: Returns the document with the required properties for replication. This is an enterprise-edition only feature. new_edits: name: new_edits in: query required: false - schema: *ref_59 + schema: *ref_62 description: 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 for replication. This option must be used in conjunction with the `_revisions` property in the request body. Document-If-Match: name: If-Match in: header required: false - schema: *ref_17 + schema: *ref_21 description: An optimistic concurrency control (OCC) value used to prevent conflicts. Use the value returned in the ETag response header of the GET request for the resource being updated, or the latest known Revision Tree ID or Current Version of the document. include_docs: name: include_docs in: query required: false - schema: *ref_27 + schema: *ref_31 description: Include the body associated with each document. Include-channels: name: channels in: query required: false - schema: *ref_31 + schema: *ref_35 description: Include the channels each document is part of that the calling user also has access too. include-access: name: access in: query required: false - schema: *ref_32 + schema: *ref_36 description: Include what user/roles that each document grants access too. include-revs: name: revs in: query required: false - schema: *ref_33 + schema: *ref_37 description: Include all the revisions for each document under the `_revisions` property. include-seqs: name: update_seq in: query required: false - schema: *ref_34 + schema: *ref_38 description: Include the document sequence number `update_seq` property for each document. limit-result-rows: name: limit in: query required: false - schema: *ref_35 + schema: *ref_39 description: This limits the number of result rows returned. Using a value of `0` has the same effect as the value `1`. provider: name: provider in: query required: false - schema: *ref_37 + schema: *ref_41 description: The OpenID Connect provider to use for authentication. The list of providers are defined in the Sync Gateway config. If left empty, the default provider will be used. offline: name: offline in: query required: false - schema: *ref_38 + schema: *ref_42 description: If true, the OpenID Connect provider is requested to confirm with the user the permissions requested and refresh the OIDC token. To do this, access_type=offline and prompt=consent is set on the redirection link. oidc-code: name: code in: query required: true - schema: *ref_60 + schema: *ref_63 description: The OpenID Connect authentication code. oidc-state: name: state in: query required: false - schema: *ref_61 + schema: *ref_64 description: The OpenID Connect state to verify against the state cookie. This is used to prevent cross-site request forgery (CSRF). This is not required if `disable_callback_state=true` for the provider config (NOT recommended). oidc-scope: name: scope in: query required: true - schema: *ref_40 + schema: *ref_44 description: The OpenID Connect authentication scope. oidc-redirect_uri: name: redirect_uri in: query required: false - schema: *ref_43 + schema: *ref_47 description: The Sync Gateway OpenID Connect callback URL. schemas: User-session-information: type: object - properties: *ref_62 + properties: *ref_0 + required: *ref_1 title: User Session Information HTTP-Error: type: object - properties: *ref_0 - required: *ref_1 + properties: *ref_2 + required: *ref_3 title: HTTP-Error DatabaseState: description: The state of the database. type: string - enum: *ref_63 - x-enumDescriptions: *ref_64 + enum: *ref_65 + x-enumDescriptions: *ref_66 Vendor: description: Product vendor type: object - properties: *ref_65 - required: *ref_66 + properties: *ref_67 + required: *ref_68 title: Vendor NodeInfo: type: object - properties: *ref_67 - required: *ref_68 + properties: *ref_69 + required: *ref_70 Document: description: The configurable Sync Gateway properties of a document. type: object additionalProperties: true - properties: *ref_11 + properties: *ref_15 New-revision: description: Properties returned when a new document revision is created type: object - properties: *ref_12 - required: *ref_13 + properties: *ref_16 + required: *ref_17 title: New-revision Design-doc: description: Properties of a design document type: object - properties: *ref_4 + properties: *ref_8 Changes-feed: description: Properties of a changes feed type: object - properties: *ref_69 + properties: *ref_71 OIDC-callback: type: object - properties: *ref_70 + properties: *ref_72 title: OpenID Connect callback properties OIDC-token: description: Properties expected back from an OpenID Connect provider after successful authentication type: object - properties: *ref_71 + properties: *ref_73 title: OIDC-token OIDC-login-page-handler: description: Properties passed from the OpenID Connect mock login page to the handler type: object - properties: *ref_72 - required: *ref_73 + properties: *ref_74 + required: *ref_75 responses: User-session-information: description: Properties associated with a user session - content: *ref_74 + content: *ref_76 + Unauthorized: + description: User does not have access to resource, or resource does not exist + content: *ref_4 + Invalid-CORS-LoginOrigin: + description: Value of `Origin` is not in the approved list of allowed origins in `LoginOrigin` of Sync Gateway bootstrap or database configuration. + content: *ref_5 Not-found: description: Resource could not be found - content: *ref_2 - Invalid-CORS: - description: Origin is not in the approved list of allowed origins - content: *ref_45 + content: *ref_7 request-problem: description: There was a problem with your request - content: *ref_14 + content: *ref_18 Conflict: description: Resource already exists under that name - content: *ref_15 + content: *ref_19 Invalid-content-type: description: Invalid content type - content: *ref_16 + content: *ref_20 ddoc-forbidden: description: Forbidden access possibly due to not using the Admin API or the design document is a built-in Sync Gateway one. invalid-doc-id: @@ -3265,38 +3291,38 @@ components: Document ID is not in an allowed format therefore is invalid. This could be because it is over 250 characters or is prefixed with an underscore ("_"). - content: *ref_18 + content: *ref_22 New-revision: description: New revision created successfully - content: *ref_75 + content: *ref_77 changes-feed: description: Successfully returned the changes feed - content: *ref_26 + content: *ref_30 all-docs: description: Operation ran successfully - content: *ref_36 + content: *ref_40 OIDC-invalid-provider: description: 'The provider provided is not defined in the Sync Gateway config. If no provided was specified then there is no default provider set. ' OIDC-connection: description: Unable to connect and validate with the OpenID Connect provider requested OIDC-callback: description: Successfully authenticated with OpenID Connect. - content: *ref_39 + content: *ref_43 OIDC-test-provider-disabled: description: The OpenID Connect unsupported config option `oidc_test_provider` is not enabled. To use this endpoint, this option must be enabled. OIDC-invalid-scope: description: A validation error occurred with the scope. - content: *ref_41 + content: *ref_45 OIDC-testing-internal-error: description: An error occurred. - content: *ref_42 + content: *ref_46 OIDC-token: description: Properties expected back from an OpenID Connect provider after successful authentication - content: *ref_76 + content: *ref_78 OIDC-testing-redirect: description: Redirecting to Sync Gateway OpenID Connect callback URL - headers: *ref_44 + headers: *ref_48 requestBodies: OIDC-login-page-handler: - content: *ref_77 + content: *ref_79 description: Properties passed from the OpenID Connect mock login page to the handler diff --git a/modules/ROOT/partials/sgw-openapi-admin.html b/modules/ROOT/partials/sgw-openapi-admin.html index bef51057..7bcb09c0 100644 --- a/modules/ROOT/partials/sgw-openapi-admin.html +++ b/modules/ROOT/partials/sgw-openapi-admin.html @@ -1,5 +1,5 @@ - -