{"openapi":"3.1.0","info":{"title":"Berth API","version":"2.0.0","description":"Postgres per app, end-user auth, row policies, realtime, storage, functions, and webhooks. Docs: https://atberth.com/docs/"},"servers":[{"url":"https://api.atberth.com"}],"security":[{"bearer":[]},{"apikey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"},"apikey":{"type":"apiKey","in":"header","name":"apikey"}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}},"paths":{"/v1/health":{"get":{"operationId":"health_get","summary":"Liveness check","tags":["Platform"],"description":"No credential needed.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/v1/status":{"get":{"operationId":"status_get","summary":"Service status","tags":["Platform"],"description":"No credential needed.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/v1/openapi.json":{"get":{"operationId":"openapi_get","summary":"OpenAPI 3.1 document","tags":["Platform"],"description":"No credential needed.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/v1/signup":{"post":{"operationId":"signup_post","summary":"Create an account and email a login code","tags":["Accounts"],"description":"No credential needed.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}}}}}}}},"/v1/login":{"post":{"operationId":"login_post","summary":"Email a login code, or exchange a code for an account key","tags":["Accounts"],"description":"No credential needed.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"code":{"type":"string"},"key_name":{"type":"string"}}}}}}}},"/v1/me":{"get":{"operationId":"me_get","summary":"Describe the calling credential","tags":["Accounts"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account":{"get":{"operationId":"account_get_get","summary":"Your account, limits and usage","tags":["Accounts"],"description":"Account key (bak_) or the admin token.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"account_delete_delete","summary":"Delete your account and all its apps","tags":["Accounts"],"description":"Account key (bak_) or the admin token.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/keys":{"get":{"operationId":"account_keys_get","summary":"List account keys","tags":["Accounts"],"description":"Account key (bak_) or the admin token.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"account_key_create_post","summary":"Create an account key","tags":["Accounts"],"description":"Account key (bak_) or the admin token.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}}}},"/v1/account/keys/{key_id}":{"delete":{"operationId":"account_key_revoke_delete","summary":"Revoke an account key","tags":["Accounts"],"description":"Account key (bak_) or the admin token.","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/accounts":{"get":{"operationId":"admin_accounts_get","summary":"List accounts","tags":["Admin"],"description":"Platform admin token only.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/accounts/{account_id}":{"get":{"operationId":"admin_account_get_get","summary":"Show an account","tags":["Admin"],"description":"Platform admin token only.","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"admin_account_patch_patch","summary":"Change an account's limits or disable it","tags":["Admin"],"description":"Platform admin token only.","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limits":{"type":"object"},"disabled":{"type":"boolean"}}}}}}},"delete":{"operationId":"admin_account_delete_delete","summary":"Delete an account and its apps","tags":["Admin"],"description":"Platform admin token only.","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/codes":{"get":{"operationId":"admin_codes_get","summary":"Latest unexpired login code for an email (support and tests)","tags":["Admin"],"description":"Platform admin token only.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps":{"get":{"operationId":"apps_list_get","summary":"List apps","tags":["Apps"],"description":"Account key (bak_) or the admin token.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"apps_create_post","summary":"Create an app with its own database","tags":["Apps"],"description":"Account key (bak_) or the admin token.","parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}}}},"/v1/apps/{app}":{"get":{"operationId":"apps_get_get","summary":"Show an app","tags":["Apps"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"apps_patch_patch","summary":"Change app settings (CORS origins)","tags":["Apps"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cors_origins":{"type":"array","items":{}}}}}}}},"delete":{"operationId":"apps_delete_delete","summary":"Delete an app, its database, files and functions","tags":["Apps"],"description":"Account key (bak_) or the admin token.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/keys":{"get":{"operationId":"keys_list_get","summary":"List app keys","tags":["Keys"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"keys_create_post","summary":"Create a secret or publishable key","tags":["Keys"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["secret","publishable"]}}}}}}}},"/v1/apps/{app}/keys/{key_id}":{"delete":{"operationId":"keys_revoke_delete","summary":"Revoke an app key","tags":["Keys"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/usage":{"get":{"operationId":"apps_usage_get","summary":"Usage and limits for an app","tags":["Apps"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/logs":{"get":{"operationId":"apps_logs_get","summary":"Recent requests for an app","tags":["Apps"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/auth/signup":{"post":{"operationId":"signup_post_","summary":"Sign up an end user with email and password","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"data":{"type":"object"}}}}}}}},"/v1/apps/{app}/auth/login":{"post":{"operationId":"login_post_","summary":"Sign in an end user with email and password","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}}}}}}}},"/v1/apps/{app}/auth/code":{"post":{"operationId":"code_post","summary":"Email a 6 digit sign in code to an end user","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}}}}}}}},"/v1/apps/{app}/auth/verify":{"post":{"operationId":"verify_post","summary":"Exchange an emailed code for a session","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"code":{"type":"string"}}}}}}}},"/v1/apps/{app}/auth/refresh":{"post":{"operationId":"refresh_post","summary":"Trade a refresh token for a new session (rotates)","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refresh_token":{"type":"string"}}}}}}}},"/v1/apps/{app}/auth/me":{"get":{"operationId":"me_get_","summary":"The signed-in user","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"me_patch_patch","summary":"Change the signed-in user's password or data","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"data":{"type":"object"}}}}}}}},"/v1/apps/{app}/auth/logout":{"post":{"operationId":"logout_post","summary":"Sign out this session, or every session with all=true","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"all":{"type":"boolean"}}}}}}}},"/v1/apps/{app}/auth/users":{"get":{"operationId":"users_list_get","summary":"List end users (secret key)","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"users_create_post","summary":"Create an end user (secret key)","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"data":{"type":"object"}}}}}}}},"/v1/apps/{app}/auth/users/{user_id}":{"get":{"operationId":"users_get_get","summary":"Show an end user (secret key)","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"users_patch_patch","summary":"Ban, unban, or edit an end user (secret key)","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"banned":{"type":"boolean"},"data":{"type":"object"},"password":{"type":"string"},"email_verified":{"type":"boolean"}}}}}}},"delete":{"operationId":"users_delete_delete","summary":"Delete an end user and the rows they own (secret key)","tags":["Auth"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/functions":{"get":{"operationId":"functions_list_get","summary":"List functions","tags":["Functions"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/functions/{name}/deployment":{"put":{"operationId":"functions_deploy_put","summary":"Deploy or update a function","tags":["Functions"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string"},"verify":{"type":"string","enum":["key","user","none"]},"timeout_ms":{"type":"integer"},"memory_mb":{"type":"integer"},"schedule":{"type":"string"}}}}}}},"get":{"operationId":"functions_get_get","summary":"Show a function and its source","tags":["Functions"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"functions_delete_delete","summary":"Delete a function","tags":["Functions"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/functions/{name}/logs":{"get":{"operationId":"functions_logs_get","summary":"Recent invocations and their console output","tags":["Functions"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/functions/{name}":{"get":{"operationId":"invoke_get","summary":"Invoke a function","tags":["Functions"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"invoke_post","summary":"Invoke a function","tags":["Functions"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"put":{"operationId":"invoke_put","summary":"Invoke a function","tags":["Functions"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"patch":{"operationId":"invoke_patch","summary":"Invoke a function","tags":["Functions"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"delete":{"operationId":"invoke_delete","summary":"Invoke a function","tags":["Functions"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/env":{"get":{"operationId":"env_list_get","summary":"List env var names (values are never returned)","tags":["Env"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/env/{name}":{"put":{"operationId":"env_set_put","summary":"Set an env var for functions","tags":["Env"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string"}}}}}}},"delete":{"operationId":"env_unset_delete","summary":"Remove an env var","tags":["Env"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/tables":{"get":{"operationId":"tables_list_get","summary":"List tables and views with their columns","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"tables_create_post","summary":"Create a table","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"columns":{"type":"array","items":{}},"policy":{"type":"object"},"timestamps":{"type":"boolean"},"updated_at":{"type":"boolean"},"id_type":{"type":"string","enum":["uuid","bigint"]}}}}}}}},"/v1/apps/{app}/tables/{table}":{"get":{"operationId":"tables_get_get","summary":"Describe a table","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"tables_patch_patch","summary":"Rename a table or change its policy","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"policy":{"type":"object"}}}}}}},"delete":{"operationId":"tables_delete_delete","summary":"Drop a table (?cascade=true drops dependents)","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/tables/{table}/columns":{"post":{"operationId":"columns_add_post","summary":"Add a column","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"default":{},"not_null":{"type":"boolean"},"unique":{"type":"boolean"},"references":{"type":"object"}}}}}}}},"/v1/apps/{app}/tables/{table}/columns/{column}":{"patch":{"operationId":"columns_patch_patch","summary":"Rename or alter a column","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"column","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"default":{},"drop_default":{"type":"boolean"},"not_null":{"type":"boolean"}}}}}}},"delete":{"operationId":"columns_delete_delete","summary":"Drop a column","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"column","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/tables/{table}/indexes":{"get":{"operationId":"indexes_list_get","summary":"List indexes","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"indexes_create_post","summary":"Create an index","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{}},"unique":{"type":"boolean"},"name":{"type":"string"}}}}}}}},"/v1/apps/{app}/tables/{table}/indexes/{index}":{"delete":{"operationId":"indexes_delete_delete","summary":"Drop an index","tags":["Schema"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/tables/{table}/rows":{"get":{"operationId":"rows_list_get","summary":"List rows with filters, order, select, and cursor pagination","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"rows_insert_post","summary":"Insert one row or many (?upsert=true&on_conflict=col to upsert)","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"object or array of objects"}}}}},"patch":{"operationId":"rows_update_many_patch","summary":"Update every row matching the filters","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"object of column values"}}}}},"delete":{"operationId":"rows_delete_many_delete","summary":"Delete every row matching the filters","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/tables/{table}/rows/{id}":{"get":{"operationId":"row_get_get","summary":"Read one row by primary key","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"row_update_patch","summary":"Update one row","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"object of column values"}}}}},"delete":{"operationId":"row_delete_delete","summary":"Delete one row","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/tables/{table}/import":{"post":{"operationId":"rows_import_post","summary":"Bulk import CSV (header row) or NDJSON, all or nothing","tags":["Rows"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/v1/apps/{app}/tables/{table}/stream":{"get":{"operationId":"stream_get","summary":"Server-Sent Events for inserts, updates, and deletes","tags":["Realtime"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"apikey","in":"query","required":false,"schema":{"type":"string"}},{"name":"access_token","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/sql":{"post":{"operationId":"run_sql_post","summary":"Run one SQL statement as the app's role (secret key)","tags":["SQL"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"params":{"type":"array","items":{}},"read_only":{"type":"boolean"},"timeout_ms":{"type":"integer"}}}}}}}},"/v1/apps/{app}/rpc/{function}":{"post":{"operationId":"rpc_post","summary":"Call a Postgres function with named JSON arguments (secret key)","tags":["SQL"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"function","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"object of named arguments, for example {\"code\": \"AB12\"}"}}}}}},"/v1/apps/{app}/export":{"get":{"operationId":"export_get","summary":"Download a pg_dump (custom format) of the app database","tags":["Export"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{new_app}/restore":{"post":{"operationId":"restore_post","summary":"Create a new app from a pg_dump custom-format file","tags":["Export"],"description":"Account key (bak_) or the admin token.","parameters":[{"name":"new_app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/v1/apps/{app}/storage/buckets":{"get":{"operationId":"buckets_list_get","summary":"List buckets","tags":["Storage"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"buckets_create_post","summary":"Create a bucket","tags":["Storage"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"public":{"type":"boolean"},"read":{"type":"string"},"write":{"type":"string"},"max_file_size":{"type":"integer"},"allowed_types":{"type":"array","items":{}}}}}}}}},"/v1/apps/{app}/storage/buckets/{bucket}":{"get":{"operationId":"buckets_get_get","summary":"Show a bucket","tags":["Storage"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"buckets_patch_patch","summary":"Change a bucket's policy or limits","tags":["Storage"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"public":{"type":"boolean"},"read":{"type":"string"},"write":{"type":"string"},"max_file_size":{"type":"integer"},"allowed_types":{"type":"array","items":{}}}}}}}},"delete":{"operationId":"buckets_delete_delete","summary":"Delete a bucket (?force=true deletes its files)","tags":["Storage"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/storage/objects/{bucket}":{"get":{"operationId":"objects_list_get","summary":"List files in a bucket","tags":["Storage"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/storage/objects/{bucket}/{key}":{"put":{"operationId":"objects_put_put","summary":"Upload a file (raw body, overwrites)","tags":["Storage"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"get":{"operationId":"objects_get_get","summary":"Download a file (auth, public bucket, or signed URL)","tags":["Storage"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"objects_delete_delete","summary":"Delete a file","tags":["Storage"],"description":"Credential depends on the bucket or function settings.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/storage/sign/{bucket}/{key}":{"post":{"operationId":"objects_sign_post","summary":"Make a signed download URL that expires","tags":["Storage"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expires_in":{"type":"integer"}}}}}}}},"/v1/apps/{app}/webhooks":{"get":{"operationId":"hooks_list_get","summary":"List webhooks","tags":["Webhooks"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"hooks_create_post","summary":"Add a webhook for row changes","tags":["Webhooks"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"table":{"type":"string"},"events":{"type":"array","items":{}},"description":{"type":"string"}}}}}}}},"/v1/apps/{app}/webhooks/{webhook_id}":{"get":{"operationId":"hooks_get_get","summary":"Show a webhook","tags":["Webhooks"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"hooks_patch_patch","summary":"Change a webhook's URL, events, or enabled state","tags":["Webhooks"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{}},"enabled":{"type":"boolean"},"description":{"type":"string"}}}}}}},"delete":{"operationId":"hooks_delete_delete","summary":"Remove a webhook","tags":["Webhooks"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/webhooks/{webhook_id}/deliveries":{"get":{"operationId":"hooks_deliveries_get","summary":"Recent deliveries and their results","tags":["Webhooks"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/apps/{app}/webhooks/{webhook_id}/test":{"post":{"operationId":"hooks_test_post","summary":"Send a signed ping to the webhook now","tags":["Webhooks"],"description":"Needs a credential. Settings, schema, keys, SQL, rpc, env, webhooks and export need a secret app key (bsk_) or the owning account key. Rows, storage, end-user auth and functions also take publishable keys and user tokens, limited by table, bucket and function policies.","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
