Skip to content

Instantly share code, notes, and snippets.

@simplyluke
Created September 18, 2025 02:24
Show Gist options
  • Save simplyluke/e2aacf22a44755a43804550f27c7286e to your computer and use it in GitHub Desktop.
Save simplyluke/e2aacf22a44755a43804550f27c7286e to your computer and use it in GitHub Desktop.
2.4.0 api spec
{"openapi":"3.0.0","info":{"version":"2.4.0","title":"Retool API","description":"Go to Settings > API to get started. Once you generate an API token, use bearer token authentication to make requests."},"externalDocs":{"description":"Retool API Documentation","url":"https://docs.retool.com/reference/api-ref"},"servers":[{"url":"./"}],"security":[{"BearerAuth":[]}],"components":{"schemas":{"user":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The id of the user"},"legacy_id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The legacy id of the user"},"email":{"type":"string","format":"email","description":"The email of the user"},"active":{"type":"boolean","description":"Whether the user is active or not"},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"last_active":{"type":"string","nullable":true,"format":"date-time","example":"2019-02-08T11:45:48.899Z"},"first_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The first name of the user"},"last_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The last name of the user"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"is_admin":{"type":"boolean","description":"Whether the user is an admin or not"},"user_type":{"type":"string","enum":["default","mobile","embed"],"description":"The user type"}},"required":["id","legacy_id","email","active","created_at","last_active","first_name","last_name","metadata","is_admin","user_type"],"additionalProperties":false,"description":"This object represents a user."},"group":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"This object represents a permission group. A permission group is a list of users by which to restrict access. You add users to one or more groups and then configure the group's level of access. This applies the same permissions to all group members. See https://docs.retool.com/org-users/concepts/permission-groups or more information."},"folder":{"type":"object","properties":{"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder. Currently this is the same as legacy_id but will be different in the future."},"legacy_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The legacy id of the folder."},"name":{"type":"string","description":"The name of the folder"},"parent_folder_id":{"type":"string","nullable":true,"pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the parent folder"},"is_system_folder":{"type":"boolean","description":"Whether the folder is a system folder"},"folder_type":{"type":"string","enum":["app","workflow","resource"],"description":"The type of the folder"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","is_system_folder","folder_type","created_at","updated_at"],"description":"This object represents app, resource and workflows folders."},"space":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the space."},"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","format":"date-time","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","domain","created_at","updated_at"],"additionalProperties":false,"description":"This object represents a space. Spaces can be used to separate your organization's data."},"source_control_configuration":{"anyOf":[{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["App"]},"app_id":{"type":"string","description":"The GitHub App ID."},"installation_id":{"type":"string","description":"The GitHub installation ID. This can be found at the end of the installation URL."},"private_key":{"type":"string","description":"The base64-encoded private key."},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","app_id","installation_id","private_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Personal"]},"personal_access_token":{"type":"string","description":"The GitHub project access token to authenticate to the GitHub API.\t"},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","personal_access_token"],"additionalProperties":false}]},"provider":{"type":"string","enum":["GitHub"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitHub"},{"type":"object","properties":{"config":{"type":"object","properties":{"project_id":{"type":"number","description":"The numerical project ID for your GitLab project. Find this ID listed below the project's name on the project's homepage."},"url":{"type":"string","description":"Your base GitLab URL. On GitLab Cloud, this is always https://gitlab.com. On GitLab self-managed, this is the URL where your instance is hosted."},"project_access_token":{"type":"string","description":"The GitLab project access token to authenticate to the GitLab API."}},"required":["project_id","url","project_access_token"],"additionalProperties":false},"provider":{"type":"string","enum":["GitLab"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitLab"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"The domain used to access your self-hosted AWS CodeCommit instance."},"region":{"type":"string","description":"The region of the CodeCommit repository."},"access_key_id":{"type":"string","description":"The Access key ID from your AWSCodeCommitFullAccess policy."},"secret_access_key":{"type":"string","description":"The Secret Access Key from your AWSCodeCommitFullAccess policy"},"https_username":{"type":"string","description":"The HTTPS username from your security credentials."},"https_password":{"type":"string","description":"The HTTPS password from your security credentials."}},"required":["url","region","access_key_id","secret_access_key","https_username","https_password"],"additionalProperties":false},"provider":{"type":"string","enum":["AWS CodeCommit"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"AWS CodeCommit"},{"type":"object","properties":{"config":{"type":"object","properties":{"username":{"type":"string","description":"Your Bitbucket username."},"url":{"type":"string","description":"The domain used to access your self-hosted Bitbucket instance. Defaults to https://bitbucket.org/."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted Bitbucket instance. Defaults to https://api.bitbucket.org/2.0.\t"},"app_password":{"type":"string","description":"Your Bitbucket app password."}},"required":["username","app_password"],"additionalProperties":false},"provider":{"type":"string","enum":["Bitbucket"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Bitbucket"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"Your base Azure URL. For Azure Cloud, this is always http://dev.azure.com. For Azure self-managed, this is the URL where your instance is hosted."},"project":{"type":"string","description":"Your new or existing Azure DevOps project."},"user":{"type":"string","description":"The Azure Repos username."},"personal_access_token":{"type":"string","description":"The Azure project access tokens to authenticate to the Azure API."},"use_basic_auth":{"type":"boolean","description":"Set this to true if you are using self-hosted Azure Repos."}},"required":["url","project","user","personal_access_token","use_basic_auth"],"additionalProperties":false},"provider":{"type":"string","enum":["Azure Repos"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Azure Repos"}],"description":"This object represents the Source Control provider configuration for the organization or space. See [docs](https://docs.retool.com/source-control) for more information."},"source_control_settings":{"type":"object","properties":{"auto_branch_naming_enabled":{"type":"boolean","description":"When enabled, Retool automatically suggests a branch name on branch creation. Defaults to true."},"custom_pull_request_template_enabled":{"type":"boolean","description":"When enabled, Retool will use the template specified to create pull requests. Defaults to false."},"custom_pull_request_template":{"type":"string","description":"Pull requests created from Retool will use the template specified."},"version_control_locked":{"type":"boolean","description":"When set to true, creates a read-only instance of Retool, where app editing is disabled. Defaults to false."}},"required":["auto_branch_naming_enabled","custom_pull_request_template_enabled","custom_pull_request_template","version_control_locked"]},"app_theme":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"name":{"type":"string","description":"The name of the app theme."},"theme":{"type":"object","additionalProperties":{"nullable":true},"description":"The theme object."}},"required":["id","legacy_id","name","theme"],"description":"This object represents an app theme. App themes allow you to customize the look of your app. See https://docs.retool.com/apps/web/concepts/themes for more information."},"app":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The app ID."},"name":{"type":"string","description":"The name of the App"},"description":{"type":"string","nullable":true,"description":"The description of the App"},"folder_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"protected":{"type":"boolean","description":"Whether the App is protected"},"synced":{"type":"boolean","description":"Whether the App is synced"},"shortlink":{"type":"string","nullable":true,"description":"The shortlink of the App"},"is_module":{"type":"boolean","description":"Whether the App is a module"},"is_mobile_app":{"type":"boolean","description":"Whether the App is a mobile app"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","description","folder_id","protected","synced","shortlink","is_module","is_mobile_app","created_at","updated_at"],"description":"This object represents an app."},"sso_configuration":{"oneOf":[{"type":"object","properties":{"config_type":{"type":"string","enum":["google"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login"],"additionalProperties":false,"title":"Google"},{"type":"object","properties":{"config_type":{"type":"string","enum":["oidc"]},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & oidc"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["saml"]},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"SAML"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & saml"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & SAML"}],"description":"This object represents the SSO configuration for an organization or space. See [docs](https://docs.retool.com/sso) for more information."},"user_attributes":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the user attribute"},"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9\\_]+$","description":"The name of the user attribute"},"label":{"type":"string","description":"The label of the user attribute"},"data_type":{"type":"string","enum":["string","number","json"],"description":"The data type of the user attribute. One of types `string`, `number`, or `json`"},"default_value":{"type":"string","nullable":true,"description":"The default value of the user attribute, assigned to all users without the attribute set"},"intercom_attribute_name":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"pattern":"^[a-z0-9\\_]+$","description":"The name of the Intercom user attribute that this attribute should be mapped to"}},"required":["id","name","label","data_type","default_value","intercom_attribute_name"],"description":"This object represents user attributes."},"access_request":{"type":"object","properties":{"id":{"type":"number"},"status":{"type":"string","enum":["PENDING","APPROVED","DENIED"]},"legacy_id":{"type":"number"},"requesting_email":{"type":"string"},"updated_by_id":{"type":"string","nullable":true}},"required":["id","status","legacy_id","requesting_email","updated_by_id"],"description":"Access Request"},"user_invite":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"resource":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"},"resourceConfiguration":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The uuid for the resource configuration."},"resource":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"},"environment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"Environment"},"options":{"anyOf":[{"type":"object","properties":{"database_options":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false},{"type":"object","properties":{"connection_string":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"additionalProperties":false}]}},"required":["database_options"],"additionalProperties":false,"title":"Postgres Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."},"use_dynamic_database_names":{"type":"boolean","description":"Enable this to allow the Database Name to be overridden by a dynamically generated value. This allows using Retool with a database that has been sharded into several different databases."},"use_dynamic_database_hosts":{"type":"boolean","description":"Enable this to allow the Database Host to be overridden by a dynamically generated value. This allows using Retool with several different databases."},"convert_mysql_dates_to_javascript":{"type":"boolean","default":true,"description":"This allows you to turn your MySQL date strings into Javascript Date objects."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"MySQL Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"Redshift Options"},{"type":"object","properties":{"account_identifier":{"type":"string"},"database_options":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"},"warehouse":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["name"],"additionalProperties":false},"user_role":{"type":"string"},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["authentication_type","username","password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake_jwt"]},"username":{"type":"string"},"private_key":{"type":"string"},"private_key_passphrase":{"type":"string"}},"required":["authentication_type","username","private_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret"],"additionalProperties":false}]}},"required":["account_identifier","database_options","authentication_options"],"additionalProperties":false,"title":"Snowflake Options"},{"type":"object","properties":{"base_url":{"type":"string","description":"Use the absolute URL (e.g https://example.com)."},"url_parameters":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"headers":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"extra_body_values":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Extra body values are not passed for GET or HEAD requests."},"cookies_to_forward":{"type":"array","items":{"type":"string"},"description":"You can use the pattern COOKIE_your_cookie_name in the Headers section in order to implement the double-cookie submit pattern."},"forward_all_cookies":{"type":"boolean","description":"This is useful if you have dynamic cookie names."},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["auth0"]},"auth0_domain":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_client_secret":{"type":"string"},"auth0_custom_audience":{"type":"string"}},"required":["authentication_type","auth0_domain","auth0_client_id","auth0_client_secret","auth0_custom_audience"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["aws4"]},"amazon_aws_region":{"type":"string"},"amazon_service_name":{"type":"string"},"amazon_access_key_id":{"type":"string"},"amazon_secret_access_key":{"type":"string"},"auth_with_default_credential_provider_chain":{"type":"boolean"},"enable_awsv4_authentication_via_headers":{"type":"boolean"}},"required":["authentication_type","amazon_aws_region","amazon_service_name","amazon_access_key_id","amazon_secret_access_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["basic"]},"basic_username":{"type":"string"},"basic_password":{"type":"string"}},"required":["authentication_type","basic_username"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["digest"]},"digest_username":{"type":"string"},"digest_password":{"type":"string"}},"required":["authentication_type","digest_username","digest_password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth1"]},"oauth1_signature_method":{"anyOf":[{"type":"string","enum":["HMAC-SHA1"]},{"type":"string","enum":["HMAC-SHA256"]},{"type":"string","enum":["PLAINTEXT"]}]},"oauth1_consumer_key":{"type":"string"},"oauth1_consumer_secret":{"type":"string"},"oauth1_token_key":{"type":"string"},"oauth1_token_secret":{"type":"string"},"oauth1_realm_parameter":{"type":"string"}},"required":["authentication_type","oauth1_signature_method","oauth1_consumer_key","oauth1_consumer_secret","oauth1_token_key","oauth1_token_secret","oauth1_realm_parameter"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"},"oauth2_auth_url":{"type":"string"},"oauth2_access_token_url":{"type":"string"},"oauth2_scope":{"type":"string"},"oauth2_audience":{"type":"string"},"oauth2_share_user_credentials":{"type":"boolean"},"verify_session_url":{"type":"string"},"oauth2_access_token":{"type":"string"},"oauth2_refresh_token":{"type":"string"},"oauth2_id_token":{"type":"string"},"oauth2_access_token_lifespan_seconds":{"type":"number","nullable":true}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret","oauth2_auth_url","oauth2_access_token_url"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["none"]}},"required":["authentication_type"],"additionalProperties":false}],"description":"Note that custom auth is not yet supported."}},"required":["base_url"],"additionalProperties":false,"title":"Rest API Options"}]},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","resource","environment","options","created_at","updated_at"],"additionalProperties":false,"description":"Resource Configuration"},"environment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"Environment"},"customComponentLibrary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"How the library will be referred to in Toolscript, and other code based usages."},"description":{"type":"string","nullable":true},"label":{"type":"string","description":"How the library will be referred to in the Retool UI. Should be human readable."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","label","created_at","updated_at"],"description":"Custom Component Library"},"customComponentLibraryRevision":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string"},"custom_component_library_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","version","custom_component_library_id","created_at","updated_at"],"description":"Custom Component Library Revision"},"customComponentLibraryRevisionFile":{"type":"object","properties":{"filepath":{"type":"string"},"file_contents":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["filepath","file_contents","created_at","updated_at"],"description":"Custom Component Library Revision"},"configuration_variable":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"name":{"type":"string","description":"The name of the configuration variable"},"description":{"type":"string","description":"The description of the configuration variable"},"secret":{"type":"boolean","description":"Whether the configuration variable is a secret"},"values":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment"},"value":{"type":"string","description":"The value of the configuration variable"}},"required":["environment_id","value"]}}},"required":["id","name","secret","values"]},"observability_configuration":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the configuration."},"config":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["Sentry"],"description":"This is an enumerated field that can only take the value \"Sentry\". It identifies the provider of the observability configuration."},"dsn":{"type":"string","description":"This is a string field that represents the Data Source Name (DSN). It is the unique identifier that helps Sentry know where to send errors and exceptions."}},"required":["provider","dsn"]},{"type":"object","properties":{"provider":{"type":"string","enum":["Datadog"],"description":"This is an enumerated field that can only take the value \"Datadog\". It identifies the provider of the observability configuration."},"api_key":{"type":"string","description":"This is a string field that represents the API key for Datadog. This key is used to authenticate with the Datadog API."}},"required":["provider","api_key"]}],"description":"Provider-specific configuration. For Datadog, provide an API key. For Sentry, provide a DSN."},"enabled":{"type":"boolean","description":"When enabled, use this provider for apps observability monitoring."}},"required":["id","config","enabled"],"additionalProperties":false,"description":"Shape of external Observability provider config"},"organization":{"type":"object","properties":{"org_id":{"type":"string","description":"The id of the organization"},"host":{"type":"string","description":"The host of the organization"},"last_active":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"}},"required":["org_id","host","last_active"],"additionalProperties":false,"description":"An organization in Retool"},"usage":{"type":"object","properties":{"count_current_page_saves":{"type":"number","description":"The number of page saves for all the organizations within the date range"},"count_current_page_views":{"type":"number","description":"The number of page views for all the organizations within the date range"},"count_current_users":{"type":"number","description":"The total number of unique users who have performed any tracked activity in all the organizations within the date range"},"count_T30_users":{"type":"number","description":"The number of unique users who have been active over the trailing 30 days from the end date provided"},"percent_growth_page_saves":{"type":"number","description":"The percentage growth in page saves compared to the previous cycle of the same length as the provided date range"},"percent_growth_page_views":{"type":"number","description":"The percentage growth in page views compared to the previous cycle of the same length as the provided date range"},"percent_growth_users":{"type":"number","description":"The percentage growth in unique users compared to the previous cycle of the same length as the provided date range"},"percent_growth_T30_users":{"type":"number","description":"The percentage growth in T30 users (trailing 30 days users) compared to the previous cycle of the same length as the provided date range"},"daily_T30_usage":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"maa":{"type":"number","description":"The number of distinct applications that were active on the given day"},"mau":{"type":"number","description":"The number of distinct users who were active on the given day"}},"required":["day","maa","mau"]}}},"required":["count_current_page_saves","count_current_page_views","count_current_users","count_T30_users","percent_growth_page_saves","percent_growth_page_views","percent_growth_users","percent_growth_T30_users","daily_T30_usage"],"additionalProperties":false},"appSummary":{"type":"object","properties":{"app_name":{"type":"string","description":"The name of the app"},"host":{"type":"string","description":"The organization host"},"count_app_views":{"type":"number","description":"The number of views of the app in the time range specified"},"count_app_saves":{"type":"number","description":"The number of saves of the app in the time range specified"},"count_viewers":{"type":"number","description":"The number of viewers of the app in the time range specified"},"count_editors":{"type":"number","description":"The number of editors of the app in the time range specified"}},"required":["app_name","host","count_app_views","count_app_saves","count_viewers","count_editors"],"additionalProperties":false}},"parameters":{},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/users/{userId}":{"get":{"summary":"Get user","description":"Returns the user. The API token must have the \"Users > Read\" scope.","tags":["Users"],"parameters":[{"schema":{"type":"string","pattern":"user_([a-z0-9]+)"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"The requested user.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The id of the user"},"legacy_id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The legacy id of the user"},"email":{"type":"string","format":"email","description":"The email of the user"},"active":{"type":"boolean","description":"Whether the user is active or not"},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"last_active":{"type":"string","nullable":true,"format":"date-time","example":"2019-02-08T11:45:48.899Z"},"first_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The first name of the user"},"last_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The last name of the user"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"is_admin":{"type":"boolean","description":"Whether the user is an admin or not"},"user_type":{"type":"string","enum":["default","mobile","embed"],"description":"The user type"}},"required":["id","legacy_id","email","active","created_at","last_active","first_name","last_name","metadata","is_admin","user_type"],"additionalProperties":false,"description":"This object represents a user."}},"required":["success","data"],"description":"A single user"}}}}}},"delete":{"summary":"Delete a user","description":"Deletes a user. The API token must have the \"Users > Write\" scope.","tags":["Users"],"parameters":[{"schema":{"type":"string","pattern":"user_([a-z0-9]+)"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Successfully deleted user."}}},"patch":{"summary":"Update a user","description":"Updates and returns the updated user. The API token must have the \"Users > Write\" scope.","tags":["Users"],"parameters":[{"schema":{"type":"string","pattern":"user_([a-z0-9]+)"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Add Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"path":{"type":"string"}},"required":["op","path"],"title":"Remove Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Replace Operation"}]},"description":"A list of operations to apply to the user. See the [JSON PATCH specification](https://tools.ietf.org/html/rfc6902) for more details."}},"required":["operations"],"additionalProperties":false,"description":"The body of a request to update a user."}}}},"responses":{"200":{"description":"Returns the updated user.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The id of the user"},"legacy_id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The legacy id of the user"},"email":{"type":"string","format":"email","description":"The email of the user"},"active":{"type":"boolean","description":"Whether the user is active or not"},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"last_active":{"type":"string","nullable":true,"format":"date-time","example":"2019-02-08T11:45:48.899Z"},"first_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The first name of the user"},"last_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The last name of the user"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"is_admin":{"type":"boolean","description":"Whether the user is an admin or not"},"user_type":{"type":"string","enum":["default","mobile","embed"],"description":"The user type"}},"required":["id","legacy_id","email","active","created_at","last_active","first_name","last_name","metadata","is_admin","user_type"],"additionalProperties":false,"description":"This object represents a user."}},"required":["success","data"],"description":"A single user"}}}}}}},"/users":{"get":{"summary":"List users","description":"Returns a list of users. The API token must have the \"Users > Read\" scope.","tags":["Users"],"responses":{"200":{"description":"List of users.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The id of the user"},"legacy_id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The legacy id of the user"},"email":{"type":"string","format":"email","description":"The email of the user"},"active":{"type":"boolean","description":"Whether the user is active or not"},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"last_active":{"type":"string","nullable":true,"format":"date-time","example":"2019-02-08T11:45:48.899Z"},"first_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The first name of the user"},"last_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The last name of the user"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"is_admin":{"type":"boolean","description":"Whether the user is an admin or not"},"user_type":{"type":"string","enum":["default","mobile","embed"],"description":"The user type"}},"required":["id","legacy_id","email","active","created_at","last_active","first_name","last_name","metadata","is_admin","user_type"],"additionalProperties":false,"description":"This object represents a user."},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A paginated list of users."}}}}}},"post":{"summary":"Create user","description":"Creates a user and returns the created user. The API token must have the \"Users > Write\" scope.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email of the user"},"first_name":{"type":"string","minLength":1,"description":"The first name of the user"},"last_name":{"type":"string","minLength":1,"description":"The last name of the user"},"active":{"type":"boolean","default":true,"description":"Whether the user is enabled or not"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"user_type":{"type":"string","enum":["default","mobile","embed"],"description":"The user type"}},"required":["email","first_name","last_name"],"additionalProperties":false,"description":"Body of request to create a user"}}}},"responses":{"200":{"description":"The created user.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The id of the user"},"legacy_id":{"type":"string","pattern":"user_([a-z0-9]+)","description":"The legacy id of the user"},"email":{"type":"string","format":"email","description":"The email of the user"},"active":{"type":"boolean","description":"Whether the user is active or not"},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"last_active":{"type":"string","nullable":true,"format":"date-time","example":"2019-02-08T11:45:48.899Z"},"first_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The first name of the user"},"last_name":{"type":"string","nullable":true,"minLength":1,"maxLength":36,"description":"The last name of the user"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"is_admin":{"type":"boolean","description":"Whether the user is an admin or not"},"user_type":{"type":"string","enum":["default","mobile","embed"],"description":"The user type"}},"required":["id","legacy_id","email","active","created_at","last_active","first_name","last_name","metadata","is_admin","user_type"],"additionalProperties":false,"description":"The created user"}},"required":["success","data"]}}}}}}},"/users/{userId}/user_attributes":{"post":{"summary":"Add or update a user attribute","description":"Available from API version 2.1.0+ and onprem version 3.20.1+. Adds or updates a user attribute, and returns the updated user metadata. The API token must have the \"Users > Write\" scope.","tags":["Users","User Attributes"],"parameters":[{"schema":{"type":"string","pattern":"user_([a-z0-9]+)"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user attribute (must match an existing attribute exactly)"},"value":{"type":"string","nullable":true,"description":"The value of the user attribute"}},"required":["name","value"],"additionalProperties":false,"description":"The body of a request to add a user attribute to a user or update an existing user attribute."}}}},"responses":{"200":{"description":"Returns the updated user metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{},"description":"The updated user metadata, containing the new attribute value"}},"required":["metadata"]}},"required":["success","data"]}}}}}}},"/users/{userId}/user_attributes/{attributeName}":{"delete":{"summary":"Delete a user attribute.","description":"Available from API version 2.1.0+ and onprem version 3.20.1+. Deletes a user attribute, and returns the updated user metadata. The API token must have the \"Users > Write\" scope.","tags":["Users","User Attributes"],"parameters":[{"schema":{"type":"string","pattern":"user_([a-z0-9]+)"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","description":"The name of the user attribute to delete"},"required":true,"name":"attributeName","in":"path"}],"responses":{"200":{"description":"Returns the updated user metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{},"description":"The updated user metadata, without the deleted attribute"}},"required":["metadata"]}},"required":["success","data"]}}}}}}},"/groups/{groupId}":{"delete":{"summary":"Delete group","description":"Deletes a group with the given groupId. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"}],"responses":{"204":{"description":"Group deleted"}}},"get":{"summary":"Get group","description":"Get a group with a given groupId. The API token must have the \"Groups > Read\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"The requested group","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"The requested group"}},"required":["success","data"]}}}}}},"patch":{"summary":"Update group","description":"Update a group in an organization using JSON Patch (RFC 6902). Returns the updated group. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Add Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"path":{"type":"string"}},"required":["op","path"],"title":"Remove Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Replace Operation"}]},"description":"A list of operations to apply to the group. See the [JSON PATCH specification](https://tools.ietf.org/html/rfc6902) for more details."}},"required":["operations"],"additionalProperties":false,"description":"The body of a request to update a group. "}}}},"responses":{"200":{"description":"The updated group.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"The updated group"}},"required":["success","data"]}}}}}},"put":{"summary":"Update group","description":"Update the entire group and returns the updated group. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","is_group_admin"]},"description":"Users to add to the group. Pass in an empty list to create a group with no members."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}}}}}},"responses":{"200":{"description":"The updated group","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"The updated group"}},"required":["success","data"]}}}}}}},"/groups":{"get":{"summary":"List groups","description":"Get all permission groups for an organization or space. The API token must have the \"Groups > Read\" scope.","tags":["Groups"],"responses":{"200":{"description":"List of groups","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"This object represents a permission group. A permission group is a list of users by which to restrict access. You add users to one or more groups and then configure the group's level of access. This applies the same permissions to all group members. See https://docs.retool.com/org-users/concepts/permission-groups or more information."},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A dictionary with a `data` property that contains an array of groups"}}}}}},"post":{"summary":"Create group","description":"Creates a group and returns the created group. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","is_group_admin"]},"description":"Users to add to the group. Pass in an empty list to create a group with no members."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["name"]}}}},"responses":{"200":{"description":"The created group.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"The created group"}},"required":["success","data"]}}}}}}},"/groups/{groupId}/user_invites":{"post":{"summary":"Add user invites to group","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Adds a user invite to specified group and returns the group. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userInviteIds":{"type":"array","items":{"type":"number"}}},"required":["userInviteIds"],"description":"User Invites to add to the group"}}}},"responses":{"200":{"description":"The updated group","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"The updated group"}},"required":["success","data"]}}}}}}},"/groups/{groupId}/members":{"post":{"summary":"Add users to group","description":"Adds a user to specified group and returns the group. Can optionally set or unset group admins by using the `is_group_admin` property. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","is_group_admin"]},"description":"Users to add to the group. Pass in an empty list to create a group with no members."}},"required":["members"]}}}},"responses":{"200":{"description":"The updated group","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"The updated group"}},"required":["success","data"]}}}}}}},"/groups/{groupId}/members/{userSid}":{"delete":{"summary":"Remove user from group","description":"Removes the user from the group and returns the group. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","pattern":"user_([a-z0-9]+)"},"required":true,"name":"userSid","in":"path"}],"responses":{"200":{"description":"The updated group","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"The ID of the group. Currently this is the same legacy_id but will change in the future."},"legacy_id":{"type":"number","nullable":true,"description":"The legacy ID of the group."},"name":{"type":"string","description":"The name of the group."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"user_([a-z0-9]+)"},"email":{"type":"string","format":"email","description":"The email of the user"},"is_group_admin":{"type":"boolean","default":false,"description":"Whether the user is a group admin"}},"required":["id","email","is_group_admin"]},"description":"The members of the group."},"universal_app_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal app access level for the group. This denotes the access level that this group has for all apps."},"universal_resource_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal resource access level for the group. This denotes the access level that this group has for all resources."},"universal_workflow_access":{"type":"string","enum":["none","use","edit","own"],"description":"The universal workflow access level for the group. This denotes the access level that this group has for all workflows."},"universal_query_library_access":{"type":"string","enum":["none","use","edit"],"description":"Level of access that the group has to the Query Library."},"user_invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"A list of user invites that will be added to the group"},"user_list_access":{"type":"boolean","description":"Whether the group has access to the user list"},"audit_log_access":{"type":"boolean","description":"Whether the group has access to the audit log"},"unpublished_release_access":{"type":"boolean","description":"Whether the group has access to unpublished releases"},"usage_analytics_access":{"type":"boolean","description":"Whether the group has access to usage analytics"},"account_details_access":{"type":"boolean","description":"Whether the group has access to account details"},"landing_page_app_id":{"type":"string","nullable":true,"format":"uuid","description":"The app ID of the landing page"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","members","universal_app_access","universal_resource_access","universal_workflow_access","universal_query_library_access","user_invites","user_list_access","audit_log_access","unpublished_release_access","usage_analytics_access","account_details_access","landing_page_app_id","created_at","updated_at"],"description":"The updated group"}},"required":["success","data"]}}}}}}},"/groups/{groupId}/user_invites/{userInviteId}":{"delete":{"summary":"Remove user invite from group","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Removes the user invite from the group. The API token must have the \"Groups > Write\" scope.","tags":["Groups"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The group's ID number"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","pattern":"^\\d+$","description":"The user invite's ID number"},"required":true,"name":"userInviteId","in":"path"}],"responses":{"204":{"description":"Successfully deleted user invite from group.","content":{}}}}},"/folders":{"get":{"summary":"List folders","description":"Returns a list of folders. The API token must have the \"Folders > Read\" scope.","tags":["Folders"],"responses":{"200":{"description":"Paginated list of folders","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder. Currently this is the same as legacy_id but will be different in the future."},"legacy_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The legacy id of the folder."},"name":{"type":"string","description":"The name of the folder"},"parent_folder_id":{"type":"string","nullable":true,"pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the parent folder"},"is_system_folder":{"type":"boolean","description":"Whether the folder is a system folder"},"folder_type":{"type":"string","enum":["app","workflow","resource"],"description":"The type of the folder"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","is_system_folder","folder_type","created_at","updated_at"],"description":"Folders"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}},"post":{"summary":"Create folder","description":"Creates and returns a folder. The API token must have the \"Folders > Write\" scope.","tags":["Folders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the folder."},"parent_folder_id":{"type":"string","nullable":true,"pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The ID of the parent folder."},"folder_type":{"type":"string","enum":["app","workflow","resource"],"description":"The type of the folder."}},"required":["name","folder_type"]}}}},"responses":{"200":{"description":"Returns the created folder.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder. Currently this is the same as legacy_id but will be different in the future."},"legacy_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The legacy id of the folder."},"name":{"type":"string","description":"The name of the folder"},"parent_folder_id":{"type":"string","nullable":true,"pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the parent folder"},"is_system_folder":{"type":"boolean","description":"Whether the folder is a system folder"},"folder_type":{"type":"string","enum":["app","workflow","resource"],"description":"The type of the folder"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","is_system_folder","folder_type","created_at","updated_at"],"description":"The created folder."}},"required":["success","data"]}}}},"409":{"description":"Folder with the same name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"Error with folder structure.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/folders/{folderId}":{"get":{"summary":"Get a folder","description":"Returns the folder with the given ID. The API token must have the \"Folders > Read\" scope.","tags":["Folders"],"parameters":[{"schema":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"required":true,"name":"folderId","in":"path"}],"responses":{"200":{"description":"The requested folder.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder. Currently this is the same as legacy_id but will be different in the future."},"legacy_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The legacy id of the folder."},"name":{"type":"string","description":"The name of the folder"},"parent_folder_id":{"type":"string","nullable":true,"pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the parent folder"},"is_system_folder":{"type":"boolean","description":"Whether the folder is a system folder"},"folder_type":{"type":"string","enum":["app","workflow","resource"],"description":"The type of the folder"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","is_system_folder","folder_type","created_at","updated_at"],"description":"The requested folder."}},"required":["success","data"]}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"delete":{"summary":"Delete folder","description":"Deletes a folder by ID. The API token must have the \"Folders > Write\" scope.","tags":["Folders"],"parameters":[{"schema":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"required":true,"name":"folderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recursive":{"type":"boolean","description":"Should the folder's contents also be deleted?"}}}}}},"responses":{"204":{"description":"Folder deleted"},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"patch":{"summary":"Update folder","description":"Updates a folder by ID. The API token must have the \"Folders > Write\" scope.","tags":["Folders"],"parameters":[{"schema":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"required":true,"name":"folderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Add Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"path":{"type":"string"}},"required":["op","path"],"title":"Remove Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Replace Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["move"]},"path":{"type":"string"},"from":{"type":"string"}},"required":["op","path","from"],"title":"Move Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["copy"]},"path":{"type":"string"},"from":{"type":"string"}},"required":["op","path","from"],"title":"Copy Operation"},{"type":"object","properties":{"op":{"type":"string","enum":["test"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Test Operation"}]},"description":"A list of operations to apply to the folder. See https://tools.ietf.org/html/rfc6902 for details."}},"required":["operations"],"additionalProperties":false}}}},"responses":{"200":{"description":"The updated folder.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder. Currently this is the same as legacy_id but will be different in the future."},"legacy_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The legacy id of the folder."},"name":{"type":"string","description":"The name of the folder"},"parent_folder_id":{"type":"string","nullable":true,"pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the parent folder"},"is_system_folder":{"type":"boolean","description":"Whether the folder is a system folder"},"folder_type":{"type":"string","enum":["app","workflow","resource"],"description":"The type of the folder"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","legacy_id","name","is_system_folder","folder_type","created_at","updated_at"],"description":"The updated folder."}},"required":["success","data"]}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"409":{"description":"Folder with the same name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"Error with folder structure.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/spaces":{"post":{"summary":"Create a space","description":"Available for orgs with Spaces enabled. Creates a new child space and returns it. The API token must have the \"Spaces > Write\" scope.","tags":["Spaces"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1,"description":"The domain of the space. On Retool Cloud, specify subdomain of the space instead."},"options":{"type":"object","properties":{"copy_sso_settings":{"type":"boolean","description":"Copy SSO settings from the admin space."},"copy_branding_and_themes_settings":{"type":"boolean","description":"Copy Branding and Themes settings from the admin space."},"users_to_copy_as_admins":{"type":"array","items":{"type":"string"},"description":"List of emails of users from the admin space that need to be added to the new space as admins."},"create_admin_user":{"type":"boolean","description":"Create an admin user in the new space for the creator instead of just sending out an invite."}}}},"required":["name","domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"Created space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the space."},"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","format":"date-time","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","domain","created_at","updated_at"],"additionalProperties":false,"description":"The created space"}},"required":["success","data"]}}}}}},"get":{"summary":"List spaces","description":"Available for orgs with Spaces enabled. List all child spaces of the current space. The API token must have the \"Spaces > Read\" scope.","tags":["Spaces"],"responses":{"200":{"description":"List of subspaces.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the space."},"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","format":"date-time","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","domain","created_at","updated_at"],"additionalProperties":false,"description":"List of spaces"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}}},"/spaces/{spaceId}":{"get":{"summary":"Get space","description":"Available for orgs with Spaces enabled. Get space by ID. The API token must have the \"Spaces > Read\" scope.","tags":["Spaces"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"spaceId","in":"path"}],"responses":{"200":{"description":"The requested space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the space."},"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","format":"date-time","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","domain","created_at","updated_at"],"additionalProperties":false,"description":"The requested space"}},"required":["success","data"]}}}},"404":{"description":"Space not found.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"put":{"summary":"Update space","description":"Available for orgs with Spaces enabled. Update space by ID. The API token must have the \"Spaces > Write\" scope.","tags":["Spaces"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"spaceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the space."},"domain":{"type":"string","minLength":1,"description":"The domain of the space. On Retool Cloud, specify subdomain of the space instead."}},"required":["name","domain"]}}}},"responses":{"200":{"description":"Updated space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the space."},"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1},"created_at":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","format":"date-time","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","domain","created_at","updated_at"],"additionalProperties":false,"description":"Updated space"}},"required":["success","data"]}}}},"404":{"description":"Space not found.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"Invalid space domain.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"delete":{"summary":"Delete a space","description":"Available for orgs with Spaces enabled. Delete a space by ID. The API token must have the \"Spaces > Write\" scope.","tags":["Spaces"],"parameters":[{"schema":{"type":"string","description":"The id of the space to delete."},"required":true,"name":"spaceId","in":"path"}],"responses":{"204":{"description":"Space successful delete message."},"404":{"description":"Space not found.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/spaces/copyElements":{"post":{"summary":"Copies apps, queries, resources, and workflows from one space to another","description":"Available for orgs with Spaces enabled. Copy elements by ID. The API token must have the \"Spaces > Write\" scope.","tags":["Spaces"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resource_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"}],"description":"The uuid for the resource."},"description":"List of resource uuids to copy to the new space."},"query_library_query_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"The Query Library Query ID."},"description":"List of query library query uuids to copy to the new space."},"app_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"The app ID."},"description":"List of app or module uuids to copy to the new space."},"workflow_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"The Workflow ID."},"description":"List of workflow ids to copy to the new space."},"destination_space_id":{"type":"string","description":"The id of the space to copy the elements to."}},"required":["resource_ids","query_library_query_ids","app_ids","workflow_ids","destination_space_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"Copied elements.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"resource_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"}],"description":"The uuid for the resource."},"description":"The uuids of the copied resources."},"query_library_query_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"The Query Library Query ID."},"description":"The uuids of the copied query library queries."},"app_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"The app ID."},"description":"The uuids of the copied app or modules."},"workflow_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"The Workflow ID."},"description":"The uuids of the copied workflows."}},"required":["resource_ids","query_library_query_ids","app_ids","workflow_ids"],"description":"The copied elements"}},"required":["success","data"],"description":"Elements copied successfully"}}}},"404":{"description":"Error message.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/source_control/config":{"get":{"summary":"Get source control configuration","description":"Returns the source control provider configuration for the organization or space. The API token must have the \"Source Control > Read\" scope.","tags":["Source Control"],"responses":{"200":{"description":"Source control provider configuration for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"anyOf":[{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["App"]},"app_id":{"type":"string","description":"The GitHub App ID."},"installation_id":{"type":"string","description":"The GitHub installation ID. This can be found at the end of the installation URL."},"private_key":{"type":"string","description":"The base64-encoded private key."},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","app_id","installation_id","private_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Personal"]},"personal_access_token":{"type":"string","description":"The GitHub project access token to authenticate to the GitHub API.\t"},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","personal_access_token"],"additionalProperties":false}]},"provider":{"type":"string","enum":["GitHub"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitHub"},{"type":"object","properties":{"config":{"type":"object","properties":{"project_id":{"type":"number","description":"The numerical project ID for your GitLab project. Find this ID listed below the project's name on the project's homepage."},"url":{"type":"string","description":"Your base GitLab URL. On GitLab Cloud, this is always https://gitlab.com. On GitLab self-managed, this is the URL where your instance is hosted."},"project_access_token":{"type":"string","description":"The GitLab project access token to authenticate to the GitLab API."}},"required":["project_id","url","project_access_token"],"additionalProperties":false},"provider":{"type":"string","enum":["GitLab"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitLab"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"The domain used to access your self-hosted AWS CodeCommit instance."},"region":{"type":"string","description":"The region of the CodeCommit repository."},"access_key_id":{"type":"string","description":"The Access key ID from your AWSCodeCommitFullAccess policy."},"secret_access_key":{"type":"string","description":"The Secret Access Key from your AWSCodeCommitFullAccess policy"},"https_username":{"type":"string","description":"The HTTPS username from your security credentials."},"https_password":{"type":"string","description":"The HTTPS password from your security credentials."}},"required":["url","region","access_key_id","secret_access_key","https_username","https_password"],"additionalProperties":false},"provider":{"type":"string","enum":["AWS CodeCommit"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"AWS CodeCommit"},{"type":"object","properties":{"config":{"type":"object","properties":{"username":{"type":"string","description":"Your Bitbucket username."},"url":{"type":"string","description":"The domain used to access your self-hosted Bitbucket instance. Defaults to https://bitbucket.org/."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted Bitbucket instance. Defaults to https://api.bitbucket.org/2.0.\t"},"app_password":{"type":"string","description":"Your Bitbucket app password."}},"required":["username","app_password"],"additionalProperties":false},"provider":{"type":"string","enum":["Bitbucket"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Bitbucket"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"Your base Azure URL. For Azure Cloud, this is always http://dev.azure.com. For Azure self-managed, this is the URL where your instance is hosted."},"project":{"type":"string","description":"Your new or existing Azure DevOps project."},"user":{"type":"string","description":"The Azure Repos username."},"personal_access_token":{"type":"string","description":"The Azure project access tokens to authenticate to the Azure API."},"use_basic_auth":{"type":"boolean","description":"Set this to true if you are using self-hosted Azure Repos."}},"required":["url","project","user","personal_access_token","use_basic_auth"],"additionalProperties":false},"provider":{"type":"string","enum":["Azure Repos"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Azure Repos"}],"description":"Source Control Provider Config"}},"required":["success","data"],"additionalProperties":false}}}}}},"post":{"summary":"Create source control configuration","description":"Create source control provider configuration for the organization or space and returns the created configuration. This will result in an error if configuration already is already set. The API token must have the \"Source Control > Write\" scope.","tags":["Source Control"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["App"]},"app_id":{"type":"string","description":"The GitHub App ID."},"installation_id":{"type":"string","description":"The GitHub installation ID. This can be found at the end of the installation URL."},"private_key":{"type":"string","description":"The base64-encoded private key."},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","app_id","installation_id","private_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Personal"]},"personal_access_token":{"type":"string","description":"The GitHub project access token to authenticate to the GitHub API.\t"},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","personal_access_token"],"additionalProperties":false}]},"provider":{"type":"string","enum":["GitHub"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitHub"},{"type":"object","properties":{"config":{"type":"object","properties":{"project_id":{"type":"number","description":"The numerical project ID for your GitLab project. Find this ID listed below the project's name on the project's homepage."},"url":{"type":"string","description":"Your base GitLab URL. On GitLab Cloud, this is always https://gitlab.com. On GitLab self-managed, this is the URL where your instance is hosted."},"project_access_token":{"type":"string","description":"The GitLab project access token to authenticate to the GitLab API."}},"required":["project_id","url","project_access_token"],"additionalProperties":false},"provider":{"type":"string","enum":["GitLab"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitLab"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"The domain used to access your self-hosted AWS CodeCommit instance."},"region":{"type":"string","description":"The region of the CodeCommit repository."},"access_key_id":{"type":"string","description":"The Access key ID from your AWSCodeCommitFullAccess policy."},"secret_access_key":{"type":"string","description":"The Secret Access Key from your AWSCodeCommitFullAccess policy"},"https_username":{"type":"string","description":"The HTTPS username from your security credentials."},"https_password":{"type":"string","description":"The HTTPS password from your security credentials."}},"required":["url","region","access_key_id","secret_access_key","https_username","https_password"],"additionalProperties":false},"provider":{"type":"string","enum":["AWS CodeCommit"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"AWS CodeCommit"},{"type":"object","properties":{"config":{"type":"object","properties":{"username":{"type":"string","description":"Your Bitbucket username."},"url":{"type":"string","description":"The domain used to access your self-hosted Bitbucket instance. Defaults to https://bitbucket.org/."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted Bitbucket instance. Defaults to https://api.bitbucket.org/2.0.\t"},"app_password":{"type":"string","description":"Your Bitbucket app password."}},"required":["username","app_password"],"additionalProperties":false},"provider":{"type":"string","enum":["Bitbucket"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Bitbucket"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"Your base Azure URL. For Azure Cloud, this is always http://dev.azure.com. For Azure self-managed, this is the URL where your instance is hosted."},"project":{"type":"string","description":"Your new or existing Azure DevOps project."},"user":{"type":"string","description":"The Azure Repos username."},"personal_access_token":{"type":"string","description":"The Azure project access tokens to authenticate to the Azure API."},"use_basic_auth":{"type":"boolean","description":"Set this to true if you are using self-hosted Azure Repos."}},"required":["url","project","user","personal_access_token","use_basic_auth"],"additionalProperties":false},"provider":{"type":"string","enum":["Azure Repos"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Azure Repos"}],"description":"This object represents the Source Control provider configuration for the organization or space. See [docs](https://docs.retool.com/source-control) for more information."}},"required":["config"],"additionalProperties":false,"description":"Shape of Source Control provider config request"}}}},"responses":{"200":{"description":"Created source control provider configuration for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"anyOf":[{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["App"]},"app_id":{"type":"string","description":"The GitHub App ID."},"installation_id":{"type":"string","description":"The GitHub installation ID. This can be found at the end of the installation URL."},"private_key":{"type":"string","description":"The base64-encoded private key."},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","app_id","installation_id","private_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Personal"]},"personal_access_token":{"type":"string","description":"The GitHub project access token to authenticate to the GitHub API.\t"},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","personal_access_token"],"additionalProperties":false}]},"provider":{"type":"string","enum":["GitHub"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitHub"},{"type":"object","properties":{"config":{"type":"object","properties":{"project_id":{"type":"number","description":"The numerical project ID for your GitLab project. Find this ID listed below the project's name on the project's homepage."},"url":{"type":"string","description":"Your base GitLab URL. On GitLab Cloud, this is always https://gitlab.com. On GitLab self-managed, this is the URL where your instance is hosted."},"project_access_token":{"type":"string","description":"The GitLab project access token to authenticate to the GitLab API."}},"required":["project_id","url","project_access_token"],"additionalProperties":false},"provider":{"type":"string","enum":["GitLab"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitLab"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"The domain used to access your self-hosted AWS CodeCommit instance."},"region":{"type":"string","description":"The region of the CodeCommit repository."},"access_key_id":{"type":"string","description":"The Access key ID from your AWSCodeCommitFullAccess policy."},"secret_access_key":{"type":"string","description":"The Secret Access Key from your AWSCodeCommitFullAccess policy"},"https_username":{"type":"string","description":"The HTTPS username from your security credentials."},"https_password":{"type":"string","description":"The HTTPS password from your security credentials."}},"required":["url","region","access_key_id","secret_access_key","https_username","https_password"],"additionalProperties":false},"provider":{"type":"string","enum":["AWS CodeCommit"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"AWS CodeCommit"},{"type":"object","properties":{"config":{"type":"object","properties":{"username":{"type":"string","description":"Your Bitbucket username."},"url":{"type":"string","description":"The domain used to access your self-hosted Bitbucket instance. Defaults to https://bitbucket.org/."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted Bitbucket instance. Defaults to https://api.bitbucket.org/2.0.\t"},"app_password":{"type":"string","description":"Your Bitbucket app password."}},"required":["username","app_password"],"additionalProperties":false},"provider":{"type":"string","enum":["Bitbucket"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Bitbucket"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"Your base Azure URL. For Azure Cloud, this is always http://dev.azure.com. For Azure self-managed, this is the URL where your instance is hosted."},"project":{"type":"string","description":"Your new or existing Azure DevOps project."},"user":{"type":"string","description":"The Azure Repos username."},"personal_access_token":{"type":"string","description":"The Azure project access tokens to authenticate to the Azure API."},"use_basic_auth":{"type":"boolean","description":"Set this to true if you are using self-hosted Azure Repos."}},"required":["url","project","user","personal_access_token","use_basic_auth"],"additionalProperties":false},"provider":{"type":"string","enum":["Azure Repos"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Azure Repos"}],"description":"Created Source Control Provider Config"}},"required":["success","data"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"409":{"description":"Configuration already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"put":{"summary":"Set source control configuration","description":"Creates or updates the source control provider configuration for the organization or space. This will overwrite any existing configuration. The API token must have the \"Source Control > Write\" scope.","tags":["Source Control"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["App"]},"app_id":{"type":"string","description":"The GitHub App ID."},"installation_id":{"type":"string","description":"The GitHub installation ID. This can be found at the end of the installation URL."},"private_key":{"type":"string","description":"The base64-encoded private key."},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","app_id","installation_id","private_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Personal"]},"personal_access_token":{"type":"string","description":"The GitHub project access token to authenticate to the GitHub API.\t"},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","personal_access_token"],"additionalProperties":false}]},"provider":{"type":"string","enum":["GitHub"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitHub"},{"type":"object","properties":{"config":{"type":"object","properties":{"project_id":{"type":"number","description":"The numerical project ID for your GitLab project. Find this ID listed below the project's name on the project's homepage."},"url":{"type":"string","description":"Your base GitLab URL. On GitLab Cloud, this is always https://gitlab.com. On GitLab self-managed, this is the URL where your instance is hosted."},"project_access_token":{"type":"string","description":"The GitLab project access token to authenticate to the GitLab API."}},"required":["project_id","url","project_access_token"],"additionalProperties":false},"provider":{"type":"string","enum":["GitLab"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitLab"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"The domain used to access your self-hosted AWS CodeCommit instance."},"region":{"type":"string","description":"The region of the CodeCommit repository."},"access_key_id":{"type":"string","description":"The Access key ID from your AWSCodeCommitFullAccess policy."},"secret_access_key":{"type":"string","description":"The Secret Access Key from your AWSCodeCommitFullAccess policy"},"https_username":{"type":"string","description":"The HTTPS username from your security credentials."},"https_password":{"type":"string","description":"The HTTPS password from your security credentials."}},"required":["url","region","access_key_id","secret_access_key","https_username","https_password"],"additionalProperties":false},"provider":{"type":"string","enum":["AWS CodeCommit"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"AWS CodeCommit"},{"type":"object","properties":{"config":{"type":"object","properties":{"username":{"type":"string","description":"Your Bitbucket username."},"url":{"type":"string","description":"The domain used to access your self-hosted Bitbucket instance. Defaults to https://bitbucket.org/."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted Bitbucket instance. Defaults to https://api.bitbucket.org/2.0.\t"},"app_password":{"type":"string","description":"Your Bitbucket app password."}},"required":["username","app_password"],"additionalProperties":false},"provider":{"type":"string","enum":["Bitbucket"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Bitbucket"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"Your base Azure URL. For Azure Cloud, this is always http://dev.azure.com. For Azure self-managed, this is the URL where your instance is hosted."},"project":{"type":"string","description":"Your new or existing Azure DevOps project."},"user":{"type":"string","description":"The Azure Repos username."},"personal_access_token":{"type":"string","description":"The Azure project access tokens to authenticate to the Azure API."},"use_basic_auth":{"type":"boolean","description":"Set this to true if you are using self-hosted Azure Repos."}},"required":["url","project","user","personal_access_token","use_basic_auth"],"additionalProperties":false},"provider":{"type":"string","enum":["Azure Repos"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Azure Repos"}],"description":"This object represents the Source Control provider configuration for the organization or space. See [docs](https://docs.retool.com/source-control) for more information."}},"required":["config"],"additionalProperties":false,"description":"Shape of Source Control provider config request"}}}},"responses":{"200":{"description":"Updated source control configuration for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"anyOf":[{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["App"]},"app_id":{"type":"string","description":"The GitHub App ID."},"installation_id":{"type":"string","description":"The GitHub installation ID. This can be found at the end of the installation URL."},"private_key":{"type":"string","description":"The base64-encoded private key."},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","app_id","installation_id","private_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Personal"]},"personal_access_token":{"type":"string","description":"The GitHub project access token to authenticate to the GitHub API.\t"},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","personal_access_token"],"additionalProperties":false}]},"provider":{"type":"string","enum":["GitHub"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitHub"},{"type":"object","properties":{"config":{"type":"object","properties":{"project_id":{"type":"number","description":"The numerical project ID for your GitLab project. Find this ID listed below the project's name on the project's homepage."},"url":{"type":"string","description":"Your base GitLab URL. On GitLab Cloud, this is always https://gitlab.com. On GitLab self-managed, this is the URL where your instance is hosted."},"project_access_token":{"type":"string","description":"The GitLab project access token to authenticate to the GitLab API."}},"required":["project_id","url","project_access_token"],"additionalProperties":false},"provider":{"type":"string","enum":["GitLab"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitLab"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"The domain used to access your self-hosted AWS CodeCommit instance."},"region":{"type":"string","description":"The region of the CodeCommit repository."},"access_key_id":{"type":"string","description":"The Access key ID from your AWSCodeCommitFullAccess policy."},"secret_access_key":{"type":"string","description":"The Secret Access Key from your AWSCodeCommitFullAccess policy"},"https_username":{"type":"string","description":"The HTTPS username from your security credentials."},"https_password":{"type":"string","description":"The HTTPS password from your security credentials."}},"required":["url","region","access_key_id","secret_access_key","https_username","https_password"],"additionalProperties":false},"provider":{"type":"string","enum":["AWS CodeCommit"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"AWS CodeCommit"},{"type":"object","properties":{"config":{"type":"object","properties":{"username":{"type":"string","description":"Your Bitbucket username."},"url":{"type":"string","description":"The domain used to access your self-hosted Bitbucket instance. Defaults to https://bitbucket.org/."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted Bitbucket instance. Defaults to https://api.bitbucket.org/2.0.\t"},"app_password":{"type":"string","description":"Your Bitbucket app password."}},"required":["username","app_password"],"additionalProperties":false},"provider":{"type":"string","enum":["Bitbucket"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Bitbucket"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"Your base Azure URL. For Azure Cloud, this is always http://dev.azure.com. For Azure self-managed, this is the URL where your instance is hosted."},"project":{"type":"string","description":"Your new or existing Azure DevOps project."},"user":{"type":"string","description":"The Azure Repos username."},"personal_access_token":{"type":"string","description":"The Azure project access tokens to authenticate to the Azure API."},"use_basic_auth":{"type":"boolean","description":"Set this to true if you are using self-hosted Azure Repos."}},"required":["url","project","user","personal_access_token","use_basic_auth"],"additionalProperties":false},"provider":{"type":"string","enum":["Azure Repos"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Azure Repos"}],"description":"Created or updated Source Control Provider Config"}},"required":["success","data"]}}}},"201":{"description":"Created source control configuration for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"anyOf":[{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["App"]},"app_id":{"type":"string","description":"The GitHub App ID."},"installation_id":{"type":"string","description":"The GitHub installation ID. This can be found at the end of the installation URL."},"private_key":{"type":"string","description":"The base64-encoded private key."},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","app_id","installation_id","private_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Personal"]},"personal_access_token":{"type":"string","description":"The GitHub project access token to authenticate to the GitHub API.\t"},"url":{"type":"string","description":"The domain used to access your self-hosted GitHub instance."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted GitHub instance. Defaults to https://[hostname]/api/v3."}},"required":["type","personal_access_token"],"additionalProperties":false}]},"provider":{"type":"string","enum":["GitHub"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitHub"},{"type":"object","properties":{"config":{"type":"object","properties":{"project_id":{"type":"number","description":"The numerical project ID for your GitLab project. Find this ID listed below the project's name on the project's homepage."},"url":{"type":"string","description":"Your base GitLab URL. On GitLab Cloud, this is always https://gitlab.com. On GitLab self-managed, this is the URL where your instance is hosted."},"project_access_token":{"type":"string","description":"The GitLab project access token to authenticate to the GitLab API."}},"required":["project_id","url","project_access_token"],"additionalProperties":false},"provider":{"type":"string","enum":["GitLab"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"GitLab"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"The domain used to access your self-hosted AWS CodeCommit instance."},"region":{"type":"string","description":"The region of the CodeCommit repository."},"access_key_id":{"type":"string","description":"The Access key ID from your AWSCodeCommitFullAccess policy."},"secret_access_key":{"type":"string","description":"The Secret Access Key from your AWSCodeCommitFullAccess policy"},"https_username":{"type":"string","description":"The HTTPS username from your security credentials."},"https_password":{"type":"string","description":"The HTTPS password from your security credentials."}},"required":["url","region","access_key_id","secret_access_key","https_username","https_password"],"additionalProperties":false},"provider":{"type":"string","enum":["AWS CodeCommit"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"AWS CodeCommit"},{"type":"object","properties":{"config":{"type":"object","properties":{"username":{"type":"string","description":"Your Bitbucket username."},"url":{"type":"string","description":"The domain used to access your self-hosted Bitbucket instance. Defaults to https://bitbucket.org/."},"enterprise_api_url":{"type":"string","description":"The REST API route for your self-hosted Bitbucket instance. Defaults to https://api.bitbucket.org/2.0.\t"},"app_password":{"type":"string","description":"Your Bitbucket app password."}},"required":["username","app_password"],"additionalProperties":false},"provider":{"type":"string","enum":["Bitbucket"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Bitbucket"},{"type":"object","properties":{"config":{"type":"object","properties":{"url":{"type":"string","description":"Your base Azure URL. For Azure Cloud, this is always http://dev.azure.com. For Azure self-managed, this is the URL where your instance is hosted."},"project":{"type":"string","description":"Your new or existing Azure DevOps project."},"user":{"type":"string","description":"The Azure Repos username."},"personal_access_token":{"type":"string","description":"The Azure project access tokens to authenticate to the Azure API."},"use_basic_auth":{"type":"boolean","description":"Set this to true if you are using self-hosted Azure Repos."}},"required":["url","project","user","personal_access_token","use_basic_auth"],"additionalProperties":false},"provider":{"type":"string","enum":["Azure Repos"]},"org":{"type":"string","description":"The user or organization to which the repository belongs to."},"repo":{"type":"string","description":"The name of the repository you created to use with Retool."},"default_branch":{"type":"string","description":"The default branch, e.g., main."},"repo_version":{"type":"string","description":"Repositories using Toolscript are 2.0.0. Repositories using legacy YAML are 1.0.0."}},"required":["config","provider","org","repo","default_branch"],"title":"Azure Repos"}],"description":"Created or updated Source Control Provider Config"}},"required":["success","data"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"delete":{"summary":"Delete source control provider configuration","description":"Deletes source control provider configuration for organization or space. The API token must have the \"Source Control > Write\" scope.","tags":["Source Control"],"responses":{"204":{"description":"Successful deletion"},"404":{"description":"Error message","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/source_control/test_connection":{"get":{"summary":"Tests source control connection","description":"Tests the connection to the source control provider. Returns a boolean for whether the connection was successful or not. The API token must have the \"Source Control > Read\" scope.","tags":["Source Control"],"responses":{"200":{"description":"Success message.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"Test connection failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"]},{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Test connection succeeded"}},"required":["success"]}],"description":"Test connection response"}},"required":["success","data"]}}}},"422":{"description":"Error message.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/source_control/test_deploy":{"post":{"summary":"Test source control changes","description":"Attempts to do a dry deployment (no db changes) on the instance with provided commit sha to see if those changes are valid.","tags":["Source Control"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deploy_params":{"type":"object","properties":{"commit_sha":{"type":"string","description":"The commit SHA to dry deploy"},"is_full_sync":{"type":"boolean"}},"required":["commit_sha"]}},"required":["deploy_params"],"additionalProperties":false,"description":"Parameters for running a deployment"}}}},"responses":{"200":{"description":"Returns success or failure with the deployment logs.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"Deployment failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"]},{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Deployment succeeded"}},"required":["success"]}],"description":"Source control test deploy response"}},"required":["success","data"]}}}}}}},"/source_control/deploy":{"post":{"summary":"Trigger deployment of latest changes","description":"Deploys the latest changes from the source control provider to the instance. You can use the GET /deployment/{id} endpoint to check the status of the deployment.","tags":["Source Control"],"responses":{"200":{"description":"The deployment id of the triggered deployment.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The deployment ID"},"status":{"type":"string","enum":["PENDING_START","RUNNING","SUCCESS","ERROR"]}},"required":["id","status"],"description":"Source control deploy response"}},"required":["success","data"]}}}}}}},"/source_control/deployment/{id}":{"get":{"summary":"Get deployment by id","description":"Get the status of a deployment","tags":["Source Control"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The deployment ID"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deployment status","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The deployment ID"},"status":{"type":"string","enum":["PENDING_START","RUNNING","SUCCESS","ERROR"]}},"required":["id","status"],"description":"Source control deploy response"}},"required":["success","data"]}}}},"404":{"description":"Deployment not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/source_control/settings":{"get":{"summary":"Get source control settings","description":"Returns the source control settings for the organization or space. The API token must have the \"Source Control > Read\" scope.","tags":["Source Control"],"responses":{"200":{"description":"Source control settings for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"auto_branch_naming_enabled":{"type":"boolean","description":"When enabled, Retool automatically suggests a branch name on branch creation. Defaults to true."},"custom_pull_request_template_enabled":{"type":"boolean","description":"When enabled, Retool will use the template specified to create pull requests. Defaults to false."},"custom_pull_request_template":{"type":"string","description":"Pull requests created from Retool will use the template specified."},"version_control_locked":{"type":"boolean","description":"When set to true, creates a read-only instance of Retool, where app editing is disabled. Defaults to false."}},"required":["auto_branch_naming_enabled","custom_pull_request_template_enabled","custom_pull_request_template","version_control_locked"],"description":"Source Control Settings"}},"required":["success","data"]}}}}}},"put":{"summary":"Set source control settings","description":"Creates or updates source control settings for the organization or space. This will overwrite existing settings. The API token must have the \"Source Control > Write\" scope.","tags":["Source Control"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"auto_branch_naming_enabled":{"type":"boolean","description":"When enabled, Retool automatically suggests a branch name on branch creation. Defaults to true."},"custom_pull_request_template_enabled":{"type":"boolean","description":"When enabled, Retool will use the template specified to create pull requests. Defaults to false."},"custom_pull_request_template":{"type":"string","description":"Pull requests created from Retool will use the template specified."},"version_control_locked":{"type":"boolean","description":"When set to true, creates a read-only instance of Retool, where app editing is disabled. Defaults to false."}},"additionalProperties":false}},"required":["settings"],"additionalProperties":false,"description":"Shape of Source Control Settings"}}}},"responses":{"200":{"description":"Updated source control settings for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"auto_branch_naming_enabled":{"type":"boolean","description":"When enabled, Retool automatically suggests a branch name on branch creation. Defaults to true."},"custom_pull_request_template_enabled":{"type":"boolean","description":"When enabled, Retool will use the template specified to create pull requests. Defaults to false."},"custom_pull_request_template":{"type":"string","description":"Pull requests created from Retool will use the template specified."},"version_control_locked":{"type":"boolean","description":"When set to true, creates a read-only instance of Retool, where app editing is disabled. Defaults to false."}},"required":["auto_branch_naming_enabled","custom_pull_request_template_enabled","custom_pull_request_template","version_control_locked"],"description":"Result of creating Source Control Settings"}},"required":["success","data"]}}}},"201":{"description":"Created source control settings for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"auto_branch_naming_enabled":{"type":"boolean","description":"When enabled, Retool automatically suggests a branch name on branch creation. Defaults to true."},"custom_pull_request_template_enabled":{"type":"boolean","description":"When enabled, Retool will use the template specified to create pull requests. Defaults to false."},"custom_pull_request_template":{"type":"string","description":"Pull requests created from Retool will use the template specified."},"version_control_locked":{"type":"boolean","description":"When set to true, creates a read-only instance of Retool, where app editing is disabled. Defaults to false."}},"required":["auto_branch_naming_enabled","custom_pull_request_template_enabled","custom_pull_request_template","version_control_locked"],"description":"Result of creating Source Control Settings"}},"required":["success","data"]}}}},"400":{"description":"Error message.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/app_themes/{id}":{"get":{"summary":"Get app theme","description":"Returns the app theme matching the ID for the organization or space. The API token must have the \"App Themes > Read\" scope.","tags":["App Themes"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"App theme for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"name":{"type":"string","description":"The name of the app theme."},"theme":{"type":"object","additionalProperties":{"nullable":true},"description":"The theme object."}},"required":["id","legacy_id","name","theme"],"description":"The app theme."}},"required":["success","data"]}}}},"404":{"description":"App theme does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"delete":{"summary":"Delete app theme","description":"Deletes specified app theme for organization or space. The API token must have the \"App Themes > Write\" scope.","tags":["App Themes"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Successful deletion."},"404":{"description":"The app theme was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/app_themes":{"post":{"summary":"Create app theme","description":"Creates and returns a new app theme. If a theme with the same name already exists, it returns 409 and does not modify the theme. The API token must have the \"App Themes > Write\" scope.","tags":["App Themes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"name":{"type":"string","description":"The name of the app theme."},"theme":{"type":"object","additionalProperties":{"nullable":true},"description":"The theme object."}},"required":["id","legacy_id","name","theme"],"description":"This object represents an app theme. App themes allow you to customize the look of your app. See https://docs.retool.com/apps/web/concepts/themes for more information."}}}},"responses":{"200":{"description":"Creates an app theme and returns it.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"name":{"type":"string","description":"The name of the app theme."},"theme":{"type":"object","additionalProperties":{"nullable":true},"description":"The theme object."}},"required":["id","legacy_id","name","theme"],"description":"The updated app theme."}},"required":["success","data"]}}}},"409":{"description":"Error when there is a naming conflict.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"put":{"summary":"Update app theme","description":"Creates or updates an app theme and returns it. The API token must have the \"App Themes > Write\" scope.","tags":["App Themes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"name":{"type":"string","description":"The name of the app theme."},"theme":{"type":"object","additionalProperties":{"nullable":true},"description":"The theme object."}},"required":["id","legacy_id","name","theme"],"description":"This object represents an app theme. App themes allow you to customize the look of your app. See https://docs.retool.com/apps/web/concepts/themes for more information."}}}},"responses":{"200":{"description":"The updated app theme for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"name":{"type":"string","description":"The name of the app theme."},"theme":{"type":"object","additionalProperties":{"nullable":true},"description":"The theme object."}},"required":["id","legacy_id","name","theme"],"description":"The updated app theme."}},"required":["success","data"]}}}},"201":{"description":"The created app theme for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"name":{"type":"string","description":"The name of the app theme."},"theme":{"type":"object","additionalProperties":{"nullable":true},"description":"The theme object."}},"required":["id","legacy_id","name","theme"],"description":"The updated app theme."}},"required":["success","data"]}}}},"409":{"description":"Naming conflict exists","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/apps/{appId}":{"delete":{"summary":"Delete app","description":"Deletes an app with the given appId. The API token must have the \"Apps > Write\" scope.","tags":["Apps"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The app ID."},"required":true,"name":"appId","in":"path"}],"responses":{"204":{"description":"App deleted"}}},"get":{"summary":"Get app","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Returns the App. The API token must have the \"Apps > Read\" scope.","tags":["Apps"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The app ID."},"required":true,"name":"appId","in":"path"}],"responses":{"200":{"description":"The requested app.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The app ID."},"name":{"type":"string","description":"The name of the App"},"description":{"type":"string","nullable":true,"description":"The description of the App"},"folder_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"protected":{"type":"boolean","description":"Whether the App is protected"},"synced":{"type":"boolean","description":"Whether the App is synced"},"shortlink":{"type":"string","nullable":true,"description":"The shortlink of the App"},"is_module":{"type":"boolean","description":"Whether the App is a module"},"is_mobile_app":{"type":"boolean","description":"Whether the App is a mobile app"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","description","folder_id","protected","synced","shortlink","is_module","is_mobile_app","created_at","updated_at"],"description":"This object represents an app."}},"required":["success","data"],"description":"A single app"}}}}}}},"/apps":{"get":{"summary":"List apps","description":"Get all apps for an organization or space. The API token must have the \"Apps > Read\" scope. ","tags":["Apps"],"responses":{"200":{"description":"List of apps","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The app ID."},"name":{"type":"string","description":"The name of the App"},"description":{"type":"string","nullable":true,"description":"The description of the App"},"folder_id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"protected":{"type":"boolean","description":"Whether the App is protected"},"synced":{"type":"boolean","description":"Whether the App is synced"},"shortlink":{"type":"string","nullable":true,"description":"The shortlink of the App"},"is_module":{"type":"boolean","description":"Whether the App is a module"},"is_mobile_app":{"type":"boolean","description":"Whether the App is a mobile app"},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","name","description","folder_id","protected","synced","shortlink","is_module","is_mobile_app","created_at","updated_at"],"description":"This object represents an app."},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A dictionary with a `data` property that contains an array of groups"}}}}}}},"/sso/config":{"post":{"summary":"Set SSO configuration","description":"Sets SSO configuration for organization or space. The API token must have the \"Spaces > Write\" scope.","tags":["SSO"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"config_type":{"type":"string","enum":["google"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login"],"additionalProperties":false,"title":"Google"},{"type":"object","properties":{"config_type":{"type":"string","enum":["oidc"]},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & oidc"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["saml"]},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"SAML"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & saml"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & SAML"}],"description":"This object represents the SSO configuration for an organization or space. See [docs](https://docs.retool.com/sso) for more information."}},"required":["data"],"additionalProperties":false,"description":"Shape of SSO config"}}}},"responses":{"200":{"description":"SSO configuration for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"oneOf":[{"type":"object","properties":{"config_type":{"type":"string","enum":["google"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login"],"additionalProperties":false,"title":"Google"},{"type":"object","properties":{"config_type":{"type":"string","enum":["oidc"]},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & oidc"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["saml"]},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"SAML"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & saml"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & SAML"}],"description":"Result of setting SSO configuration"}},"required":["success","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"delete":{"summary":"Remove SSO configuration","description":"Removes SSO configuration for organization or space. The API token must have the \"Spaces > Write\" scope. Note that this will not remove the SSO configuration if it is configured via env variables.","tags":["SSO"],"responses":{"204":{"description":"SSO configuration for the organization or space has been successfully removed."}}},"get":{"summary":"Get SSO configuration","description":"Reads SSO configuration of organization or space. The API token must have the \"Spaces > Read\" scope. Note that this will not return the SSO configuration if it is configured via env variables.","tags":["SSO"],"responses":{"200":{"description":"SSO configuration for the organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"oneOf":[{"type":"object","properties":{"config_type":{"type":"string","enum":["google"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login"],"additionalProperties":false,"title":"Google"},{"type":"object","properties":{"config_type":{"type":"string","enum":["oidc"]},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & oidc"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"oidc_client_id":{"type":"string","minLength":1},"oidc_client_secret":{"type":"string","minLength":1},"oidc_scopes":{"type":"string","minLength":1},"oidc_auth_url":{"type":"string","minLength":1},"oidc_token_url":{"type":"string","minLength":1},"oidc_userinfo_url":{"type":"string","minLength":1},"oidc_audience":{"type":"string"},"jwt_email_key":{"type":"string","minLength":1},"jwt_roles_key":{"type":"string","minLength":1},"jwt_first_name_key":{"type":"string","minLength":1},"jwt_last_name_key":{"type":"string","minLength":1},"roles_mapping":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","oidc_client_id","oidc_client_secret","oidc_scopes","oidc_auth_url","oidc_token_url","jwt_email_key","jwt_first_name_key","jwt_last_name_key","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & OIDC"},{"type":"object","properties":{"config_type":{"type":"string","enum":["saml"]},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"},"disable_email_password_login":{"type":"boolean"}},"required":["config_type","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically","disable_email_password_login"],"additionalProperties":false,"title":"SAML"},{"type":"object","properties":{"config_type":{"type":"string","enum":["google & saml"]},"google_client_id":{"type":"string"},"google_client_secret":{"type":"string"},"disable_email_password_login":{"type":"boolean"},"idp_metadata_xml":{"type":"string","minLength":1},"saml_first_name_attribute":{"type":"string","minLength":1},"saml_last_name_attribute":{"type":"string","minLength":1},"saml_groups_attribute":{"type":"string"},"saml_sync_group_claims":{"type":"boolean"},"ldap_sync_group_claims":{"type":"boolean"},"ldap_role_mapping":{"type":"string"},"ldap_server_url":{"type":"string"},"ldap_base_domain_components":{"type":"string"},"ldap_server_name":{"type":"string"},"ldap_server_key":{"type":"string"},"ldap_server_certificate":{"type":"string"},"jit_enabled":{"type":"boolean"},"restricted_domain":{"type":"string"},"trigger_login_automatically":{"type":"boolean"}},"required":["config_type","google_client_id","google_client_secret","disable_email_password_login","idp_metadata_xml","saml_first_name_attribute","saml_last_name_attribute","saml_sync_group_claims","jit_enabled","trigger_login_automatically"],"additionalProperties":false,"title":"Google & SAML"}],"description":"SSO configuration"}},"required":["success","data"]}}}},"404":{"description":"SSO is not configured for this organization or space.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"The organization has unsupported type of SSO configurations.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/user_attributes":{"get":{"summary":"Get organization user attributes.","description":"Gets the list of currently configured user attributes for the organization. The API token must have the \"Users > Read\" scope.","tags":["User Attributes"],"responses":{"200":{"description":"List of currently configured user attributes.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the user attribute"},"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9\\_]+$","description":"The name of the user attribute"},"label":{"type":"string","description":"The label of the user attribute"},"data_type":{"type":"string","enum":["string","number","json"],"description":"The data type of the user attribute. One of types `string`, `number`, or `json`"},"default_value":{"type":"string","nullable":true,"description":"The default value of the user attribute, assigned to all users without the attribute set"},"intercom_attribute_name":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"pattern":"^[a-z0-9\\_]+$","description":"The name of the Intercom user attribute that this attribute should be mapped to"}},"required":["id","name","label","data_type","default_value","intercom_attribute_name"],"description":"This object represents user attributes."},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A list of user attributes."}}}}}}},"/permissions/listObjects":{"post":{"summary":"List objects a group can access","description":"Returns the list of objects with corresponding access levels that a subject (group) has access to. The API token must have the \"Permissions > Read\" scope. Folders are supported from API version 2.0.0 + and onprem version 3.18+, apps are supported from API version 2.4.0+ and onprem version 3.26.0+, resources and resource_configurations are supported from onprem edge version 3.37.0+ and 3.47-stable+","tags":["Permissions","Groups"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"id":{"type":"number","nullable":true,"description":"The ID number of the group"}},"required":["type","id"],"additionalProperties":false,"title":"Group"},{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","pattern":"user_([a-z0-9]+)"}},"required":["type","id"],"additionalProperties":false,"title":"User"}]},"object_type":{"type":"string","enum":["folder","app","resource","resource_configuration"]}},"required":["subject","object_type"],"additionalProperties":false}}}},"responses":{"200":{"description":"A list of folders with corresponding access levels.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["folder"]},"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the folder"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["app"]},"id":{"type":"string","format":"uuid","description":"The app ID."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the app"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the resource"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource_configuration"]},"id":{"type":"string","format":"uuid","description":"The resource configuration id."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the resource configuration. Note that the access level in practice of this resource configuration could be different dependent on what the access level of the resource with the same id as the \"name\" of this resource_configuration. "}},"required":["type","id","access_level"]}]},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}}},"/permissions/grant":{"post":{"summary":"Grant permissions","description":"Grant a group (subject) access to an object. Returns the updated list of objects with corresponding access levels that the subject has access to. The API token must have the \"Permissions > Write\" scope. Folders are supported from API version 2.0.0 + and onprem version 3.18+, apps are supported from API version 2.4.0+ and onprem version 3.34.0+, resources and resource_configurations are supported from onprem edge version 3.37.0+ and 3.47-stable+. Only subject type supported is groups. Also grants or updates access for all the objects within the folder. ","tags":["Permissions","Groups","Folders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"id":{"type":"number","nullable":true,"description":"The ID number of the group"}},"required":["type","id"],"additionalProperties":false,"title":"Group"},{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","pattern":"user_([a-z0-9]+)"}},"required":["type","id"],"additionalProperties":false,"title":"User"}]},"object":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["folder"]},"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"}},"required":["type","id"],"additionalProperties":false,"title":"Folder"},{"type":"object","properties":{"type":{"type":"string","enum":["app"]},"id":{"type":"string","format":"uuid","description":"The app ID."}},"required":["type","id"],"additionalProperties":false,"title":"App"},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."}},"required":["type","id"],"additionalProperties":false,"title":"Resource"},{"type":"object","properties":{"type":{"type":"string","enum":["resource_configuration"]},"id":{"type":"string","format":"uuid","description":"The resource configuration id."}},"required":["type","id"],"additionalProperties":false,"title":"Resource Configuration"}]},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level that the group should have for the object"}},"required":["subject","object","access_level"],"additionalProperties":false}}}},"responses":{"200":{"description":"A list of folders with corresponding access levels","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["folder"]},"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the folder"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["app"]},"id":{"type":"string","format":"uuid","description":"The app ID."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the app"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the resource"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource_configuration"]},"id":{"type":"string","format":"uuid","description":"The resource configuration id."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the resource configuration. Note that the access level in practice of this resource configuration could be different dependent on what the access level of the resource with the same id as the \"name\" of this resource_configuration. "}},"required":["type","id","access_level"]}]},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}}},"/permissions/revoke":{"post":{"summary":"Revoke permissions","description":"Revoke access to an object for a group. Returns the updated list of objects with corresponding access levels that the subject has access to. The API token must have the \"Permissions > Write\" scope. Folders are supported from API version 2.0.0 + and onprem version 3.18+, apps are supported from API version 2.4.0+ and onprem version 3.34.0+, resources and resource_configurations are supported from onprem edge version 3.37.0+ and 3.47-stable+. Only subject type supported is groups. Also revokes access to all the objects within the folder.","tags":["Permissions","Groups","Folders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"id":{"type":"number","nullable":true,"description":"The ID number of the group"}},"required":["type","id"],"additionalProperties":false,"title":"Group"},{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","pattern":"user_([a-z0-9]+)"}},"required":["type","id"],"additionalProperties":false,"title":"User"}]},"object":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["folder"]},"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"}},"required":["type","id"],"additionalProperties":false,"title":"Folder"},{"type":"object","properties":{"type":{"type":"string","enum":["app"]},"id":{"type":"string","format":"uuid","description":"The app ID."}},"required":["type","id"],"additionalProperties":false,"title":"App"},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."}},"required":["type","id"],"additionalProperties":false,"title":"Resource"},{"type":"object","properties":{"type":{"type":"string","enum":["resource_configuration"]},"id":{"type":"string","format":"uuid","description":"The resource configuration id."}},"required":["type","id"],"additionalProperties":false,"title":"Resource Configuration"}]}},"required":["subject","object"],"additionalProperties":false}}}},"responses":{"200":{"description":"A list of folders with corresponding access levels","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["folder"]},"id":{"type":"string","pattern":"^(app|workflow|resource)_([0-9]\\d*)$","description":"The id of the folder"},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the folder"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["app"]},"id":{"type":"string","format":"uuid","description":"The app ID."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the app"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the resource"}},"required":["type","id","access_level"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource_configuration"]},"id":{"type":"string","format":"uuid","description":"The resource configuration id."},"access_level":{"type":"string","enum":["own","edit","use"],"description":"The access level of the resource configuration. Note that the access level in practice of this resource configuration could be different dependent on what the access level of the resource with the same id as the \"name\" of this resource_configuration. "}},"required":["type","id","access_level"]}]},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}}},"/access_requests":{"get":{"summary":"Get organization access requests","description":"Available from API version 2.3.0+ and onprem version 3.24.0+. Gets a list of access requests. The API token must have the \"Users > Read\" scope.","tags":["Access Request"],"parameters":[{"schema":{"type":"string","enum":["PENDING","APPROVED","DENIED"],"description":"The status of the access request"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Returns all access requests.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"status":{"type":"string","enum":["PENDING","APPROVED","DENIED"]},"legacy_id":{"type":"number"},"requesting_email":{"type":"string"},"updated_by_id":{"type":"string","nullable":true}},"required":["id","status","legacy_id","requesting_email","updated_by_id"],"description":"Access Request"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A paginated list of access requests."}}}}}}},"/access_requests/{accessRequestId}":{"get":{"summary":"Get access request","description":"Available from API version 2.2.0+ and onprem version 3.24.0+. Returns the access request. The API token must have the \"Users > Read\" scope.","tags":["Access Request"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The access request's ID number"},"required":true,"name":"accessRequestId","in":"path"}],"responses":{"200":{"description":"The requested access request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"status":{"type":"string","enum":["PENDING","APPROVED","DENIED"]},"legacy_id":{"type":"number"},"requesting_email":{"type":"string"},"updated_by_id":{"type":"string","nullable":true}},"required":["id","status","legacy_id","requesting_email","updated_by_id"],"description":"Access Request"}},"required":["success","data"],"description":"A single access request."}}}}}},"patch":{"summary":"Approve or deny an access request","description":"Available from API version 2.3.0+ and onprem version 3.24.0+. Approve or deny an access request in your organization. The API token must have the \"Users > Write\" scope.","tags":["Access Request"],"parameters":[{"schema":{"type":"string","description":"The ID of the access request"},"required":true,"name":"accessRequestId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Replace Operation"},"description":"A list of operations to apply to the access request. See the [JSON PATCH specification](https://tools.ietf.org/html/rfc6902) for more details."}},"required":["operations"],"additionalProperties":false,"description":"The body of a request to update an access request's status."}}}},"responses":{"200":{"description":"Returns an approved or denied access request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"status":{"type":"string","enum":["PENDING","APPROVED","DENIED"]},"legacy_id":{"type":"number"},"requesting_email":{"type":"string"},"updated_by_id":{"type":"string","nullable":true}},"required":["id","status","legacy_id","requesting_email","updated_by_id"],"description":"Access Request"}},"required":["success","data"],"description":"An approved or denied access request object."}}}}}}},"/user_invites":{"get":{"summary":"Get organization user invites","description":"Available from API version 2.3.0+ and onprem version 3.24.0+. Gets a list of user invites","tags":["User Invite"],"responses":{"200":{"description":"Returns all user invites.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A list of user invites."}}}}}},"post":{"summary":"Create a new user invite","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Create a new user invite","tags":["User Invite"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email of the invitee"},"defaultGroupIds":{"type":"array","items":{"type":"number"},"description":"Group IDs to invite the user to"},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["email"],"additionalProperties":false,"description":"Body of request to create a user invite"}}}},"responses":{"200":{"description":"Returns the newly created user invite.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"The created user invite with an invite link"}},"required":["success","data"]}}}}}}},"/user_invites/{userInviteId}":{"get":{"summary":"Get user invite","description":"Available from API version 2.4.0+ and onprem version 3.26.0+. Returns the user invite. The API token must have the \"Users > Read\" scope.","tags":["User Invite"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The user invite's ID"},"required":true,"name":"userInviteId","in":"path"}],"responses":{"200":{"description":"The requested user invite.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"number"},"legacy_id":{"type":"number"},"invited_by":{"type":"string"},"invited_email":{"type":"string","format":"email"},"expires_at":{"type":"string"},"claimed_by":{"type":"string","nullable":true},"claimed_at":{"type":"string","nullable":true},"user_type":{"type":"string","nullable":true,"enum":["default","mobile","external"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"default":{}},"created_at":{"type":"string"},"invite_link":{"type":"string","format":"uri"}},"required":["id","legacy_id","invited_by","invited_email","expires_at","claimed_by","claimed_at","user_type","metadata","created_at"],"description":"User Invite"}},"required":["success","data"],"description":"A single user invite."}}}}}},"delete":{"summary":"Delete user invite","description":"Available from API version 2.4.0+ and onprem version 3.26.0+. Returns the deleted user invite. The API token must have the \"Users > Write\" scope.","tags":["User Invite"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The user invite's ID"},"required":true,"name":"userInviteId","in":"path"}],"responses":{"204":{"description":"Successfully deleted user invite.","content":{}}}}},"/user_invites/{userInviteId}/user_attributes":{"post":{"summary":"Add or update user attributes on a user invite","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Add or update the user attributes of a user invite","tags":["User Invite"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The user invite's ID"},"required":true,"name":"userInviteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user attribute (must match an existing attribute exactly)"},"value":{"type":"string","nullable":true,"description":"The value of the user attribute"}},"required":["name","value"],"description":"The body of a request to add a user attribute or update an existing user attribute on a user invite."}}}},"responses":{"200":{"description":"Returns the updated user attributes.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{},"description":"The updated user invite metadata, containing the new attribute value"}},"required":["metadata"]}},"required":["success","data"]}}}}}}},"/user_invites/{userInviteId}/user_attributes/{attributeName}":{"delete":{"summary":"Delete a user attribute on a user invite","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Delete a specified user attribute from an user invite","tags":["User Invite"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","description":"The user invite's ID"},"required":true,"name":"userInviteId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"attributeName","in":"path"}],"responses":{"200":{"description":"Returns the updated user attributes.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{},"description":"The updated user metadata"}},"required":["metadata"]}},"required":["success","data"]}}}}}}},"/resources":{"get":{"summary":"Get resources","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Gets a paginated list of resources. The API token must have the \"Resources > Read\" scope.","tags":["Resources"],"parameters":[{"schema":{"type":"string","description":"The token of the current page"},"required":false,"name":"next_token","in":"query"},{"schema":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"required":false,"name":"resource_type","in":"query"}],"responses":{"200":{"description":"Returns a paginated list of resources.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A paginated list of resources."}}}}}},"post":{"summary":"Create a resource","description":"Available from onprem version 3.72.0+. Creates a resource. The API token must have the \"Resources > Write\" scope.","tags":["Resources"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["mysql","postgresql","redshift","restapi","snowflake"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"options":{"anyOf":[{"type":"object","properties":{"database_options":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false},{"type":"object","properties":{"connection_string":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"additionalProperties":false}]}},"required":["database_options"],"additionalProperties":false,"title":"Postgres Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."},"use_dynamic_database_names":{"type":"boolean","description":"Enable this to allow the Database Name to be overridden by a dynamically generated value. This allows using Retool with a database that has been sharded into several different databases."},"use_dynamic_database_hosts":{"type":"boolean","description":"Enable this to allow the Database Host to be overridden by a dynamically generated value. This allows using Retool with several different databases."},"convert_mysql_dates_to_javascript":{"type":"boolean","default":true,"description":"This allows you to turn your MySQL date strings into Javascript Date objects."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"MySQL Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"Redshift Options"},{"type":"object","properties":{"account_identifier":{"type":"string"},"database_options":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"},"warehouse":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["name"],"additionalProperties":false},"user_role":{"type":"string"},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["authentication_type","username","password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake_jwt"]},"username":{"type":"string"},"private_key":{"type":"string"},"private_key_passphrase":{"type":"string"}},"required":["authentication_type","username","private_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret"],"additionalProperties":false}]}},"required":["account_identifier","database_options","authentication_options"],"additionalProperties":false,"title":"Snowflake Options"},{"type":"object","properties":{"base_url":{"type":"string","description":"Use the absolute URL (e.g https://example.com)."},"url_parameters":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"headers":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"extra_body_values":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Extra body values are not passed for GET or HEAD requests."},"cookies_to_forward":{"type":"array","items":{"type":"string"},"description":"You can use the pattern COOKIE_your_cookie_name in the Headers section in order to implement the double-cookie submit pattern."},"forward_all_cookies":{"type":"boolean","description":"This is useful if you have dynamic cookie names."},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["auth0"]},"auth0_domain":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_client_secret":{"type":"string"},"auth0_custom_audience":{"type":"string"}},"required":["authentication_type","auth0_domain","auth0_client_id","auth0_client_secret","auth0_custom_audience"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["aws4"]},"amazon_aws_region":{"type":"string"},"amazon_service_name":{"type":"string"},"amazon_access_key_id":{"type":"string"},"amazon_secret_access_key":{"type":"string"},"auth_with_default_credential_provider_chain":{"type":"boolean"},"enable_awsv4_authentication_via_headers":{"type":"boolean"}},"required":["authentication_type","amazon_aws_region","amazon_service_name","amazon_access_key_id","amazon_secret_access_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["basic"]},"basic_username":{"type":"string"},"basic_password":{"type":"string"}},"required":["authentication_type","basic_username"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["digest"]},"digest_username":{"type":"string"},"digest_password":{"type":"string"}},"required":["authentication_type","digest_username","digest_password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth1"]},"oauth1_signature_method":{"anyOf":[{"type":"string","enum":["HMAC-SHA1"]},{"type":"string","enum":["HMAC-SHA256"]},{"type":"string","enum":["PLAINTEXT"]}]},"oauth1_consumer_key":{"type":"string"},"oauth1_consumer_secret":{"type":"string"},"oauth1_token_key":{"type":"string"},"oauth1_token_secret":{"type":"string"},"oauth1_realm_parameter":{"type":"string"}},"required":["authentication_type","oauth1_signature_method","oauth1_consumer_key","oauth1_consumer_secret","oauth1_token_key","oauth1_token_secret","oauth1_realm_parameter"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"},"oauth2_auth_url":{"type":"string"},"oauth2_access_token_url":{"type":"string"},"oauth2_scope":{"type":"string"},"oauth2_audience":{"type":"string"},"oauth2_share_user_credentials":{"type":"boolean"},"verify_session_url":{"type":"string"},"oauth2_access_token":{"type":"string"},"oauth2_refresh_token":{"type":"string"},"oauth2_id_token":{"type":"string"},"oauth2_access_token_lifespan_seconds":{"type":"number","nullable":true}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret","oauth2_auth_url","oauth2_access_token_url"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["none"]}},"required":["authentication_type"],"additionalProperties":false}],"description":"Note that custom auth is not yet supported."}},"required":["base_url"],"additionalProperties":false,"title":"Rest API Options"}]}},"required":["type","display_name","options"]}}}},"responses":{"200":{"description":"The created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"The created resource."}},"required":["success","data"]}}}}}}},"/resources/{resourceId}":{"get":{"summary":"Get resource by id","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Returns a specific resource. The API token must have the \"Resources > Read\" scope.","tags":["Resources"],"parameters":[{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"}},"required":["success","data"],"description":"A single resource"}}}}}},"patch":{"summary":"Update a resource","description":"Updates and returns the updated resource. The API token must have the \"Resources > Write\" scope.","tags":["Resources"],"parameters":[{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Replace Operation"},"description":"A list of operations to apply to the resource. See the [JSON PATCH specification](https://tools.ietf.org/html/rfc6902) for more details."}},"required":["operations"],"additionalProperties":false,"description":"The body of a request to update a resource."}}}},"responses":{"200":{"description":"Returns the updated resource.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"The updated resource."}},"required":["success","data"]}}}}}},"delete":{"summary":"Delete resource","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Deletes a resource with the given id. The API token must have the \"Resources > Write\" scope.","tags":["Resources"],"parameters":[{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"required":true,"name":"resourceId","in":"path"}],"responses":{"204":{"description":"Resource deleted"}}}},"/resource_configurations":{"get":{"summary":"Get resource configurations","description":"Available from API version 2.4.0+ and onprem version 3.34.0+. Gets a paginated list of resource configurations. The API token must have the \"Resources > Read\" scope.","tags":["Resource configurations"],"parameters":[{"schema":{"type":"string","description":"The token of the current page"},"required":false,"name":"next_token","in":"query"},{"schema":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"required":false,"name":"resource_type","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"required":false,"name":"resource_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"environment_id","in":"query"}],"responses":{"200":{"description":"Returns a paginated list of resource configurations.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The uuid for the resource configuration."},"resource":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"},"environment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"Environment"},"options":{"anyOf":[{"type":"object","properties":{"database_options":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false},{"type":"object","properties":{"connection_string":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"additionalProperties":false}]}},"required":["database_options"],"additionalProperties":false,"title":"Postgres Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."},"use_dynamic_database_names":{"type":"boolean","description":"Enable this to allow the Database Name to be overridden by a dynamically generated value. This allows using Retool with a database that has been sharded into several different databases."},"use_dynamic_database_hosts":{"type":"boolean","description":"Enable this to allow the Database Host to be overridden by a dynamically generated value. This allows using Retool with several different databases."},"convert_mysql_dates_to_javascript":{"type":"boolean","default":true,"description":"This allows you to turn your MySQL date strings into Javascript Date objects."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"MySQL Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"Redshift Options"},{"type":"object","properties":{"account_identifier":{"type":"string"},"database_options":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"},"warehouse":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["name"],"additionalProperties":false},"user_role":{"type":"string"},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["authentication_type","username","password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake_jwt"]},"username":{"type":"string"},"private_key":{"type":"string"},"private_key_passphrase":{"type":"string"}},"required":["authentication_type","username","private_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret"],"additionalProperties":false}]}},"required":["account_identifier","database_options","authentication_options"],"additionalProperties":false,"title":"Snowflake Options"},{"type":"object","properties":{"base_url":{"type":"string","description":"Use the absolute URL (e.g https://example.com)."},"url_parameters":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"headers":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"extra_body_values":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Extra body values are not passed for GET or HEAD requests."},"cookies_to_forward":{"type":"array","items":{"type":"string"},"description":"You can use the pattern COOKIE_your_cookie_name in the Headers section in order to implement the double-cookie submit pattern."},"forward_all_cookies":{"type":"boolean","description":"This is useful if you have dynamic cookie names."},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["auth0"]},"auth0_domain":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_client_secret":{"type":"string"},"auth0_custom_audience":{"type":"string"}},"required":["authentication_type","auth0_domain","auth0_client_id","auth0_client_secret","auth0_custom_audience"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["aws4"]},"amazon_aws_region":{"type":"string"},"amazon_service_name":{"type":"string"},"amazon_access_key_id":{"type":"string"},"amazon_secret_access_key":{"type":"string"},"auth_with_default_credential_provider_chain":{"type":"boolean"},"enable_awsv4_authentication_via_headers":{"type":"boolean"}},"required":["authentication_type","amazon_aws_region","amazon_service_name","amazon_access_key_id","amazon_secret_access_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["basic"]},"basic_username":{"type":"string"},"basic_password":{"type":"string"}},"required":["authentication_type","basic_username"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["digest"]},"digest_username":{"type":"string"},"digest_password":{"type":"string"}},"required":["authentication_type","digest_username","digest_password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth1"]},"oauth1_signature_method":{"anyOf":[{"type":"string","enum":["HMAC-SHA1"]},{"type":"string","enum":["HMAC-SHA256"]},{"type":"string","enum":["PLAINTEXT"]}]},"oauth1_consumer_key":{"type":"string"},"oauth1_consumer_secret":{"type":"string"},"oauth1_token_key":{"type":"string"},"oauth1_token_secret":{"type":"string"},"oauth1_realm_parameter":{"type":"string"}},"required":["authentication_type","oauth1_signature_method","oauth1_consumer_key","oauth1_consumer_secret","oauth1_token_key","oauth1_token_secret","oauth1_realm_parameter"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"},"oauth2_auth_url":{"type":"string"},"oauth2_access_token_url":{"type":"string"},"oauth2_scope":{"type":"string"},"oauth2_audience":{"type":"string"},"oauth2_share_user_credentials":{"type":"boolean"},"verify_session_url":{"type":"string"},"oauth2_access_token":{"type":"string"},"oauth2_refresh_token":{"type":"string"},"oauth2_id_token":{"type":"string"},"oauth2_access_token_lifespan_seconds":{"type":"number","nullable":true}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret","oauth2_auth_url","oauth2_access_token_url"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["none"]}},"required":["authentication_type"],"additionalProperties":false}],"description":"Note that custom auth is not yet supported."}},"required":["base_url"],"additionalProperties":false,"title":"Rest API Options"}]},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","resource","environment","options","created_at","updated_at"],"additionalProperties":false,"description":"A list of resource configurations."},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}},"post":{"summary":"Create resource configuration","description":"Available from API version 2.4.0+ and onprem version 3.74 on-prem+. Creates a new resource configuration. The API token must have the \"Resources > Write\" scope.","tags":["Resource configurations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"A UUID that uniquely identifies a resource. This is also referenced within the Retool app. For example, when you edit a resource, the ID can be found in the url."},"environment_id":{"type":"string","format":"uuid","description":"A UUID that uniquely identifies an environment."},"options":{"anyOf":[{"type":"object","properties":{"database_options":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false},{"type":"object","properties":{"connection_string":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"additionalProperties":false}]}},"required":["database_options"],"additionalProperties":false,"title":"Postgres Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."},"use_dynamic_database_names":{"type":"boolean","description":"Enable this to allow the Database Name to be overridden by a dynamically generated value. This allows using Retool with a database that has been sharded into several different databases."},"use_dynamic_database_hosts":{"type":"boolean","description":"Enable this to allow the Database Host to be overridden by a dynamically generated value. This allows using Retool with several different databases."},"convert_mysql_dates_to_javascript":{"type":"boolean","default":true,"description":"This allows you to turn your MySQL date strings into Javascript Date objects."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"MySQL Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"Redshift Options"},{"type":"object","properties":{"account_identifier":{"type":"string"},"database_options":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"},"warehouse":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["name"],"additionalProperties":false},"user_role":{"type":"string"},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["authentication_type","username","password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake_jwt"]},"username":{"type":"string"},"private_key":{"type":"string"},"private_key_passphrase":{"type":"string"}},"required":["authentication_type","username","private_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret"],"additionalProperties":false}]}},"required":["account_identifier","database_options","authentication_options"],"additionalProperties":false,"title":"Snowflake Options"},{"type":"object","properties":{"base_url":{"type":"string","description":"Use the absolute URL (e.g https://example.com)."},"url_parameters":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"headers":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"extra_body_values":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Extra body values are not passed for GET or HEAD requests."},"cookies_to_forward":{"type":"array","items":{"type":"string"},"description":"You can use the pattern COOKIE_your_cookie_name in the Headers section in order to implement the double-cookie submit pattern."},"forward_all_cookies":{"type":"boolean","description":"This is useful if you have dynamic cookie names."},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["auth0"]},"auth0_domain":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_client_secret":{"type":"string"},"auth0_custom_audience":{"type":"string"}},"required":["authentication_type","auth0_domain","auth0_client_id","auth0_client_secret","auth0_custom_audience"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["aws4"]},"amazon_aws_region":{"type":"string"},"amazon_service_name":{"type":"string"},"amazon_access_key_id":{"type":"string"},"amazon_secret_access_key":{"type":"string"},"auth_with_default_credential_provider_chain":{"type":"boolean"},"enable_awsv4_authentication_via_headers":{"type":"boolean"}},"required":["authentication_type","amazon_aws_region","amazon_service_name","amazon_access_key_id","amazon_secret_access_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["basic"]},"basic_username":{"type":"string"},"basic_password":{"type":"string"}},"required":["authentication_type","basic_username"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["digest"]},"digest_username":{"type":"string"},"digest_password":{"type":"string"}},"required":["authentication_type","digest_username","digest_password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth1"]},"oauth1_signature_method":{"anyOf":[{"type":"string","enum":["HMAC-SHA1"]},{"type":"string","enum":["HMAC-SHA256"]},{"type":"string","enum":["PLAINTEXT"]}]},"oauth1_consumer_key":{"type":"string"},"oauth1_consumer_secret":{"type":"string"},"oauth1_token_key":{"type":"string"},"oauth1_token_secret":{"type":"string"},"oauth1_realm_parameter":{"type":"string"}},"required":["authentication_type","oauth1_signature_method","oauth1_consumer_key","oauth1_consumer_secret","oauth1_token_key","oauth1_token_secret","oauth1_realm_parameter"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"},"oauth2_auth_url":{"type":"string"},"oauth2_access_token_url":{"type":"string"},"oauth2_scope":{"type":"string"},"oauth2_audience":{"type":"string"},"oauth2_share_user_credentials":{"type":"boolean"},"verify_session_url":{"type":"string"},"oauth2_access_token":{"type":"string"},"oauth2_refresh_token":{"type":"string"},"oauth2_id_token":{"type":"string"},"oauth2_access_token_lifespan_seconds":{"type":"number","nullable":true}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret","oauth2_auth_url","oauth2_access_token_url"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["none"]}},"required":["authentication_type"],"additionalProperties":false}],"description":"Note that custom auth is not yet supported."}},"required":["base_url"],"additionalProperties":false,"title":"Rest API Options"}]}},"required":["resource_id","environment_id","options"]}}}},"responses":{"200":{"description":"The created resource configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The uuid for the resource configuration."},"resource":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"},"environment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"Environment"},"options":{"anyOf":[{"type":"object","properties":{"database_options":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false},{"type":"object","properties":{"connection_string":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"additionalProperties":false}]}},"required":["database_options"],"additionalProperties":false,"title":"Postgres Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."},"use_dynamic_database_names":{"type":"boolean","description":"Enable this to allow the Database Name to be overridden by a dynamically generated value. This allows using Retool with a database that has been sharded into several different databases."},"use_dynamic_database_hosts":{"type":"boolean","description":"Enable this to allow the Database Host to be overridden by a dynamically generated value. This allows using Retool with several different databases."},"convert_mysql_dates_to_javascript":{"type":"boolean","default":true,"description":"This allows you to turn your MySQL date strings into Javascript Date objects."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"MySQL Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"Redshift Options"},{"type":"object","properties":{"account_identifier":{"type":"string"},"database_options":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"},"warehouse":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["name"],"additionalProperties":false},"user_role":{"type":"string"},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["authentication_type","username","password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake_jwt"]},"username":{"type":"string"},"private_key":{"type":"string"},"private_key_passphrase":{"type":"string"}},"required":["authentication_type","username","private_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret"],"additionalProperties":false}]}},"required":["account_identifier","database_options","authentication_options"],"additionalProperties":false,"title":"Snowflake Options"},{"type":"object","properties":{"base_url":{"type":"string","description":"Use the absolute URL (e.g https://example.com)."},"url_parameters":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"headers":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"extra_body_values":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Extra body values are not passed for GET or HEAD requests."},"cookies_to_forward":{"type":"array","items":{"type":"string"},"description":"You can use the pattern COOKIE_your_cookie_name in the Headers section in order to implement the double-cookie submit pattern."},"forward_all_cookies":{"type":"boolean","description":"This is useful if you have dynamic cookie names."},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["auth0"]},"auth0_domain":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_client_secret":{"type":"string"},"auth0_custom_audience":{"type":"string"}},"required":["authentication_type","auth0_domain","auth0_client_id","auth0_client_secret","auth0_custom_audience"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["aws4"]},"amazon_aws_region":{"type":"string"},"amazon_service_name":{"type":"string"},"amazon_access_key_id":{"type":"string"},"amazon_secret_access_key":{"type":"string"},"auth_with_default_credential_provider_chain":{"type":"boolean"},"enable_awsv4_authentication_via_headers":{"type":"boolean"}},"required":["authentication_type","amazon_aws_region","amazon_service_name","amazon_access_key_id","amazon_secret_access_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["basic"]},"basic_username":{"type":"string"},"basic_password":{"type":"string"}},"required":["authentication_type","basic_username"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["digest"]},"digest_username":{"type":"string"},"digest_password":{"type":"string"}},"required":["authentication_type","digest_username","digest_password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth1"]},"oauth1_signature_method":{"anyOf":[{"type":"string","enum":["HMAC-SHA1"]},{"type":"string","enum":["HMAC-SHA256"]},{"type":"string","enum":["PLAINTEXT"]}]},"oauth1_consumer_key":{"type":"string"},"oauth1_consumer_secret":{"type":"string"},"oauth1_token_key":{"type":"string"},"oauth1_token_secret":{"type":"string"},"oauth1_realm_parameter":{"type":"string"}},"required":["authentication_type","oauth1_signature_method","oauth1_consumer_key","oauth1_consumer_secret","oauth1_token_key","oauth1_token_secret","oauth1_realm_parameter"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"},"oauth2_auth_url":{"type":"string"},"oauth2_access_token_url":{"type":"string"},"oauth2_scope":{"type":"string"},"oauth2_audience":{"type":"string"},"oauth2_share_user_credentials":{"type":"boolean"},"verify_session_url":{"type":"string"},"oauth2_access_token":{"type":"string"},"oauth2_refresh_token":{"type":"string"},"oauth2_id_token":{"type":"string"},"oauth2_access_token_lifespan_seconds":{"type":"number","nullable":true}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret","oauth2_auth_url","oauth2_access_token_url"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["none"]}},"required":["authentication_type"],"additionalProperties":false}],"description":"Note that custom auth is not yet supported."}},"required":["base_url"],"additionalProperties":false,"title":"Rest API Options"}]},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","resource","environment","options","created_at","updated_at"],"additionalProperties":false,"description":"The created resource configuration."}},"required":["success","data"]}}}}}}},"/resource_configurations/{configurationId}":{"get":{"summary":"Get resource configuration by id","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Returns a specific resource configuration. The API token must have the \"Resources > Read\" scope.","tags":["Resource configurations"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The resource configuration id."},"required":true,"name":"configurationId","in":"path"}],"responses":{"200":{"description":"The requested resource configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The uuid for the resource configuration."},"resource":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"},"environment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"Environment"},"options":{"anyOf":[{"type":"object","properties":{"database_options":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false},{"type":"object","properties":{"connection_string":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"additionalProperties":false}]}},"required":["database_options"],"additionalProperties":false,"title":"Postgres Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."},"use_dynamic_database_names":{"type":"boolean","description":"Enable this to allow the Database Name to be overridden by a dynamically generated value. This allows using Retool with a database that has been sharded into several different databases."},"use_dynamic_database_hosts":{"type":"boolean","description":"Enable this to allow the Database Host to be overridden by a dynamically generated value. This allows using Retool with several different databases."},"convert_mysql_dates_to_javascript":{"type":"boolean","default":true,"description":"This allows you to turn your MySQL date strings into Javascript Date objects."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"MySQL Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"Redshift Options"},{"type":"object","properties":{"account_identifier":{"type":"string"},"database_options":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"},"warehouse":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["name"],"additionalProperties":false},"user_role":{"type":"string"},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["authentication_type","username","password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake_jwt"]},"username":{"type":"string"},"private_key":{"type":"string"},"private_key_passphrase":{"type":"string"}},"required":["authentication_type","username","private_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret"],"additionalProperties":false}]}},"required":["account_identifier","database_options","authentication_options"],"additionalProperties":false,"title":"Snowflake Options"},{"type":"object","properties":{"base_url":{"type":"string","description":"Use the absolute URL (e.g https://example.com)."},"url_parameters":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"headers":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"extra_body_values":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Extra body values are not passed for GET or HEAD requests."},"cookies_to_forward":{"type":"array","items":{"type":"string"},"description":"You can use the pattern COOKIE_your_cookie_name in the Headers section in order to implement the double-cookie submit pattern."},"forward_all_cookies":{"type":"boolean","description":"This is useful if you have dynamic cookie names."},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["auth0"]},"auth0_domain":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_client_secret":{"type":"string"},"auth0_custom_audience":{"type":"string"}},"required":["authentication_type","auth0_domain","auth0_client_id","auth0_client_secret","auth0_custom_audience"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["aws4"]},"amazon_aws_region":{"type":"string"},"amazon_service_name":{"type":"string"},"amazon_access_key_id":{"type":"string"},"amazon_secret_access_key":{"type":"string"},"auth_with_default_credential_provider_chain":{"type":"boolean"},"enable_awsv4_authentication_via_headers":{"type":"boolean"}},"required":["authentication_type","amazon_aws_region","amazon_service_name","amazon_access_key_id","amazon_secret_access_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["basic"]},"basic_username":{"type":"string"},"basic_password":{"type":"string"}},"required":["authentication_type","basic_username"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["digest"]},"digest_username":{"type":"string"},"digest_password":{"type":"string"}},"required":["authentication_type","digest_username","digest_password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth1"]},"oauth1_signature_method":{"anyOf":[{"type":"string","enum":["HMAC-SHA1"]},{"type":"string","enum":["HMAC-SHA256"]},{"type":"string","enum":["PLAINTEXT"]}]},"oauth1_consumer_key":{"type":"string"},"oauth1_consumer_secret":{"type":"string"},"oauth1_token_key":{"type":"string"},"oauth1_token_secret":{"type":"string"},"oauth1_realm_parameter":{"type":"string"}},"required":["authentication_type","oauth1_signature_method","oauth1_consumer_key","oauth1_consumer_secret","oauth1_token_key","oauth1_token_secret","oauth1_realm_parameter"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"},"oauth2_auth_url":{"type":"string"},"oauth2_access_token_url":{"type":"string"},"oauth2_scope":{"type":"string"},"oauth2_audience":{"type":"string"},"oauth2_share_user_credentials":{"type":"boolean"},"verify_session_url":{"type":"string"},"oauth2_access_token":{"type":"string"},"oauth2_refresh_token":{"type":"string"},"oauth2_id_token":{"type":"string"},"oauth2_access_token_lifespan_seconds":{"type":"number","nullable":true}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret","oauth2_auth_url","oauth2_access_token_url"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["none"]}},"required":["authentication_type"],"additionalProperties":false}],"description":"Note that custom auth is not yet supported."}},"required":["base_url"],"additionalProperties":false,"title":"Rest API Options"}]},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","resource","environment","options","created_at","updated_at"],"additionalProperties":false,"description":"Resource Configuration"}}}}}},"delete":{"summary":"Delete resource configuration","description":"Available from API version 2.4.0+ and onprem version 3.34.0+. Deletes a resource configuration with the given id. The API token must have the \"Resources > Write\" scope.","tags":["Resource configurations"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The resource configuration id."},"required":true,"name":"configurationId","in":"path"}],"responses":{"204":{"description":"Resource configuration deleted"}}},"patch":{"summary":"Update a resource configuration","description":"Available from API version 2.4.0+ and onprem version 3.74 on-prem+. Updates the resource configuration with the given resource configuration id. The API token must have the \"Resources > Write\" scope.","tags":["Resource configurations"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The resource configuration id."},"required":true,"name":"configurationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string"},"value":{"nullable":true,"description":"A JSON value"}},"required":["op","path"],"title":"Replace Operation"},"description":"A list of operations to apply to the resource configuration. See the [JSON PATCH specification](https://tools.ietf.org/html/rfc6902) for more details."}},"required":["operations"],"additionalProperties":false,"description":"The body of a request to update a resource configuration."}}}},"responses":{"200":{"description":"The updated resource configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The uuid for the resource configuration."},"resource":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"},{"type":"string","enum":["retool_db"]},{"type":"string","enum":["retool_email"]},{"type":"string","enum":["retool_storage"]},{"type":"string","enum":["retool_ai"]}],"description":"The uuid for the resource."},"type":{"type":"string","enum":["airflow","alloydb","asana","athena","basecamp","bigid","bigquery","cassandra","circleci","closeio","cosmosdb","couchdb","databricks","datadog","datastore","denodo","dynamodb","elasticsearch","firebase","front","gcs","github","googleAnalytics","googleMaps","googleSearchConsole","googlesheets","graphql","grpc","hubspot","jdbc","jira","lambda","launchdarkly","microsoftTeams","mongodb","mssql","mysql","notion","onesignal","openAI","openapi","oracledb","postgresql","presto","redis","redshift","restapi","rethinkdb","retoolEmail","retoolAI","retoolDb","retoolStorage","s3","salesforce","saphana","sendgrid","shell","slack","slackopenapi","smtp","snowflake","stripe","twilio","vertica"],"description":"The type of resource."},"display_name":{"type":"string","minLength":1},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","type","display_name","created_at","updated_at"],"additionalProperties":false,"description":"Resource"},"environment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"Environment"},"options":{"anyOf":[{"type":"object","properties":{"database_options":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false},{"type":"object","properties":{"connection_string":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"additionalProperties":false}]}},"required":["database_options"],"additionalProperties":false,"title":"Postgres Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"client_key":{"type":"string","nullable":true},"client_cert":{"type":"string","nullable":true},"ca_cert":{"type":"string","nullable":true}},"additionalProperties":false},"ssh_tunnel_options":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"private_key_name":{"type":"string"}},"required":["enabled","host","port"],"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."},"use_dynamic_database_names":{"type":"boolean","description":"Enable this to allow the Database Name to be overridden by a dynamically generated value. This allows using Retool with a database that has been sharded into several different databases."},"use_dynamic_database_hosts":{"type":"boolean","description":"Enable this to allow the Database Host to be overridden by a dynamically generated value. This allows using Retool with several different databases."},"convert_mysql_dates_to_javascript":{"type":"boolean","default":true,"description":"This allows you to turn your MySQL date strings into Javascript Date objects."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"MySQL Options"},{"type":"object","properties":{"database_options":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"ssl_settings":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["host","port"],"additionalProperties":false}},"required":["database_options"],"additionalProperties":false,"title":"Redshift Options"},{"type":"object","properties":{"account_identifier":{"type":"string"},"database_options":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"},"warehouse":{"type":"string"},"disable_converting_queries_to_prepared_statements":{"type":"boolean","description":"This allows you to use Javascript to dynamically generate SQL but also turns off SQL injection protection."},"show_write_gui_only":{"type":"boolean","description":"This allows you to enable writing via only the restrictive GUI query editor."}},"required":["name"],"additionalProperties":false},"user_role":{"type":"string"},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["authentication_type","username","password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["snowflake_jwt"]},"username":{"type":"string"},"private_key":{"type":"string"},"private_key_passphrase":{"type":"string"}},"required":["authentication_type","username","private_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret"],"additionalProperties":false}]}},"required":["account_identifier","database_options","authentication_options"],"additionalProperties":false,"title":"Snowflake Options"},{"type":"object","properties":{"base_url":{"type":"string","description":"Use the absolute URL (e.g https://example.com)."},"url_parameters":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"headers":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"extra_body_values":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Extra body values are not passed for GET or HEAD requests."},"cookies_to_forward":{"type":"array","items":{"type":"string"},"description":"You can use the pattern COOKIE_your_cookie_name in the Headers section in order to implement the double-cookie submit pattern."},"forward_all_cookies":{"type":"boolean","description":"This is useful if you have dynamic cookie names."},"authentication_options":{"anyOf":[{"type":"object","properties":{"authentication_type":{"type":"string","enum":["auth0"]},"auth0_domain":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_client_secret":{"type":"string"},"auth0_custom_audience":{"type":"string"}},"required":["authentication_type","auth0_domain","auth0_client_id","auth0_client_secret","auth0_custom_audience"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["aws4"]},"amazon_aws_region":{"type":"string"},"amazon_service_name":{"type":"string"},"amazon_access_key_id":{"type":"string"},"amazon_secret_access_key":{"type":"string"},"auth_with_default_credential_provider_chain":{"type":"boolean"},"enable_awsv4_authentication_via_headers":{"type":"boolean"}},"required":["authentication_type","amazon_aws_region","amazon_service_name","amazon_access_key_id","amazon_secret_access_key"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["basic"]},"basic_username":{"type":"string"},"basic_password":{"type":"string"}},"required":["authentication_type","basic_username"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["digest"]},"digest_username":{"type":"string"},"digest_password":{"type":"string"}},"required":["authentication_type","digest_username","digest_password"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth1"]},"oauth1_signature_method":{"anyOf":[{"type":"string","enum":["HMAC-SHA1"]},{"type":"string","enum":["HMAC-SHA256"]},{"type":"string","enum":["PLAINTEXT"]}]},"oauth1_consumer_key":{"type":"string"},"oauth1_consumer_secret":{"type":"string"},"oauth1_token_key":{"type":"string"},"oauth1_token_secret":{"type":"string"},"oauth1_realm_parameter":{"type":"string"}},"required":["authentication_type","oauth1_signature_method","oauth1_consumer_key","oauth1_consumer_secret","oauth1_token_key","oauth1_token_secret","oauth1_realm_parameter"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["oauth2"]},"oauth2_client_id":{"type":"string"},"oauth2_client_secret":{"type":"string"},"oauth2_callback_url":{"type":"string"},"oauth2_auth_url":{"type":"string"},"oauth2_access_token_url":{"type":"string"},"oauth2_scope":{"type":"string"},"oauth2_audience":{"type":"string"},"oauth2_share_user_credentials":{"type":"boolean"},"verify_session_url":{"type":"string"},"oauth2_access_token":{"type":"string"},"oauth2_refresh_token":{"type":"string"},"oauth2_id_token":{"type":"string"},"oauth2_access_token_lifespan_seconds":{"type":"number","nullable":true}},"required":["authentication_type","oauth2_client_id","oauth2_client_secret","oauth2_auth_url","oauth2_access_token_url"],"additionalProperties":false},{"type":"object","properties":{"authentication_type":{"type":"string","enum":["none"]}},"required":["authentication_type"],"additionalProperties":false}],"description":"Note that custom auth is not yet supported."}},"required":["base_url"],"additionalProperties":false,"title":"Rest API Options"}]},"created_at":{"type":"string","example":"2019-02-08T11:45:48.899Z"},"updated_at":{"type":"string","example":"2019-02-24T18:28:18.790Z"}},"required":["id","resource","environment","options","created_at","updated_at"],"additionalProperties":false,"description":"The updated resource configuration."}},"required":["success","data"]}}}}}}},"/environments":{"get":{"summary":"Get organization environments","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Gets a list of environments. The API token must have the \"Environment > Read\" scope.","tags":["Environment"],"responses":{"200":{"description":"All environments in the org.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"Environment"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A list of environments."}}}}}}},"/environments/{environmentId}":{"get":{"summary":"Get an environment by id","description":"Available from API version 2.4.0+ and onprem version 3.28.0+. Returns a single environment of the given uuid. The API token must have the \"Environment > Read\" scope.","tags":["Environment"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"environmentId","in":"path"}],"responses":{"200":{"description":"The requested environment.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","color","default","created_at","updated_at"],"description":"The requested environment"}},"required":["success","data"]}}}}}}},"/custom_component_libraries/{libraryId}":{"get":{"summary":"Get a single custom component libraries","description":"Available on Retool Cloud and self-hosted Retool version 3.41.0+. Gets a single custom component library. The API token must have the \"CustomComponent > Read\" scope.","tags":["CustomComponentLibrary"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"libraryId","in":"path"}],"responses":{"200":{"description":"Returns a single custom component libraries.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"How the library will be referred to in Toolscript, and other code based usages."},"description":{"type":"string","nullable":true},"label":{"type":"string","description":"How the library will be referred to in the Retool UI. Should be human readable."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","label","created_at","updated_at"],"description":"Custom Component Library"}},"required":["success","data"]}}}},"404":{"description":"Custom component library does not exist"}}}},"/custom_component_libraries":{"post":{"summary":"Create a new custom component library","description":"Available on Retool Cloud and self-hosted Retool version 3.41.0+. Creates a new custom component library The API token must have the \"CustomComponent > Write\" scope.","tags":["CustomComponentLibrary"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Specifies a specific id to use for the library. Used for syncronizing libraries across Retool Instances."},"name":{"type":"string","description":"How the library will be referred to in Toolscript, and other code based usages."},"description":{"type":"string","nullable":true},"label":{"type":"string","description":"How the library will be referred to in the Retool UI. Should be human readable."}},"required":["name","description","label"]}}}},"responses":{"200":{"description":"The newly created custom component library.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"How the library will be referred to in Toolscript, and other code based usages."},"description":{"type":"string","nullable":true},"label":{"type":"string","description":"How the library will be referred to in the Retool UI. Should be human readable."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","label","created_at","updated_at"],"description":"Custom Component Library"}},"required":["success","data"],"description":"The newly created Custom Component Library."}}}},"409":{"description":"A library with the provided ID already exists"}}},"get":{"summary":"Get a list of all custom component libraries","description":"Available on Retool Cloud and self-hosted Retool version 3.41.0+. Gets a paginated list of all custom component libraries. The API token must have the \"CustomComponent > Read\" scope.","tags":["CustomComponentLibrary"],"parameters":[{"schema":{"type":"string","description":"The token of the current page"},"required":false,"name":"next_token","in":"query"}],"responses":{"200":{"description":"Returns a paginated list of custom component libraries.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"How the library will be referred to in Toolscript, and other code based usages."},"description":{"type":"string","nullable":true},"label":{"type":"string","description":"How the library will be referred to in the Retool UI. Should be human readable."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","label","created_at","updated_at"],"description":"Custom Component Library"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A paginated list of custom component libraries."}}}}}}},"/custom_component_libraries/{libraryId}/revisions":{"post":{"summary":"Create a new custom component library revision","description":"Available on Retool Cloud and self-hosted Retool version 3.41.0+. Creates a new version of a custom component library, the underlying files that describe the component. The API token must have the \"CustomComponent > Write\" scope.","tags":["CustomComponentLibrary"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"libraryId","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Specifies a specific id to use for the library. Used for syncronizing libraries across Retool Instances."},"version_bump":{"type":"string","enum":["minor","major","dev","specify_version"]},"version":{"type":"string","description":"A specific version tag to use. Also specify version_bump as 'specify_version'."},"files":{"type":"string","format":"binary"}},"required":["version_bump","files"]}}}},"responses":{"200":{"description":"The newly created custom component library revision.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string"},"custom_component_library_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","version","custom_component_library_id","created_at","updated_at"],"description":"Custom Component Library Revision"}},"required":["success","data"],"description":"The newly created Custom Component Library Revision."}}}},"409":{"description":"A revision with the provided ID already exists"}}},"get":{"summary":"Gets a list of all the revisions of a custom component library","description":"Available on Retool Cloud and self-hosted Retool version 3.41.0+. Gets a list of all the revisions of a custom component library. The API token must have the \"CustomComponent > Read\" scope.","tags":["CustomComponentLibrary"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"libraryId","in":"path"}],"responses":{"200":{"description":"Returns a list of all revisions of a custom component library.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string"},"custom_component_library_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","version","custom_component_library_id","created_at","updated_at"],"description":"Custom Component Library Revision"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}},"404":{"description":"Custom component library does not exist"}}}},"/custom_component_libraries/{libraryId}/revisions/{revisionId}/files":{"get":{"summary":"Gets all files associated with a custom component library revision.","description":"Available on Retool Cloud and self-hosted Retool version 3.41.0+. Gets all files associated with a custom component library revision. The API token must have the \"CustomComponent > Read\" scope.","tags":["CustomComponentLibrary"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"libraryId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"revisionId","in":"path"}],"responses":{"200":{"description":"Returns a list of all files associated with a custom component library revision.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"filepath":{"type":"string"},"file_contents":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["filepath","file_contents","created_at","updated_at"],"description":"Custom Component Library Revision"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}}},"/configuration_variables":{"get":{"summary":"List configuration variables and their values","description":"Available for orgs with configuration variables enabled on Retool Version 3.42+. The API token must have the \"Configuration Variables > Read\" scope.","tags":["Configuration Variables"],"responses":{"200":{"description":"List of configuration variables and their values.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"name":{"type":"string","description":"The name of the configuration variable"},"description":{"type":"string","description":"The description of the configuration variable"},"secret":{"type":"boolean","description":"Whether the configuration variable is a secret"},"values":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment"},"value":{"type":"string","description":"The value of the configuration variable"}},"required":["environment_id","value"]}}},"required":["id","name","secret","values"]},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"]}}}}}},"post":{"summary":"Create a configuration variable","description":"Available for orgs with configuration variables enabled on Retool Version 3.42+. The API token must have the \"Configuration Variables > Write\" scope.","tags":["Configuration Variables"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the configuration variable"},"description":{"type":"string","description":"The description of the configuration variable"},"secret":{"type":"boolean","description":"Whether the configuration variable is a secret"},"values":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment"},"value":{"type":"string","description":"The value of the configuration variable"}},"required":["environment_id","value"]}}},"required":["name","secret","values"]}}}},"responses":{"200":{"description":"Created configuration variable.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"name":{"type":"string","description":"The name of the configuration variable"},"description":{"type":"string","description":"The description of the configuration variable"},"secret":{"type":"boolean","description":"Whether the configuration variable is a secret"},"values":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment"},"value":{"type":"string","description":"The value of the configuration variable"}},"required":["environment_id","value"]}}},"required":["id","name","secret","values"]}},"required":["success","data"]}}}}}}},"/configuration_variables/{id}":{"get":{"summary":"Retreive a single configuration variable and its values","description":"Available for orgs with configuration variables enabled on Retool Version 3.42+. The API token must have the \"Configuration Variables > Read\" scope.","tags":["Configuration Variables"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"A configuration variable and its values.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"name":{"type":"string","description":"The name of the configuration variable"},"description":{"type":"string","description":"The description of the configuration variable"},"secret":{"type":"boolean","description":"Whether the configuration variable is a secret"},"values":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment"},"value":{"type":"string","description":"The value of the configuration variable"}},"required":["environment_id","value"]}}},"required":["id","name","secret","values"]}},"required":["success","data"]}}}}}},"put":{"summary":"Update a configuration variable","description":"Update a configuration variable and its values. Available for orgs with configuration variables enabled on Retool Version 3.42+. The API token must have the \"Configuration Variables > Write\" scope.","tags":["Configuration Variables"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the configuration variable"},"description":{"type":"string","description":"The description of the configuration variable"},"secret":{"type":"boolean","description":"Whether the configuration variable is a secret"},"values":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment"},"value":{"type":"string","description":"The value of the configuration variable"}},"required":["environment_id","value"]}}},"required":["name","secret","values"]}}}},"responses":{"200":{"description":"Created configuration variable.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"name":{"type":"string","description":"The name of the configuration variable"},"description":{"type":"string","description":"The description of the configuration variable"},"secret":{"type":"boolean","description":"Whether the configuration variable is a secret"},"values":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment"},"value":{"type":"string","description":"The value of the configuration variable"}},"required":["environment_id","value"]}}},"required":["id","name","secret","values"]}},"required":["success","data"]}}}}}},"delete":{"summary":"Delete configuration variable","description":"Deletes a configuration variable and its values. Available for orgs with configuration variables enabled on Retool Version 3.42+. The API token must have the \"Configuration Variables > Write\" scope.","tags":["Configuration Variables"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The ID of the configuration variable"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Group deleted"}}}},"/observability/config":{"post":{"summary":"Create a new observability provider configuration","description":"Create observability configuration for the organization and returns the created configuration. This will result in an error if configuration is already set. The API token must have the \"Observability > Write\" scope.","tags":["Observability"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["Sentry"],"description":"This is an enumerated field that can only take the value \"Sentry\". It identifies the provider of the observability configuration."},"dsn":{"type":"string","description":"This is a string field that represents the Data Source Name (DSN). It is the unique identifier that helps Sentry know where to send errors and exceptions."}},"required":["provider","dsn"]},{"type":"object","properties":{"provider":{"type":"string","enum":["Datadog"],"description":"This is an enumerated field that can only take the value \"Datadog\". It identifies the provider of the observability configuration."},"api_key":{"type":"string","description":"This is a string field that represents the API key for Datadog. This key is used to authenticate with the Datadog API."}},"required":["provider","api_key"]}],"description":"Provider-specific configuration. For Datadog, provide an API key. For Sentry, provide a DSN."},"enabled":{"type":"boolean","description":"When enabled, use this provider for apps observability monitoring."}},"required":["config","enabled"],"additionalProperties":false,"description":"Shape of Post Observability Config Request"}}}},"responses":{"200":{"description":"Observability provider configuration created.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the configuration."},"config":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["Sentry"],"description":"This is an enumerated field that can only take the value \"Sentry\". It identifies the provider of the observability configuration."},"dsn":{"type":"string","description":"This is a string field that represents the Data Source Name (DSN). It is the unique identifier that helps Sentry know where to send errors and exceptions."}},"required":["provider","dsn"]},{"type":"object","properties":{"provider":{"type":"string","enum":["Datadog"],"description":"This is an enumerated field that can only take the value \"Datadog\". It identifies the provider of the observability configuration."},"api_key":{"type":"string","description":"This is a string field that represents the API key for Datadog. This key is used to authenticate with the Datadog API."}},"required":["provider","api_key"]}],"description":"Provider-specific configuration. For Datadog, provide an API key. For Sentry, provide a DSN."},"enabled":{"type":"boolean","description":"When enabled, use this provider for apps observability monitoring."}},"required":["id","config","enabled"],"additionalProperties":false,"description":"Shape of Post Observability Config Response"}},"required":["success","data"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"403":{"description":"Incorrect scope.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"Configuration already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"get":{"summary":"Get observability provider configurations","description":"Get observability configurations for the organization. The API token must have the \"Observability > Read\" scope.","tags":["Observability"],"responses":{"200":{"description":"Observability provider configuration retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the configuration."},"config":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["Sentry"],"description":"This is an enumerated field that can only take the value \"Sentry\". It identifies the provider of the observability configuration."},"dsn":{"type":"string","description":"This is a string field that represents the Data Source Name (DSN). It is the unique identifier that helps Sentry know where to send errors and exceptions."}},"required":["provider","dsn"]},{"type":"object","properties":{"provider":{"type":"string","enum":["Datadog"],"description":"This is an enumerated field that can only take the value \"Datadog\". It identifies the provider of the observability configuration."},"api_key":{"type":"string","description":"This is a string field that represents the API key for Datadog. This key is used to authenticate with the Datadog API."}},"required":["provider","api_key"]}],"description":"Provider-specific configuration. For Datadog, provide an API key. For Sentry, provide a DSN."},"enabled":{"type":"boolean","description":"When enabled, use this provider for apps observability monitoring."}},"required":["id","config","enabled"],"additionalProperties":false,"description":"Shape of Get Observability Config Response"}}},"required":["success","data"]}}}},"403":{"description":"Incorrect scope.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"404":{"description":"Configuration not found.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/observability/config/{configId}":{"put":{"summary":"Update an observability provider configuration","description":"Update observability configuration for the organization and returns the updated configuration. This will result in an error if no existing configuration found. The API token must have the \"Observability > Write\" scope.","tags":["Observability"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the observability configuration to update."},"required":true,"name":"configId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["Sentry"],"description":"This is an enumerated field that can only take the value \"Sentry\". It identifies the provider of the observability configuration."},"dsn":{"type":"string","description":"This is a string field that represents the Data Source Name (DSN). It is the unique identifier that helps Sentry know where to send errors and exceptions."}},"required":["provider","dsn"]},{"type":"object","properties":{"provider":{"type":"string","enum":["Datadog"],"description":"This is an enumerated field that can only take the value \"Datadog\". It identifies the provider of the observability configuration."},"api_key":{"type":"string","description":"This is a string field that represents the API key for Datadog. This key is used to authenticate with the Datadog API."}},"required":["provider","api_key"]}],"description":"Provider-specific configuration. For Datadog, provide an API key. For Sentry, provide a DSN."},"enabled":{"type":"boolean","description":"When enabled, use this provider for apps observability monitoring."}},"additionalProperties":false,"description":"Shape of Put Observability Config Request"}}}},"responses":{"200":{"description":"Observability provider configuration updated.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the configuration."},"config":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["Sentry"],"description":"This is an enumerated field that can only take the value \"Sentry\". It identifies the provider of the observability configuration."},"dsn":{"type":"string","description":"This is a string field that represents the Data Source Name (DSN). It is the unique identifier that helps Sentry know where to send errors and exceptions."}},"required":["provider","dsn"]},{"type":"object","properties":{"provider":{"type":"string","enum":["Datadog"],"description":"This is an enumerated field that can only take the value \"Datadog\". It identifies the provider of the observability configuration."},"api_key":{"type":"string","description":"This is a string field that represents the API key for Datadog. This key is used to authenticate with the Datadog API."}},"required":["provider","api_key"]}],"description":"Provider-specific configuration. For Datadog, provide an API key. For Sentry, provide a DSN."},"enabled":{"type":"boolean","description":"When enabled, use this provider for apps observability monitoring."}},"required":["id","config","enabled"],"additionalProperties":false,"description":"Shape of Put Observability Config Response"}},"required":["success","data"]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"403":{"description":"Incorrect scope.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"No configuration exists.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}},"delete":{"summary":"Delete an observability provider configuration","description":"Delete observability configuration for the organization. The API token must have the \"Observability > Write\" scope.","tags":["Observability"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the observability configuration to delete."},"required":true,"name":"configId","in":"path"}],"responses":{"204":{"description":"Observability provider configuration deleted."},"403":{"description":"Incorrect scope.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"Configuration not found.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/observability/provider/{provider}/test":{"post":{"summary":"Send a test error event to the observability provider","description":"Send a test error event to the observability provider. The API token must have the \"Observability > Read\" scope.","tags":["Observability"],"parameters":[{"schema":{"anyOf":[{"type":"string","enum":["Sentry"]},{"type":"string","enum":["Datadog"]}],"description":"The observability provider name, either \"Sentry\" or \"Datadog\""},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Test event sent.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"Send test error failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"]},{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Send test error succeeded"}},"required":["success"]}],"description":"Send test error response"}},"required":["success","data"]}}}},"403":{"description":"Incorrect scope.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}},"422":{"description":"Provider is not configured correctly.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"description":"API request failed"},"message":{"type":"string","description":"Error message"}},"required":["success","message"],"description":"API error response"}}}}}}},"/usage/organizations":{"get":{"summary":"List organizations","description":"Returns a list of organizations that the token has scope to access. The API token must have the 'usage' scope. 'usage:organization' scope returns just the organization, 'usage:spaces' returns all the spaces under the admin organization, 'usage:license' returns all the organizations that use that license key.","tags":["Usage","Organization"],"responses":{"200":{"description":"List of organizations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"org_id":{"type":"string","description":"The id of the organization"},"host":{"type":"string","description":"The host of the organization"},"last_active":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"}},"required":["org_id","host","last_active"],"additionalProperties":false,"description":"An organization in Retool"},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"A list of organizations in this deployment."}}}}}}},"/usage":{"get":{"summary":"The usage summary for the selected organizations","description":"The usage summary for the selected organizations. Contains information about usage like page saves, page views, active users, and the growth in those fields in the specified time range. The API token must have the 'usage' scope. ","tags":["Usage"],"parameters":[{"schema":{"type":"string","description":"A comma separated list of org ids to retrieve usage data for","example":"org_id1,org_id2"},"required":false,"name":"org_ids","in":"query"},{"schema":{"type":"string","description":"The start date of the date range","example":"2024-01-15"},"required":true,"name":"start_date","in":"query"},{"schema":{"type":"string","description":"The end date of the date range. If not specified, then minimum(start_date + 30 days, today - 1) is used.","example":"2024-01-30"},"required":false,"name":"end_date","in":"query"}],"responses":{"200":{"description":"The usage summary for the selected organizations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"count_current_page_saves":{"type":"number","description":"The number of page saves for all the organizations within the date range"},"count_current_page_views":{"type":"number","description":"The number of page views for all the organizations within the date range"},"count_current_users":{"type":"number","description":"The total number of unique users who have performed any tracked activity in all the organizations within the date range"},"count_T30_users":{"type":"number","description":"The number of unique users who have been active over the trailing 30 days from the end date provided"},"percent_growth_page_saves":{"type":"number","description":"The percentage growth in page saves compared to the previous cycle of the same length as the provided date range"},"percent_growth_page_views":{"type":"number","description":"The percentage growth in page views compared to the previous cycle of the same length as the provided date range"},"percent_growth_users":{"type":"number","description":"The percentage growth in unique users compared to the previous cycle of the same length as the provided date range"},"percent_growth_T30_users":{"type":"number","description":"The percentage growth in T30 users (trailing 30 days users) compared to the previous cycle of the same length as the provided date range"},"daily_T30_usage":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"maa":{"type":"number","description":"The number of distinct applications that were active on the given day"},"mau":{"type":"number","description":"The number of distinct users who were active on the given day"}},"required":["day","maa","mau"]}}},"required":["count_current_page_saves","count_current_page_views","count_current_users","count_T30_users","percent_growth_page_saves","percent_growth_page_views","percent_growth_users","percent_growth_T30_users","daily_T30_usage"],"additionalProperties":false}},"required":["success","data"],"description":"The usage information for the organizations"}}}}}}},"/usage/app_summary":{"get":{"summary":"The app summaries for the selected organizations","description":"The app summaries for the selected organizations. Contains information about the app like saves, views, unique editors and viewers in the specified time range. The API token must have the 'usage' scope. ","tags":["Usage"],"parameters":[{"schema":{"type":"string","description":"A comma separated list of org ids to retrieve usage data for","example":"org_id1,org_id2"},"required":false,"name":"org_ids","in":"query"},{"schema":{"type":"string","description":"The start date of the date range","example":"2024-01-15"},"required":true,"name":"start_date","in":"query"},{"schema":{"type":"string","description":"The end date of the date range. If not specified, then minimum(start_date + 30 days, today - 1) is used.","example":"2024-01-30"},"required":false,"name":"end_date","in":"query"}],"responses":{"200":{"description":"The app summaries for the selected organizations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"app_name":{"type":"string","description":"The name of the app"},"host":{"type":"string","description":"The organization host"},"count_app_views":{"type":"number","description":"The number of views of the app in the time range specified"},"count_app_saves":{"type":"number","description":"The number of saves of the app in the time range specified"},"count_viewers":{"type":"number","description":"The number of viewers of the app in the time range specified"},"count_editors":{"type":"number","description":"The number of editors of the app in the time range specified"}},"required":["app_name","host","count_app_views","count_app_saves","count_viewers","count_editors"],"additionalProperties":false},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"The app summaries for the organizations"}}}}}}},"/usage/app_details":{"get":{"summary":"The app details for the selected app and organizations","description":"The detailed app usage for the selected organizations. Contains information about the app, including the breakdown of saves and views in the specified time range. The API token must have the 'usage' scope.","tags":["Usage"],"parameters":[{"schema":{"type":"string","description":"A comma separated list of org ids to retrieve usage data for","example":"org_id1,org_id2"},"required":false,"name":"org_ids","in":"query"},{"schema":{"type":"string","description":"The start date of the date range","example":"2024-01-15"},"required":true,"name":"start_date","in":"query"},{"schema":{"type":"string","description":"The end date of the date range. If not specified, then minimum(start_date + 30 days, today - 1) is used.","example":"2024-01-30"},"required":false,"name":"end_date","in":"query"},{"schema":{"type":"string","description":"The name of the app to retrieve usage data for"},"required":true,"name":"app_name","in":"query"}],"responses":{"200":{"description":"The app details for the selected app and organizations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"overall_summary":{"type":"array","items":{"type":"object","properties":{"org_id":{"type":"string"},"app_name":{"type":"string"},"count_app_saves":{"type":"number"},"count_app_views":{"type":"number"},"host":{"type":"string"}},"required":["org_id","app_name","count_app_saves","count_app_views","host"],"additionalProperties":false}},"weekly_summary":{"type":"array","items":{"type":"object","properties":{"org_id":{"type":"string"},"weekly_data":{"type":"array","items":{"type":"object","properties":{"week":{"type":"string"},"count_app_saves":{"type":"number"},"count_app_views":{"type":"number"}},"required":["week","count_app_saves","count_app_views"]}}},"required":["org_id","weekly_data"],"additionalProperties":false}},"viewer_summary":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"count":{"type":"number"},"user_id":{"type":"string"},"org_id":{"type":"string"},"host":{"type":"string"}},"required":["email","count","user_id","org_id","host"],"additionalProperties":false}},"editor_summary":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"count":{"type":"number"},"user_id":{"type":"string"},"org_id":{"type":"string"},"host":{"type":"string"}},"required":["email","count","user_id","org_id","host"],"additionalProperties":false}}},"required":["overall_summary","weekly_summary","viewer_summary","editor_summary"],"additionalProperties":false}},"required":["success","data"],"description":"The details about the app usage, such as edits and views, for the organizations"}}}}}}},"/usage/user_summary":{"get":{"summary":"The summaries of user usage for the selected organizations","description":"The summaries of the user including email, last active time, the number of apps viewed and edited, for the selected organizations in the specified time range. The API token must have the 'usage' scope.","tags":["Usage"],"parameters":[{"schema":{"type":"string","description":"A comma separated list of org ids to retrieve usage data for","example":"org_id1,org_id2"},"required":false,"name":"org_ids","in":"query"},{"schema":{"type":"string","description":"The start date of the date range","example":"2024-01-15"},"required":true,"name":"start_date","in":"query"},{"schema":{"type":"string","description":"The end date of the date range. If not specified, then minimum(start_date + 30 days, today - 1) is used.","example":"2024-01-30"},"required":false,"name":"end_date","in":"query"}],"responses":{"200":{"description":"The user usage summies for the selected organizations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"array","items":{"type":"object","properties":{"org_id":{"type":"string","description":"The id of the organization to which this user belongs"},"user_id":{"type":"string","description":"The id of the user"},"email":{"type":"string","description":"The email of the user"},"host":{"type":"string","description":"The host of the organization to which this user belongs"},"count_app_views":{"type":"number","description":"The number of times the user viewed an app in the time range specified"},"count_app_saves":{"type":"number","description":"The number of times the user edited an app in the time range specified"},"count_unique_apps":{"type":"number","description":"The number of unique apps edited in the time range specified"},"last_active":{"type":"string","format":"date-time","example":"2019-02-08T11:45:48.899Z"}},"required":["org_id","user_id","email","host","count_app_views","count_app_saves","count_unique_apps","last_active"],"additionalProperties":false},"description":"An array of requested items"},"total_count":{"type":"number","description":"Total number of items in the response"},"next_token":{"type":"string","nullable":true,"description":"A token to retrieve the next page of items in the collection"},"has_more":{"type":"boolean","description":"Whether there are more items in the collection"}},"required":["success","data","total_count","next_token","has_more"],"description":"The user summaries for the organizations"}}}}}}},"/usage/user_details":{"get":{"summary":"The user details for the selected user and organizations","description":"Detailed usage by user for the selected organizations. Contains information about the user, including the breakdown of saves and views for apps in the specified time range. The API token must have the 'usage' scope.","tags":["Usage"],"parameters":[{"schema":{"type":"string","description":"A comma separated list of org ids to retrieve usage data for","example":"org_id1,org_id2"},"required":false,"name":"org_ids","in":"query"},{"schema":{"type":"string","description":"The start date of the date range","example":"2024-01-15"},"required":true,"name":"start_date","in":"query"},{"schema":{"type":"string","description":"The end date of the date range. If not specified, then minimum(start_date + 30 days, today - 1) is used.","example":"2024-01-30"},"required":false,"name":"end_date","in":"query"},{"schema":{"type":"string","description":"The email of the user to retrieve usage data for"},"required":true,"name":"email","in":"query"}],"responses":{"200":{"description":"The user details for the selected user email and organizations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"API request succeeded"},"data":{"type":"object","properties":{"overall_summary":{"type":"array","items":{"type":"object","properties":{"org_id":{"type":"string"},"user_id":{"type":"string"},"host":{"type":"string"},"count_app_saves":{"type":"number"},"count_app_views":{"type":"number"}},"required":["org_id","user_id","host","count_app_saves","count_app_views"],"additionalProperties":false}},"weekly_summary":{"type":"array","items":{"type":"object","properties":{"org_id":{"type":"string"},"weekly_data":{"type":"array","items":{"type":"object","properties":{"week":{"type":"string"},"count_app_saves":{"type":"number"},"count_app_views":{"type":"number"}},"required":["week","count_app_saves","count_app_views"]}}},"required":["org_id","weekly_data"],"additionalProperties":false}},"viewer_summary":{"type":"array","items":{"type":"object","properties":{"app_name":{"type":"string"},"org_id":{"type":"string"},"host":{"type":"string"},"count":{"type":"number"}},"required":["app_name","org_id","host","count"],"additionalProperties":false}},"editor_summary":{"type":"array","items":{"type":"object","properties":{"app_name":{"type":"string"},"org_id":{"type":"string"},"host":{"type":"string"},"count":{"type":"number"}},"required":["app_name","org_id","host","count"],"additionalProperties":false}}},"required":["overall_summary","weekly_summary","viewer_summary","editor_summary"]}},"required":["success","data"],"description":"The details about the users usage, such as edits and views on apps, for the organizations"}}}}}}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment