{"openapi":"3.0.0","info":{"title":"dbmuse API","version":"1.0.0","description":"Public REST API for dbmuse. Authenticate with an API key created in the dbmuse dashboard: send the base64-encoded key secret with HTTP Basic auth. Each key is scoped to a single project and carries per-resource scopes like `databases:read` or `projects:write`."},"servers":[{"url":"https://api.dbmuse.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"basic","description":"HTTP Basic auth carrying only the API key secret: `Authorization: Basic base64(<key secret>)`."},"accessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Operator session token issued by the dbmuse dashboard: `Authorization: Token <access token>`."}}},"paths":{"/api/databases":{"get":{"tags":["Databases"],"summary":"List database connections","description":"Lists the database connection entries of your organization. A key is scoped to a single project and only ever sees that project's connections. OAuth and API-key responses are restricted to safe connection metadata and exclude credentials. Existing operator dashboard sessions retain the product's full saved-connection behavior. Requires the `databases:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","default":0}},{"in":"query","name":"skip","schema":{"type":"integer","default":0}},{"in":"query","name":"sortField","schema":{"type":"string","example":"lastEditTime"}},{"in":"query","name":"sortDirection","schema":{"type":"string","enum":["ASC","DESC"]}},{"in":"query","name":"fields","description":"Comma-separated projection of fields to return","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of database connections","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"name":{"type":"string"},"databaseType":{"type":"string"},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"database":{"type":"string"},"demo":{"type":"boolean"},"config":{"type":"object","properties":{"authDatabase":{"type":"string"},"schema":{"type":"string"},"serviceName":{"type":"string"}}},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"403":{"description":"API key is missing the `databases:read` scope","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"429":{"description":"API key rate limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"getApiDatabases","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.dbmuse.com/api/databases',\n  qs: {\n    projectId: 'SOME_STRING_VALUE',\n    limit: 'SOME_INTEGER_VALUE',\n    skip: 'SOME_INTEGER_VALUE',\n    sortField: 'lastEditTime',\n    sortDirection: 'SOME_STRING_VALUE',\n    fields: 'SOME_STRING_VALUE'\n  },\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.dbmuse.com/api/databases?projectId=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=lastEditTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.dbmuse.com/api/databases?projectId=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=lastEditTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/databases?projectId=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=lastEditTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/databases?projectId=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=lastEditTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/databases');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'projectId' => 'SOME_STRING_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'skip' => 'SOME_INTEGER_VALUE',\n  'sortField' => 'lastEditTime',\n  'sortDirection' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/databases');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'projectId' => 'SOME_STRING_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'skip' => 'SOME_INTEGER_VALUE',\n  'sortField' => 'lastEditTime',\n  'sortDirection' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Databases"],"summary":"Create a database connection","description":"Creates a database connection entry. A key writes into its own project only. Requires the `databases:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The created database connection","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"name":{"type":"string"},"databaseType":{"type":"string"},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"database":{"type":"string"},"demo":{"type":"boolean"},"config":{"type":"object","properties":{"authDatabase":{"type":"string"},"schema":{"type":"string"},"serviceName":{"type":"string"}}},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"403":{"description":"API key is missing the `databases:write` scope","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"postApiDatabases","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"name":{"type":"string"},"databaseType":{"type":"string"},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"database":{"type":"string"},"config":{"type":"object","properties":{"authDatabase":{"type":"string"},"schema":{"type":"string"},"serviceName":{"type":"string"}}}}}}}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.dbmuse.com/api/databases',\n  headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'},\n  body: {\n    projectId: 'string',\n    name: 'string',\n    databaseType: 'string',\n    host: 'string',\n    port: 1,\n    database: 'string',\n    config: {authDatabase: 'string', schema: 'string', serviceName: 'string'}\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.dbmuse.com/api/databases \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH' \\\n  --header 'content-type: application/json' \\\n  --data '{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}'"},{"lang":"Shell + Httpie","source":"echo '{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}' |  \\\n  http POST https://api.dbmuse.com/api/databases \\\n  Authorization:'Basic REPLACE_BASIC_AUTH' \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\npayload = \"{\\\"projectId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"databaseType\\\":\\\"string\\\",\\\"host\\\":\\\"string\\\",\\\"port\\\":1,\\\"database\\\":\\\"string\\\",\\\"config\\\":{\\\"authDatabase\\\":\\\"string\\\",\\\"schema\\\":\\\"string\\\",\\\"serviceName\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"Basic REPLACE_BASIC_AUTH\"\n    }\n\nconn.request(\"POST\", \"/api/databases\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/databases\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"projectId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"databaseType\\\":\\\"string\\\",\\\"host\\\":\\\"string\\\",\\\"port\\\":1,\\\"database\\\":\\\"string\\\",\\\"config\\\":{\\\"authDatabase\\\":\\\"string\\\",\\\"schema\\\":\\\"string\\\",\\\"serviceName\\\":\\\"string\\\"}}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/databases');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$request->setBody('{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}');\n\n$request->setRequestUrl('https://api.dbmuse.com/api/databases');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/databases/{databaseId}":{"get":{"tags":["Databases"],"summary":"Get a database connection","description":"Returns a single database connection by id. Connections belonging to another organization (or, for a key, another project) respond 404. Requires the `databases:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The database connection","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"name":{"type":"string"},"databaseType":{"type":"string"},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"database":{"type":"string"},"demo":{"type":"boolean"},"config":{"type":"object","properties":{"authDatabase":{"type":"string"},"schema":{"type":"string"},"serviceName":{"type":"string"}}},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Not found (or owned by another organization)","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"getApiDatabasesDatabaseId","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.dbmuse.com/api/databases/%7BdatabaseId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://api.dbmuse.com/api/databases/%7BdatabaseId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET https://api.dbmuse.com/api/databases/%7BdatabaseId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/databases/%7BdatabaseId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/databases/%7BdatabaseId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/databases/%7BdatabaseId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/databases/%7BdatabaseId%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"put":{"tags":["Databases"],"summary":"Update a database connection","description":"Requires the `databases:write` scope.","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated database connection","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"name":{"type":"string"},"databaseType":{"type":"string"},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"database":{"type":"string"},"demo":{"type":"boolean"},"config":{"type":"object","properties":{"authDatabase":{"type":"string"},"schema":{"type":"string"},"serviceName":{"type":"string"}}},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"putApiDatabasesDatabaseId","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"name":{"type":"string"},"databaseType":{"type":"string"},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"database":{"type":"string"},"config":{"type":"object","properties":{"authDatabase":{"type":"string"},"schema":{"type":"string"},"serviceName":{"type":"string"}}}}}}}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.dbmuse.com/api/databases/%7BdatabaseId%7D',\n  headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'},\n  body: {\n    projectId: 'string',\n    name: 'string',\n    databaseType: 'string',\n    host: 'string',\n    port: 1,\n    database: 'string',\n    config: {authDatabase: 'string', schema: 'string', serviceName: 'string'}\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://api.dbmuse.com/api/databases/%7BdatabaseId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH' \\\n  --header 'content-type: application/json' \\\n  --data '{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}'"},{"lang":"Shell + Httpie","source":"echo '{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}' |  \\\n  http PUT https://api.dbmuse.com/api/databases/%7BdatabaseId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH' \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\npayload = \"{\\\"projectId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"databaseType\\\":\\\"string\\\",\\\"host\\\":\\\"string\\\",\\\"port\\\":1,\\\"database\\\":\\\"string\\\",\\\"config\\\":{\\\"authDatabase\\\":\\\"string\\\",\\\"schema\\\":\\\"string\\\",\\\"serviceName\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"Basic REPLACE_BASIC_AUTH\"\n    }\n\nconn.request(\"PUT\", \"/api/databases/%7BdatabaseId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/databases/%7BdatabaseId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\\"projectId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"databaseType\\\":\\\"string\\\",\\\"host\\\":\\\"string\\\",\\\"port\\\":1,\\\"database\\\":\\\"string\\\",\\\"config\\\":{\\\"authDatabase\\\":\\\"string\\\",\\\"schema\\\":\\\"string\\\",\\\"serviceName\\\":\\\"string\\\"}}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/databases/%7BdatabaseId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$request->setBody('{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"projectId\":\"string\",\"name\":\"string\",\"databaseType\":\"string\",\"host\":\"string\",\"port\":1,\"database\":\"string\",\"config\":{\"authDatabase\":\"string\",\"schema\":\"string\",\"serviceName\":\"string\"}}');\n\n$request->setRequestUrl('https://api.dbmuse.com/api/databases/%7BdatabaseId%7D');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"delete":{"tags":["Databases"],"summary":"Delete a database connection","description":"Deleting a connection that belongs to another organization (or, for a key, another project) responds 404. Requires the `databases:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The deleted database connection","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"name":{"type":"string"},"databaseType":{"type":"string"},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"database":{"type":"string"},"demo":{"type":"boolean"},"config":{"type":"object","properties":{"authDatabase":{"type":"string"},"schema":{"type":"string"},"serviceName":{"type":"string"}}},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Not found (or owned by another organization)","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"deleteApiDatabasesDatabaseId","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://api.dbmuse.com/api/databases/%7BdatabaseId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://api.dbmuse.com/api/databases/%7BdatabaseId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http DELETE https://api.dbmuse.com/api/databases/%7BdatabaseId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"DELETE\", \"/api/databases/%7BdatabaseId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/databases/%7BdatabaseId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/databases/%7BdatabaseId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/databases/%7BdatabaseId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/projects":{"get":{"tags":["Projects"],"summary":"List projects","description":"Lists the projects of your organization. A key is scoped to a single project and only ever sees that one. Requires the `projects:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"Array of projects","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"name":{"type":"string"},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"403":{"description":"API key is missing the `projects:read` scope","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"429":{"description":"API key rate limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"getApiProjects","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.dbmuse.com/api/projects',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://api.dbmuse.com/api/projects \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET https://api.dbmuse.com/api/projects \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/projects\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/projects\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/projects');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/projects');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Projects"],"summary":"Create a project","description":"Requires the `projects:write` scope.","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The created project","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"name":{"type":"string"},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"403":{"description":"API key is missing the `projects:write` scope","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"postApiProjects","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.dbmuse.com/api/projects',\n  headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'},\n  body: {name: 'string'},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.dbmuse.com/api/projects \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Shell + Httpie","source":"echo '{\"name\":\"string\"}' |  \\\n  http POST https://api.dbmuse.com/api/projects \\\n  Authorization:'Basic REPLACE_BASIC_AUTH' \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"Basic REPLACE_BASIC_AUTH\"\n    }\n\nconn.request(\"POST\", \"/api/projects\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/projects\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"name\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/projects');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"string\"}');\n\n$request->setRequestUrl('https://api.dbmuse.com/api/projects');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/projects/{projectId}":{"get":{"tags":["Projects"],"summary":"Get a project","description":"Returns a single project by id. Projects belonging to another organization (or, for a key, another project) respond 404. Requires the `projects:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"name":{"type":"string"},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Not found (or owned by another organization)","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"getApiProjectsProjectId","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.dbmuse.com/api/projects/%7BprojectId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://api.dbmuse.com/api/projects/%7BprojectId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET https://api.dbmuse.com/api/projects/%7BprojectId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/projects/%7BprojectId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/projects/%7BprojectId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/projects/%7BprojectId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/projects/%7BprojectId%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"put":{"tags":["Projects"],"summary":"Update a project","description":"Updating a project that belongs to another tenant responds 404. Requires the `projects:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated project","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"name":{"type":"string"},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Not found (or owned by another organization)","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"putApiProjectsProjectId","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.dbmuse.com/api/projects/%7BprojectId%7D',\n  headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'},\n  body: {name: 'string'},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://api.dbmuse.com/api/projects/%7BprojectId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Shell + Httpie","source":"echo '{\"name\":\"string\"}' |  \\\n  http PUT https://api.dbmuse.com/api/projects/%7BprojectId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH' \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"Basic REPLACE_BASIC_AUTH\"\n    }\n\nconn.request(\"PUT\", \"/api/projects/%7BprojectId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/projects/%7BprojectId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\\"name\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/projects/%7BprojectId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"string\"}');\n\n$request->setRequestUrl('https://api.dbmuse.com/api/projects/%7BprojectId%7D');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"delete":{"tags":["Projects"],"summary":"Delete a project","description":"Deleting a project that belongs to another tenant responds 404. Requires the `projects:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The deleted project","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"name":{"type":"string"},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Not found (or owned by another organization)","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"deleteApiProjectsProjectId","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://api.dbmuse.com/api/projects/%7BprojectId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://api.dbmuse.com/api/projects/%7BprojectId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http DELETE https://api.dbmuse.com/api/projects/%7BprojectId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"DELETE\", \"/api/projects/%7BprojectId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/projects/%7BprojectId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/projects/%7BprojectId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/projects/%7BprojectId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/webhooksubscriptions":{"get":{"tags":["Webhook subscriptions"],"summary":"List webhook subscriptions","description":"Webhook subscriptions deliver `database.created`, `database.updated`, `database.deleted`, `project.created`, `project.updated` and `project.deleted` events to your server as signed POST requests (`X-Dbmuse-Signature: t=<timestamp>,v1=<hex HMAC-SHA256 of \"timestamp.body\">`). An endpoint failing 20 times in a row is disabled automatically. Subscriptions are managed with an operator access token; the `secret` is only returned once, on create.\n","security":[{"accessToken":[]}],"responses":{"200":{"description":"Array of webhook subscriptions (without secrets)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"consecutiveFailures":{"type":"integer","minimum":0},"secret":{"type":"string","description":"Returned once when a webhook subscription is created."},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"getApiWebhooksubscriptions","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.dbmuse.com/api/webhooksubscriptions',\n  headers: {Authorization: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://api.dbmuse.com/api/webhooksubscriptions \\\n  --header 'Authorization: REPLACE_KEY_VALUE'"},{"lang":"Shell + Httpie","source":"http GET https://api.dbmuse.com/api/webhooksubscriptions \\\n  Authorization:REPLACE_KEY_VALUE"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/api/webhooksubscriptions\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/webhooksubscriptions\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/webhooksubscriptions');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/webhooksubscriptions');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Webhook subscriptions"],"summary":"Create a webhook subscription","description":"The response includes the signing `secret` exactly once — store it; it cannot be retrieved again.\n","security":[{"accessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","url"],"properties":{"projectId":{"type":"string"},"url":{"type":"string","example":"https://example.com/dbmuse-webhook"},"events":{"type":"array","description":"Empty array subscribes to all events","items":{"type":"string","enum":["database.created","database.updated","database.deleted","project.created","project.updated","project.deleted"]}}}}}}},"responses":{"200":{"description":"The created subscription, including its secret","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"consecutiveFailures":{"type":"integer","minimum":0},"secret":{"type":"string","description":"Returned once when a webhook subscription is created."},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"postApiWebhooksubscriptions","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.dbmuse.com/api/webhooksubscriptions',\n  headers: {'content-type': 'application/json', Authorization: 'REPLACE_KEY_VALUE'},\n  body: {\n    projectId: 'string',\n    url: 'https://example.com/dbmuse-webhook',\n    events: ['database.created']\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.dbmuse.com/api/webhooksubscriptions \\\n  --header 'Authorization: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"projectId\":\"string\",\"url\":\"https://example.com/dbmuse-webhook\",\"events\":[\"database.created\"]}'"},{"lang":"Shell + Httpie","source":"echo '{\"projectId\":\"string\",\"url\":\"https://example.com/dbmuse-webhook\",\"events\":[\"database.created\"]}' |  \\\n  http POST https://api.dbmuse.com/api/webhooksubscriptions \\\n  Authorization:REPLACE_KEY_VALUE \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\npayload = \"{\\\"projectId\\\":\\\"string\\\",\\\"url\\\":\\\"https://example.com/dbmuse-webhook\\\",\\\"events\\\":[\\\"database.created\\\"]}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/api/webhooksubscriptions\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/webhooksubscriptions\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"projectId\\\":\\\"string\\\",\\\"url\\\":\\\"https://example.com/dbmuse-webhook\\\",\\\"events\\\":[\\\"database.created\\\"]}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/webhooksubscriptions');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$request->setBody('{\"projectId\":\"string\",\"url\":\"https://example.com/dbmuse-webhook\",\"events\":[\"database.created\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"projectId\":\"string\",\"url\":\"https://example.com/dbmuse-webhook\",\"events\":[\"database.created\"]}');\n\n$request->setRequestUrl('https://api.dbmuse.com/api/webhooksubscriptions');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/webhooksubscriptions/{webhookSubscriptionId}":{"put":{"tags":["Webhook subscriptions"],"summary":"Update a webhook subscription","description":"`url`, `events` and `active` are editable; the secret and project are immutable. Re-enabling an auto-disabled endpoint is done by setting `active` back to true.\n","security":[{"accessToken":[]}],"parameters":[{"in":"path","name":"webhookSubscriptionId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The updated subscription (without secret)","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"consecutiveFailures":{"type":"integer","minimum":0},"secret":{"type":"string","description":"Returned once when a webhook subscription is created."},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"putApiWebhooksubscriptionsWebhookSubscriptionId","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D',\n  headers: {'content-type': 'application/json', Authorization: 'REPLACE_KEY_VALUE'},\n  body: {},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  --header 'Authorization: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{}'"},{"lang":"Shell + Httpie","source":"echo '{}' |  \\\n  http PUT https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  Authorization:REPLACE_KEY_VALUE \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\npayload = \"{}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$request->setBody('{}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{}');\n\n$request->setRequestUrl('https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"delete":{"tags":["Webhook subscriptions"],"summary":"Delete a webhook subscription","security":[{"accessToken":[]}],"parameters":[{"in":"path","name":"webhookSubscriptionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"consecutiveFailures":{"type":"integer","minimum":0},"secret":{"type":"string","description":"Returned once when a webhook subscription is created."},"creationTime":{"type":"string","format":"date-time"},"lastEditTime":{"type":"string","format":"date-time"}}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"name":{"type":"string"},"statusCode":{"type":"integer"},"details":{"type":"object","additionalProperties":true}}}}}}},"operationId":"deleteApiWebhooksubscriptionsWebhookSubscriptionId","description":"Delete a webhook subscription","x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D',\n  headers: {Authorization: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  --header 'Authorization: REPLACE_KEY_VALUE'"},{"lang":"Shell + Httpie","source":"http DELETE https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  Authorization:REPLACE_KEY_VALUE"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.dbmuse.com\")\n\nheaders = { 'Authorization': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"DELETE\", \"/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dbmuse.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}}},"tags":[]}