{
  "opencollection": "1.0.0",
  "info": {
    "name": "Couchbase Capella App Services Admin API",
    "version": "3.0"
  },
  "request": {
    "auth": {
      "type": "basic",
      "username": "{{username}}",
      "password": "{{password}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Database Administration",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get database configuration",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_config",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Returns the full configuration of the specified database including sync function, import filter, and other settings."
        },
        {
          "info": {
            "name": "Update database configuration",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{appEndpoint}:4985/:db/_config",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the configuration of the specified database. This can include changes to the sync function, import filter, and other settings."
        },
        {
          "info": {
            "name": "Get sync function",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_config/sync",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Returns the current sync function for the specified database."
        },
        {
          "info": {
            "name": "Update sync function",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{appEndpoint}:4985/:db/_config/sync",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Updates the sync function for the specified database. The sync function controls document routing to channels and access grants."
        },
        {
          "info": {
            "name": "Take database offline",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{appEndpoint}:4985/:db/_offline",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Takes the specified database offline, preventing any client access."
        },
        {
          "info": {
            "name": "Bring database online",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{appEndpoint}:4985/:db/_online",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Brings the specified database back online after being taken offline."
        },
        {
          "info": {
            "name": "Resync database",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{appEndpoint}:4985/:db/_resync",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Reprocesses all documents through the sync function. This is required after updating the sync function to apply changes to existing documents."
        }
      ]
    },
    {
      "info": {
        "name": "User Management",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List all users",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_user/",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Returns the list of all users configured for the specified database."
        },
        {
          "info": {
            "name": "Create a user",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{appEndpoint}:4985/:db/_user/",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new user for the specified database with the given credentials and channel assignments."
        },
        {
          "info": {
            "name": "Get user details",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_user/:userName",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "userName",
                "value": "",
                "type": "path",
                "description": "The username"
              }
            ]
          },
          "docs": "Returns detailed information about a specific user including their roles, channels, and admin channels."
        },
        {
          "info": {
            "name": "Update a user",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{appEndpoint}:4985/:db/_user/:userName",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "userName",
                "value": "",
                "type": "path",
                "description": "The username"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the configuration of an existing user including their password, roles, and channel assignments."
        },
        {
          "info": {
            "name": "Delete a user",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{appEndpoint}:4985/:db/_user/:userName",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "userName",
                "value": "",
                "type": "path",
                "description": "The username"
              }
            ]
          },
          "docs": "Deletes the specified user from the database."
        }
      ]
    },
    {
      "info": {
        "name": "Role Management",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List all roles",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_role/",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Returns the list of all roles configured for the specified database."
        },
        {
          "info": {
            "name": "Create a role",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{appEndpoint}:4985/:db/_role/",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new role for the specified database with the given channel assignments."
        },
        {
          "info": {
            "name": "Get role details",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_role/:roleName",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "roleName",
                "value": "",
                "type": "path",
                "description": "The role name"
              }
            ]
          },
          "docs": "Returns detailed information about a specific role including its channel assignments."
        },
        {
          "info": {
            "name": "Update a role",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{appEndpoint}:4985/:db/_role/:roleName",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "roleName",
                "value": "",
                "type": "path",
                "description": "The role name"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the configuration of an existing role including its channel assignments."
        },
        {
          "info": {
            "name": "Delete a role",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{appEndpoint}:4985/:db/_role/:roleName",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "roleName",
                "value": "",
                "type": "path",
                "description": "The role name"
              }
            ]
          },
          "docs": "Deletes the specified role from the database."
        }
      ]
    },
    {
      "info": {
        "name": "Replication",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List replications",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_replication/",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ]
          },
          "docs": "Returns the list of all inter-Sync Gateway replications configured for the specified database."
        },
        {
          "info": {
            "name": "Create a replication",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{appEndpoint}:4985/:db/_replication/",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new inter-Sync Gateway replication for the specified database."
        },
        {
          "info": {
            "name": "Get replication details",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/:db/_replication/:replicationId",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "replicationId",
                "value": "",
                "type": "path",
                "description": "The replication identifier"
              }
            ]
          },
          "docs": "Returns detailed information about a specific replication."
        },
        {
          "info": {
            "name": "Update a replication",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{appEndpoint}:4985/:db/_replication/:replicationId",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "replicationId",
                "value": "",
                "type": "path",
                "description": "The replication identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the configuration of an existing replication."
        },
        {
          "info": {
            "name": "Delete a replication",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{appEndpoint}:4985/:db/_replication/:replicationId",
            "params": [
              {
                "name": "db",
                "value": "",
                "type": "path",
                "description": "The name of the database"
              },
              {
                "name": "replicationId",
                "value": "",
                "type": "path",
                "description": "The replication identifier"
              }
            ]
          },
          "docs": "Deletes the specified replication."
        }
      ]
    },
    {
      "info": {
        "name": "Monitoring",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get runtime statistics",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/_expvar"
          },
          "docs": "Returns runtime expvar statistics for the Sync Gateway instance including memory usage, goroutine counts, and database statistics."
        },
        {
          "info": {
            "name": "Get server status",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{appEndpoint}:4985/_status"
          },
          "docs": "Returns the status of the Sync Gateway server including version information and database states."
        }
      ]
    }
  ],
  "bundled": true
}