├── .github ├── CODEOWNERS ├── pull_request_template.md ├── repo_meta.yaml ├── workflows │ └── semgrep.yml └── workflows_disabled │ └── pr_commit_msg.yml ├── .gitignore ├── .pre-commit-config.yaml ├── LICENSE ├── Readme.md ├── collections ├── Cortex Analyst API.postman_collection.json ├── Cortex Inference API.postman_collection.json ├── Cortex Search REST API.postman_collection.json ├── Snowflake API Integration API.postman_collection.json ├── Snowflake Account API.postman_collection.json ├── Snowflake Alert API.postman_collection.json ├── Snowflake Catalog Integration API.postman_collection.json ├── Snowflake Compute Pools API.postman_collection.json ├── Snowflake Database API.postman_collection.json ├── Snowflake Database Role API.postman_collection.json ├── Snowflake Dynamic Table API.postman_collection.json ├── Snowflake Event Table API.postman_collection.json ├── Snowflake External Volume API.postman_collection.json ├── Snowflake Function API.postman_collection.json ├── Snowflake Grant API.postman_collection.json ├── Snowflake Iceberg Table API.postman_collection.json ├── Snowflake Image Repository API.postman_collection.json ├── Snowflake Managed Account API.postman_collection.json ├── Snowflake Network Policy API.postman_collection.json ├── Snowflake Notebook API.postman_collection.json ├── Snowflake Notification Integration API.postman_collection.json ├── Snowflake Pipe API.postman_collection.json ├── Snowflake Procedure API.postman_collection.json ├── Snowflake Result API.postman_collection.json ├── Snowflake Role API.postman_collection.json ├── Snowflake SQL API.postman_collection.json ├── Snowflake Schema API.postman_collection.json ├── Snowflake Services API.postman_collection.json ├── Snowflake Stage API.postman_collection.json ├── Snowflake Stream API.postman_collection.json ├── Snowflake Table API.postman_collection.json ├── Snowflake Task API.postman_collection.json ├── Snowflake User API.postman_collection.json ├── Snowflake User Defined Function API.postman_collection.json ├── Snowflake View API.postman_collection.json └── Snowflake Warehouse API.postman_collection.json └── specifications ├── account.yaml ├── alert.yaml ├── api-integration.yaml ├── catalog-integration.yaml ├── common.yaml ├── compute-pool.yaml ├── cortex-analyst.yaml ├── cortex-inference.yaml ├── cortex-search-service.yaml ├── database-role.yaml ├── database.yaml ├── dynamic-table.yaml ├── event-table.yaml ├── external-volume.yaml ├── function.yaml ├── grant.yaml ├── iceberg-table.yaml ├── image-repository.yaml ├── managed-account.yaml ├── network-policy.yaml ├── notebook.yaml ├── notification-integration.yaml ├── pipe.yaml ├── procedure.yaml ├── result.yaml ├── role.yaml ├── schema.yaml ├── service.yaml ├── sqlapi.yaml ├── stage.yaml ├── stream.yaml ├── table.yaml ├── task.yaml ├── user-defined-function.yaml ├── user.yaml ├── view.yaml └── warehouse.yaml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Each line is a file pattern followed by one or more owners. 2 | # The LAST matched pattern takes precedence, so 3 | 4 | # specific items should be placed later in the file. 5 | 6 | # Format for owners is 7 | # Username @user 8 | # Team @snowflakedb/team 9 | # Email email@snowflake.com 10 | 11 | # * @global-owner-of-last-resort 12 | 13 | # You can also use email addresses if you prefer. They'll be 14 | # used to look up users just like we do for commit author 15 | # emails. 16 | 17 | # *.foo foo@snowflake.com 18 | 19 | # Jenkinsfile @snowflakedb/repository-test-owner 20 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Overview 4 | 5 | SNOW-XXXXX 6 | 7 | 11 | 12 | ## Pre-review checklist 13 | 14 | - [ ] I attest that this change meets the bar for low risk without security requirements as defined in the [Accelerated Risk Assessment Criteria](https://developer-handbook.m1.us-west-2.aws.app.snowflake.com/docs/reference/security-review/accelerated-risk-assessment/#eligibility) and I have taken the [Risk Assessment Training in Workday](https://wd5.myworkday.com/snowflake/learning/course/6c613806284a1001f111fedf3e4e0000). 15 | - Checking this checkbox is mandatory if using the [Accelerated Risk Assessment](https://developer-handbook.m1.us-west-2.aws.app.snowflake.com/docs/reference/security-review/accelerated-risk-assessment/) to risk assess the changes in this Pull Request. 16 | - If this change does not meet the bar for low risk without security requirements (as confirmed by the peer reviewers of this pull request) then a [formal Risk Assessment](https://developer-handbook.m1.us-west-2.aws.app.snowflake.com/docs/reference/security-review/risk-assessment/) must be completed. Please note that a formal Risk Assessment will require you to spend extra time performing a security review for this change. Please account for this extra time earlier rather than later to avoid unnecessary delays in the release process. 17 | - [ ] This change has passed precommit 18 | - [ ] This change is TEST-ONLY 19 | - [ ] This change has been through a design review process and the test plan is signed off by the owner 20 | - [ ] This change is parameter protected 21 | - [ ] This change has code coverage for the new code added 22 | 23 | 24 | -------------------------------------------------------------------------------- /.github/repo_meta.yaml: -------------------------------------------------------------------------------- 1 | # Make sure this file is valid yaml, otherwise it will not be recognized by security audits 2 | 3 | # point_of_contact: the owner of this repository, can be a GitHub user or GitHub team. Do NOT use the '@' symbol 4 | point_of_contact: "@snowflakedb/snowapi" 5 | 6 | # production: whether this repository meets the criteria for being "production", see 7 | # go/production-repository-criteria for criteria 8 | # 9 | # If this is not a production repository, set this field to false and delete 10 | # the rest of the fields below. 11 | production: true 12 | 13 | # distributed: whether any source code in this repository is distributed outside of Snowflake 14 | # (e.g. driver and frontend software, or distributed to another vendor's marketplace) 15 | distributed: false 16 | 17 | # modified: whether any open source dependencies in this repository have been modified 18 | modified: false 19 | 20 | # legal_exception: whether Legal has granted an exception to the open source policy (go/opensource) for this repo 21 | # (only set as true if you have been given express permission by Legal) 22 | legal_exception: false 23 | 24 | # release_branches: list of release branch patterns, exact matches or regex is acceptable 25 | release_branches: 26 | - main 27 | - release.* 28 | 29 | # code_owners_file_present: whether there is a CODEOWNERS file in this repository 30 | code_owners_file_present: true 31 | 32 | # jira_project_issue_type: the Jira issuetype used to raise issues related to this repository in the 33 | # SNOW Jira project 34 | jira_project_issue_type: Bug 35 | 36 | # jira_area: the Jira area that raised issues should use 37 | jira_area: "Snowpark: Application Development Ecosystem" 38 | 39 | -------------------------------------------------------------------------------- /.github/workflows/semgrep.yml: -------------------------------------------------------------------------------- 1 | name: Run semgrep checks 2 | 3 | on: 4 | pull_request: 5 | branches: [main] 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | run-semgrep-reusable-workflow: 12 | uses: snowflakedb/reusable-workflows/.github/workflows/semgrep-v2.yml@main 13 | secrets: 14 | token: ${{ secrets.SEMGREP_APP_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows_disabled/pr_commit_msg.yml: -------------------------------------------------------------------------------- 1 | name: PR lint 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | - 'production_*' 8 | 9 | jobs: 10 | pr-lint: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: seferov/pr-lint-action@v1.0.4 14 | with: 15 | title-regex: '^.*SNOW-\d*.*' 16 | title-regex-flags: 'g' 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/c,c++,node,java,python,intellij,netbeans 2 | # Edit at https://www.gitignore.io/?templates=c,c++,node,java,python,intellij,netbeans 3 | .DS_Store 4 | 5 | ### C ### 6 | # Prerequisites 7 | *.d 8 | 9 | # Object files 10 | *.o 11 | *.ko 12 | *.obj 13 | *.elf 14 | 15 | # Linker output 16 | *.ilk 17 | *.map 18 | *.exp 19 | 20 | # Precompiled Headers 21 | *.gch 22 | *.pch 23 | 24 | # Libraries 25 | *.lib 26 | *.a 27 | *.la 28 | *.lo 29 | 30 | # Shared objects (inc. Windows DLLs) 31 | *.dll 32 | *.so 33 | *.so.* 34 | *.dylib 35 | 36 | # Executables 37 | *.exe 38 | *.out 39 | *.app 40 | *.i*86 41 | *.x86_64 42 | *.hex 43 | 44 | # Debug files 45 | *.dSYM/ 46 | *.su 47 | *.idb 48 | *.pdb 49 | 50 | # Kernel Module Compile Results 51 | *.mod* 52 | *.cmd 53 | .tmp_versions/ 54 | modules.order 55 | Module.symvers 56 | Mkfile.old 57 | dkms.conf 58 | 59 | ### C++ ### 60 | # Prerequisites 61 | 62 | # Compiled Object files 63 | *.slo 64 | 65 | # Precompiled Headers 66 | 67 | # Compiled Dynamic libraries 68 | 69 | # Fortran module files 70 | *.mod 71 | *.smod 72 | 73 | # Compiled Static libraries 74 | *.lai 75 | 76 | # Executables 77 | 78 | ### Intellij ### 79 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 80 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 81 | 82 | # User-specific stuff 83 | .idea/**/workspace.xml 84 | .idea/**/tasks.xml 85 | .idea/**/usage.statistics.xml 86 | .idea/**/dictionaries 87 | .idea/**/shelf 88 | 89 | # Generated files 90 | .idea/**/contentModel.xml 91 | 92 | # Sensitive or high-churn files 93 | .idea/**/dataSources/ 94 | .idea/**/dataSources.ids 95 | .idea/**/dataSources.local.xml 96 | .idea/**/sqlDataSources.xml 97 | .idea/**/dynamic.xml 98 | .idea/**/uiDesigner.xml 99 | .idea/**/dbnavigator.xml 100 | 101 | # Gradle 102 | .idea/**/gradle.xml 103 | .idea/**/libraries 104 | 105 | # Gradle and Maven with auto-import 106 | # When using Gradle or Maven with auto-import, you should exclude module files, 107 | # since they will be recreated, and may cause churn. Uncomment if using 108 | # auto-import. 109 | # .idea/modules.xml 110 | # .idea/*.iml 111 | # .idea/modules 112 | # *.iml 113 | # *.ipr 114 | 115 | # CMake 116 | cmake-build-*/ 117 | 118 | # Mongo Explorer plugin 119 | .idea/**/mongoSettings.xml 120 | 121 | # File-based project format 122 | *.iws 123 | 124 | # IntelliJ 125 | out/ 126 | 127 | # mpeltonen/sbt-idea plugin 128 | .idea_modules/ 129 | 130 | # JIRA plugin 131 | atlassian-ide-plugin.xml 132 | 133 | # Cursive Clojure plugin 134 | .idea/replstate.xml 135 | 136 | # Crashlytics plugin (for Android Studio and IntelliJ) 137 | com_crashlytics_export_strings.xml 138 | crashlytics.properties 139 | crashlytics-build.properties 140 | fabric.properties 141 | 142 | # Editor-based Rest Client 143 | .idea/httpRequests 144 | 145 | # Android studio 3.1+ serialized cache file 146 | .idea/caches/build_file_checksums.ser 147 | 148 | ### Intellij Patch ### 149 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 150 | 151 | # *.iml 152 | # modules.xml 153 | # .idea/misc.xml 154 | # *.ipr 155 | 156 | # Sonarlint plugin 157 | .idea/**/sonarlint/ 158 | 159 | # SonarQube Plugin 160 | .idea/**/sonarIssues.xml 161 | 162 | # Markdown Navigator plugin 163 | .idea/**/markdown-navigator.xml 164 | .idea/**/markdown-navigator/ 165 | 166 | ### Java ### 167 | # Compiled class file 168 | *.class 169 | 170 | # Log file 171 | *.log 172 | 173 | # BlueJ files 174 | *.ctxt 175 | 176 | # Mobile Tools for Java (J2ME) 177 | .mtj.tmp/ 178 | 179 | # Package Files # 180 | *.jar 181 | *.war 182 | *.nar 183 | *.ear 184 | *.zip 185 | *.tar.gz 186 | *.rar 187 | 188 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 189 | hs_err_pid* 190 | 191 | ### NetBeans ### 192 | **/nbproject/private/ 193 | **/nbproject/Makefile-*.mk 194 | **/nbproject/Package-*.bash 195 | build/ 196 | nbbuild/ 197 | dist/ 198 | nbdist/ 199 | .nb-gradle/ 200 | 201 | ### Node ### 202 | # Logs 203 | logs 204 | npm-debug.log* 205 | yarn-debug.log* 206 | yarn-error.log* 207 | lerna-debug.log* 208 | 209 | # Diagnostic reports (https://nodejs.org/api/report.html) 210 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 211 | 212 | # Runtime data 213 | pids 214 | *.pid 215 | *.seed 216 | *.pid.lock 217 | 218 | # Directory for instrumented libs generated by jscoverage/JSCover 219 | lib-cov 220 | 221 | # Coverage directory used by tools like istanbul 222 | coverage 223 | *.lcov 224 | 225 | # nyc test coverage 226 | .nyc_output 227 | 228 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 229 | .grunt 230 | 231 | # Bower dependency directory (https://bower.io/) 232 | bower_components 233 | 234 | # node-waf configuration 235 | .lock-wscript 236 | 237 | # Compiled binary addons (https://nodejs.org/api/addons.html) 238 | build/Release 239 | 240 | # Dependency directories 241 | node_modules/ 242 | jspm_packages/ 243 | 244 | # TypeScript v1 declaration files 245 | typings/ 246 | 247 | # TypeScript cache 248 | *.tsbuildinfo 249 | 250 | # Optional npm cache directory 251 | .npm 252 | 253 | # Optional eslint cache 254 | .eslintcache 255 | 256 | # Optional REPL history 257 | .node_repl_history 258 | 259 | # Output of 'npm pack' 260 | *.tgz 261 | 262 | # Yarn Integrity file 263 | .yarn-integrity 264 | 265 | # dotenv environment variables file 266 | .env 267 | .env.test 268 | 269 | # parcel-bundler cache (https://parceljs.org/) 270 | .cache 271 | 272 | # next.js build output 273 | .next 274 | 275 | # nuxt.js build output 276 | .nuxt 277 | 278 | # react / gatsby 279 | public/ 280 | 281 | # vuepress build output 282 | .vuepress/dist 283 | 284 | # Serverless directories 285 | .serverless/ 286 | 287 | # FuseBox cache 288 | .fusebox/ 289 | 290 | # DynamoDB Local files 291 | .dynamodb/ 292 | 293 | ### Python ### 294 | # Byte-compiled / optimized / DLL files 295 | __pycache__/ 296 | *.py[cod] 297 | *$py.class 298 | 299 | # C extensions 300 | 301 | # Distribution / packaging 302 | .Python 303 | develop-eggs/ 304 | downloads/ 305 | eggs/ 306 | .eggs/ 307 | lib/ 308 | lib64/ 309 | parts/ 310 | sdist/ 311 | var/ 312 | wheels/ 313 | pip-wheel-metadata/ 314 | share/python-wheels/ 315 | *.egg-info/ 316 | .installed.cfg 317 | *.egg 318 | MANIFEST 319 | 320 | # PyInstaller 321 | # Usually these files are written by a python script from a template 322 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 323 | *.manifest 324 | *.spec 325 | 326 | # Installer logs 327 | pip-log.txt 328 | pip-delete-this-directory.txt 329 | 330 | # Unit test / coverage reports 331 | htmlcov/ 332 | .tox/ 333 | .nox/ 334 | .coverage 335 | .coverage.* 336 | nosetests.xml 337 | coverage.xml 338 | *.cover 339 | .hypothesis/ 340 | .pytest_cache/ 341 | 342 | # Translations 343 | *.mo 344 | *.pot 345 | 346 | # Scrapy stuff: 347 | .scrapy 348 | 349 | # Sphinx documentation 350 | docs/_build/ 351 | 352 | # PyBuilder 353 | target/ 354 | 355 | # pyenv 356 | .python-version 357 | 358 | # pipenv 359 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 360 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 361 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 362 | # install all needed dependencies. 363 | #Pipfile.lock 364 | 365 | # celery beat schedule file 366 | celerybeat-schedule 367 | 368 | # SageMath parsed files 369 | *.sage.py 370 | 371 | # Spyder project settings 372 | .spyderproject 373 | .spyproject 374 | 375 | # Rope project settings 376 | .ropeproject 377 | 378 | # Mr Developer 379 | .mr.developer.cfg 380 | .project 381 | .pydevproject 382 | 383 | # mkdocs documentation 384 | /site 385 | 386 | # mypy 387 | .mypy_cache/ 388 | .dmypy.json 389 | dmypy.json 390 | 391 | # Pyre type checker 392 | .pyre/ 393 | 394 | # End of https://www.gitignore.io/api/c,c++,node,java,python,intellij,netbeans 395 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: git@github.com:snowflakedb/casec_precommit.git # SSH 3 | # - repo: https://github.com/snowflakedb/casec_precommit.git # HTTPS 4 | rev: v1.19 5 | hooks: 6 | - id: secret-scanner 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 Snowflake Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Snowflake REST APIs 2 | 3 | Snowflake REST APIs for resource management provide a set of endpoints that lets users programmatically interact with and control various resources within the Snowflake Data Cloud. 4 | 5 | The Snowflake REST APIs suite of APIs enables developers to build end-to-end automation and integration with Snowflake resources. These REST APIs are compliant with the OpenAPI specification. Snowflake REST APIs enable developers and partners to use the language of their choice to build integrations with Snowflake using the openAPI specifications. 6 | 7 | The Snowflake REST APIs supports the following resources through the corresponding APIs. The APIs support CREATE OR ALTER operations for applicable resources. 8 | 9 | More details at https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/snowflake-rest-api 10 | 11 | ## How to import Postman collections 12 | 13 | 1. Clone this repository 14 | 2. In Postman client, click *Import*, then choose import folder 15 | 3. Select `collections` as the import folder 16 | -------------------------------------------------------------------------------- /specifications/account.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake Account API 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Account API 8 | description: The Snowflake Account API is a REST API that you can use to access, 9 | update, and perform certain actions on Account resource in Snowflake. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/accounts: 16 | get: 17 | summary: List accounts. 18 | tags: 19 | - account 20 | description: Lists the accessible accounts. 21 | operationId: listAccounts 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/like 24 | - $ref: common.yaml#/components/parameters/showLimit 25 | - name: history 26 | in: query 27 | description: Optionally includes dropped accounts that have not yet been purged. 28 | schema: 29 | type: boolean 30 | responses: 31 | '200': 32 | description: Successful request. 33 | headers: 34 | X-Snowflake-Request-ID: 35 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 36 | content: 37 | application/json: 38 | schema: 39 | type: array 40 | items: 41 | $ref: '#/components/schemas/Account' 42 | '202': 43 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 44 | '400': 45 | $ref: common.yaml#/components/responses/400BadRequest 46 | '401': 47 | $ref: common.yaml#/components/responses/401Unauthorized 48 | '403': 49 | $ref: common.yaml#/components/responses/403Forbidden 50 | '404': 51 | $ref: common.yaml#/components/responses/404NotFound 52 | '405': 53 | $ref: common.yaml#/components/responses/405MethodNotAllowed 54 | '408': 55 | $ref: common.yaml#/components/responses/408RequestTimeout 56 | '409': 57 | $ref: common.yaml#/components/responses/409Conflict 58 | '410': 59 | $ref: common.yaml#/components/responses/410Gone 60 | '429': 61 | $ref: common.yaml#/components/responses/429LimitExceeded 62 | '500': 63 | $ref: common.yaml#/components/responses/500InternalServerError 64 | '503': 65 | $ref: common.yaml#/components/responses/503ServiceUnavailable 66 | '504': 67 | $ref: common.yaml#/components/responses/504GatewayTimeout 68 | post: 69 | summary: Create an account. 70 | tags: 71 | - account 72 | description: Creates a account. You must provide the full account definition 73 | when creating a account. 74 | operationId: createAccount 75 | requestBody: 76 | required: true 77 | content: 78 | application/json: 79 | schema: 80 | $ref: '#/components/schemas/Account' 81 | responses: 82 | '200': 83 | $ref: common.yaml#/components/responses/200SuccessResponse 84 | '202': 85 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 86 | '400': 87 | $ref: common.yaml#/components/responses/400BadRequest 88 | '401': 89 | $ref: common.yaml#/components/responses/401Unauthorized 90 | '403': 91 | $ref: common.yaml#/components/responses/403Forbidden 92 | '404': 93 | $ref: common.yaml#/components/responses/404NotFound 94 | '405': 95 | $ref: common.yaml#/components/responses/405MethodNotAllowed 96 | '408': 97 | $ref: common.yaml#/components/responses/408RequestTimeout 98 | '409': 99 | $ref: common.yaml#/components/responses/409Conflict 100 | '410': 101 | $ref: common.yaml#/components/responses/410Gone 102 | '429': 103 | $ref: common.yaml#/components/responses/429LimitExceeded 104 | '500': 105 | $ref: common.yaml#/components/responses/500InternalServerError 106 | '503': 107 | $ref: common.yaml#/components/responses/503ServiceUnavailable 108 | '504': 109 | $ref: common.yaml#/components/responses/504GatewayTimeout 110 | /api/v2/accounts/{name}: 111 | delete: 112 | summary: Delete an account. 113 | tags: 114 | - account 115 | description: Deletes the specified account. If you enable the `ifExists` parameter, 116 | the operation succeeds even if the account does not exist. Otherwise, a 404 117 | failure is returned if the account does not exist. if the drop is unsuccessful. 118 | operationId: deleteAccount 119 | parameters: 120 | - $ref: common.yaml#/components/parameters/name 121 | - $ref: common.yaml#/components/parameters/ifExists 122 | - name: gracePeriodInDays 123 | in: query 124 | description: "Specifies the number of days during which the account can be\ 125 | \ restored (\u201Cundropped\u201D). The minimum is 3 days and the maximum\ 126 | \ is 90 days." 127 | schema: 128 | type: integer 129 | required: true 130 | responses: 131 | '200': 132 | $ref: common.yaml#/components/responses/200SuccessResponse 133 | '202': 134 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 135 | '400': 136 | $ref: common.yaml#/components/responses/400BadRequest 137 | '401': 138 | $ref: common.yaml#/components/responses/401Unauthorized 139 | '403': 140 | $ref: common.yaml#/components/responses/403Forbidden 141 | '404': 142 | $ref: common.yaml#/components/responses/404NotFound 143 | '405': 144 | $ref: common.yaml#/components/responses/405MethodNotAllowed 145 | '408': 146 | $ref: common.yaml#/components/responses/408RequestTimeout 147 | '409': 148 | $ref: common.yaml#/components/responses/409Conflict 149 | '410': 150 | $ref: common.yaml#/components/responses/410Gone 151 | '429': 152 | $ref: common.yaml#/components/responses/429LimitExceeded 153 | '500': 154 | $ref: common.yaml#/components/responses/500InternalServerError 155 | '503': 156 | $ref: common.yaml#/components/responses/503ServiceUnavailable 157 | '504': 158 | $ref: common.yaml#/components/responses/504GatewayTimeout 159 | /api/v2/accounts/{name}:undrop: 160 | post: 161 | summary: Restore an account. 162 | tags: 163 | - account 164 | description: Restores a dropped account that has not yet been permanently deleted 165 | (a dropped account that is within its grace period). 166 | operationId: UndropAccount 167 | parameters: 168 | - $ref: common.yaml#/components/parameters/name 169 | responses: 170 | '200': 171 | $ref: common.yaml#/components/responses/200SuccessResponse 172 | '202': 173 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 174 | '400': 175 | $ref: common.yaml#/components/responses/400BadRequest 176 | '401': 177 | $ref: common.yaml#/components/responses/401Unauthorized 178 | '403': 179 | $ref: common.yaml#/components/responses/403Forbidden 180 | '404': 181 | $ref: common.yaml#/components/responses/404NotFound 182 | '405': 183 | $ref: common.yaml#/components/responses/405MethodNotAllowed 184 | '408': 185 | $ref: common.yaml#/components/responses/408RequestTimeout 186 | '409': 187 | $ref: common.yaml#/components/responses/409Conflict 188 | '410': 189 | $ref: common.yaml#/components/responses/410Gone 190 | '429': 191 | $ref: common.yaml#/components/responses/429LimitExceeded 192 | '500': 193 | $ref: common.yaml#/components/responses/500InternalServerError 194 | '503': 195 | $ref: common.yaml#/components/responses/503ServiceUnavailable 196 | '504': 197 | $ref: common.yaml#/components/responses/504GatewayTimeout 198 | components: 199 | schemas: 200 | Account: 201 | type: object 202 | description: Snowflake account object. 203 | properties: 204 | organization_name: 205 | type: string 206 | readOnly: true 207 | description: Name of the organization. 208 | name: 209 | $ref: ./common.yaml#/components/schemas/Identifier 210 | description: User-defined name that identifies an account within the organization. 211 | region_group: 212 | type: string 213 | description: Region group where the account is located. Note - This column 214 | is only displayed for organizations that span multiple region groups. 215 | region: 216 | type: string 217 | description: Snowflake Region where the account is located. A Snowflake 218 | Region is a distinct location within a cloud platform region that is isolated 219 | from other Snowflake Regions. A Snowflake Region can be either multi-tenant 220 | or single-tenant (for a Virtual Private Snowflake account). 221 | edition: 222 | type: string 223 | description: Snowflake Edition of the account. 224 | enum: 225 | - STANDARD 226 | - ENTERPRISE 227 | - BUSINESS_CRITICAL 228 | created_on: 229 | type: string 230 | format: date-time 231 | readOnly: true 232 | description: Date and time the account was created. 233 | account_url: 234 | type: string 235 | readOnly: true 236 | description: Preferred Snowflake account URL that includes the values of 237 | organization_name and account_name. 238 | account_locator: 239 | type: string 240 | readOnly: true 241 | description: System-assigned identifier of the acccount. 242 | account_locator_url: 243 | type: string 244 | readOnly: true 245 | description: Legacy Snowflake account URL syntax that includes the region_name 246 | and account_locator. 247 | managed_accounts: 248 | type: integer 249 | readOnly: true 250 | format: int64 251 | description: Indicates how many managed accounts have been created by the 252 | account. 253 | consumption_billing_entity_name: 254 | type: string 255 | readOnly: true 256 | description: Name of the consumption billing entity. 257 | marketplace_consumer_billing_entity_name: 258 | type: string 259 | readOnly: true 260 | description: Name of the marketplace consumer billing entity. 261 | marketplace_provider_billing_entity_name: 262 | type: string 263 | readOnly: true 264 | description: Name of the marketplace provider billing entity. 265 | old_account_url: 266 | type: string 267 | readOnly: true 268 | description: If the original account URL was saved when the account was 269 | renamed, provides the original URL. If the original account URL was dropped, 270 | the value is NULL even if the account was renamed 271 | comment: 272 | type: string 273 | description: Optional comment in which to store information related to the 274 | account. 275 | is_org_admin: 276 | type: boolean 277 | readOnly: true 278 | description: Indicates whether the ORGADMIN role is enabled in an account. 279 | If TRUE, the role is enabled. 280 | retention_time: 281 | type: integer 282 | readOnly: true 283 | description: Number of days that historical data is retained for Time Travel. 284 | dropped_on: 285 | type: string 286 | format: date-time 287 | readOnly: true 288 | nullable: true 289 | description: Date and time the account was dropped. 290 | scheduled_deletion_time: 291 | type: string 292 | format: date-time 293 | readOnly: true 294 | nullable: true 295 | description: Date and time when the account is scheduled to be permanently 296 | deleted. Accounts are deleted within one hour after the scheduled time. 297 | restored_on: 298 | type: string 299 | format: date-time 300 | readOnly: true 301 | nullable: true 302 | description: Date and time when the account was last restored. 303 | account_old_url_saved_on: 304 | type: string 305 | format: date-time 306 | readOnly: true 307 | description: If the original account URL was saved when the account was 308 | renamed, provides the date and time when the original account URL was 309 | saved. 310 | account_old_url_last_used: 311 | type: string 312 | format: date-time 313 | readOnly: true 314 | description: If the original account URL was saved when the account was 315 | renamed, indicates the last time the account was accessed using the original 316 | URL. 317 | organization_old_url: 318 | type: string 319 | readOnly: true 320 | description: "If the account\u2019s organization was changed in a way that\ 321 | \ created a new account URL and the original account URL was saved, provides\ 322 | \ the original account URL. If the original account URL was dropped, the\ 323 | \ value is NULL even if the organization changed." 324 | organization_old_url_saved_on: 325 | type: string 326 | readOnly: true 327 | format: date-time 328 | description: "If the account\u2019s organization was changed in a way that\ 329 | \ created a new account URL and the original account URL was saved, provides\ 330 | \ the date and time when the original account URL was saved." 331 | organization_old_url_last_used: 332 | type: string 333 | readOnly: true 334 | format: date-time 335 | description: "If the account\u2019s organization was changed in a way that\ 336 | \ created a new account URL and the original account URL was saved, indicates\ 337 | \ the last time the account was accessed using the original account URL." 338 | organization_URL_expiration_on: 339 | type: string 340 | format: date-time 341 | readOnly: true 342 | nullable: true 343 | description: "If the account\u2019s organization was changed in a way that\ 344 | \ created a new account URL and the original account URL was saved, provides\ 345 | \ the date and time when the original account URL will be dropped. Dropped\ 346 | \ URLs cannot be used to access the account." 347 | moved_on: 348 | type: string 349 | format: date-time 350 | readOnly: true 351 | nullable: true 352 | description: Date and time when the account was moved to a different organization. 353 | is_events_account: 354 | type: boolean 355 | readOnly: true 356 | description: Indicates whether an account is an events account. For more 357 | information, see Set up logging and event sharing for an application. 358 | moved_to_organization: 359 | type: string 360 | readOnly: true 361 | description: If the account was moved to a different organization, provides 362 | the name of that organization. 363 | admin_name: 364 | type: string 365 | description: Name of the account administrator. 366 | writeOnly: true 367 | nullable: true 368 | admin_password: 369 | type: string 370 | description: Password for the account administrator. 371 | writeOnly: true 372 | format: password 373 | admin_rsa_public_key: 374 | type: string 375 | description: RSA public key for the account administrator. 376 | writeOnly: true 377 | format: password 378 | admin_user_type: 379 | type: string 380 | description: User type of the account administrator. 381 | writeOnly: true 382 | first_name: 383 | type: string 384 | description: First name of the account administrator. 385 | writeOnly: true 386 | last_name: 387 | type: string 388 | description: Last name of the account administrator. 389 | writeOnly: true 390 | email: 391 | type: string 392 | description: Email address of the account administrator. 393 | writeOnly: true 394 | nullable: true 395 | must_change_password: 396 | type: boolean 397 | description: Indicates whether the account administrator must change the 398 | password at the next login. 399 | default: false 400 | writeOnly: true 401 | polaris: 402 | type: boolean 403 | description: Indicates whether the account is a Polaris account. 404 | default: false 405 | writeOnly: true 406 | required: 407 | - name 408 | - admin_name 409 | - email 410 | - edition 411 | securitySchemes: 412 | KeyPair: 413 | $ref: common.yaml#/components/securitySchemes/KeyPair 414 | ExternalOAuth: 415 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 416 | SnowflakeOAuth: 417 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 418 | security: 419 | - KeyPair: [] 420 | - ExternalOAuth: [] 421 | - SnowflakeOAuth: [] 422 | tags: 423 | - name: account 424 | -------------------------------------------------------------------------------- /specifications/alert.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Alert API 8 | description: The Snowflake Alert API is a REST API that you can use to access, update, 9 | and perform certain actions on Alert resource in a Snowflake database. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/databases/{database}/schemas/{schema}/alerts: 16 | get: 17 | summary: List alerts 18 | tags: 19 | - alert 20 | description: List alerts 21 | operationId: listAlerts 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/database 24 | - $ref: common.yaml#/components/parameters/schema 25 | - $ref: common.yaml#/components/parameters/like 26 | - $ref: common.yaml#/components/parameters/startsWith 27 | - $ref: common.yaml#/components/parameters/showLimit 28 | - $ref: common.yaml#/components/parameters/fromName 29 | responses: 30 | '200': 31 | description: successful 32 | headers: 33 | X-Snowflake-Request-ID: 34 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 35 | content: 36 | application/json: 37 | schema: 38 | type: array 39 | items: 40 | $ref: '#/components/schemas/Alert' 41 | '202': 42 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 43 | '400': 44 | $ref: common.yaml#/components/responses/400BadRequest 45 | '401': 46 | $ref: common.yaml#/components/responses/401Unauthorized 47 | '403': 48 | $ref: common.yaml#/components/responses/403Forbidden 49 | '404': 50 | $ref: common.yaml#/components/responses/404NotFound 51 | '405': 52 | $ref: common.yaml#/components/responses/405MethodNotAllowed 53 | '408': 54 | $ref: common.yaml#/components/responses/408RequestTimeout 55 | '409': 56 | $ref: common.yaml#/components/responses/409Conflict 57 | '410': 58 | $ref: common.yaml#/components/responses/410Gone 59 | '429': 60 | $ref: common.yaml#/components/responses/429LimitExceeded 61 | '500': 62 | $ref: common.yaml#/components/responses/500InternalServerError 63 | '503': 64 | $ref: common.yaml#/components/responses/503ServiceUnavailable 65 | '504': 66 | $ref: common.yaml#/components/responses/504GatewayTimeout 67 | post: 68 | summary: Create an alert 69 | tags: 70 | - alert 71 | description: Create an alert 72 | operationId: createAlert 73 | parameters: 74 | - $ref: common.yaml#/components/parameters/database 75 | - $ref: common.yaml#/components/parameters/schema 76 | - $ref: common.yaml#/components/parameters/createMode 77 | responses: 78 | '200': 79 | $ref: common.yaml#/components/responses/200SuccessResponse 80 | '202': 81 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 82 | '400': 83 | $ref: common.yaml#/components/responses/400BadRequest 84 | '401': 85 | $ref: common.yaml#/components/responses/401Unauthorized 86 | '403': 87 | $ref: common.yaml#/components/responses/403Forbidden 88 | '404': 89 | $ref: common.yaml#/components/responses/404NotFound 90 | '405': 91 | $ref: common.yaml#/components/responses/405MethodNotAllowed 92 | '408': 93 | $ref: common.yaml#/components/responses/408RequestTimeout 94 | '409': 95 | $ref: common.yaml#/components/responses/409Conflict 96 | '410': 97 | $ref: common.yaml#/components/responses/410Gone 98 | '429': 99 | $ref: common.yaml#/components/responses/429LimitExceeded 100 | '500': 101 | $ref: common.yaml#/components/responses/500InternalServerError 102 | '503': 103 | $ref: common.yaml#/components/responses/503ServiceUnavailable 104 | '504': 105 | $ref: common.yaml#/components/responses/504GatewayTimeout 106 | requestBody: 107 | required: true 108 | content: 109 | application/json: 110 | schema: 111 | $ref: '#/components/schemas/Alert' 112 | /api/v2/databases/{database}/schemas/{schema}/alerts/{name}: 113 | get: 114 | summary: Fetch an alert 115 | tags: 116 | - alert 117 | description: Fetch an alert 118 | operationId: fetchAlert 119 | parameters: 120 | - $ref: common.yaml#/components/parameters/database 121 | - $ref: common.yaml#/components/parameters/schema 122 | - $ref: common.yaml#/components/parameters/name 123 | responses: 124 | '200': 125 | description: successful 126 | headers: 127 | X-Snowflake-Request-ID: 128 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 129 | content: 130 | application/json: 131 | schema: 132 | $ref: '#/components/schemas/Alert' 133 | '202': 134 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 135 | '400': 136 | $ref: common.yaml#/components/responses/400BadRequest 137 | '401': 138 | $ref: common.yaml#/components/responses/401Unauthorized 139 | '403': 140 | $ref: common.yaml#/components/responses/403Forbidden 141 | '404': 142 | $ref: common.yaml#/components/responses/404NotFound 143 | '405': 144 | $ref: common.yaml#/components/responses/405MethodNotAllowed 145 | '408': 146 | $ref: common.yaml#/components/responses/408RequestTimeout 147 | '409': 148 | $ref: common.yaml#/components/responses/409Conflict 149 | '410': 150 | $ref: common.yaml#/components/responses/410Gone 151 | '429': 152 | $ref: common.yaml#/components/responses/429LimitExceeded 153 | '500': 154 | $ref: common.yaml#/components/responses/500InternalServerError 155 | '503': 156 | $ref: common.yaml#/components/responses/503ServiceUnavailable 157 | '504': 158 | $ref: common.yaml#/components/responses/504GatewayTimeout 159 | delete: 160 | summary: Delete an alert 161 | tags: 162 | - alert 163 | description: Delete an alert 164 | operationId: deleteAlert 165 | parameters: 166 | - $ref: common.yaml#/components/parameters/database 167 | - $ref: common.yaml#/components/parameters/schema 168 | - $ref: common.yaml#/components/parameters/name 169 | - $ref: common.yaml#/components/parameters/ifExists 170 | responses: 171 | '200': 172 | $ref: common.yaml#/components/responses/200SuccessResponse 173 | '202': 174 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 175 | '400': 176 | $ref: common.yaml#/components/responses/400BadRequest 177 | '401': 178 | $ref: common.yaml#/components/responses/401Unauthorized 179 | '403': 180 | $ref: common.yaml#/components/responses/403Forbidden 181 | '404': 182 | $ref: common.yaml#/components/responses/404NotFound 183 | '405': 184 | $ref: common.yaml#/components/responses/405MethodNotAllowed 185 | '408': 186 | $ref: common.yaml#/components/responses/408RequestTimeout 187 | '409': 188 | $ref: common.yaml#/components/responses/409Conflict 189 | '410': 190 | $ref: common.yaml#/components/responses/410Gone 191 | '429': 192 | $ref: common.yaml#/components/responses/429LimitExceeded 193 | '500': 194 | $ref: common.yaml#/components/responses/500InternalServerError 195 | '503': 196 | $ref: common.yaml#/components/responses/503ServiceUnavailable 197 | '504': 198 | $ref: common.yaml#/components/responses/504GatewayTimeout 199 | /api/v2/databases/{database}/schemas/{schema}/alerts/{name}:clone: 200 | post: 201 | summary: Create a new alert by cloning from the specified resource 202 | tags: 203 | - alert 204 | description: Create a new alert by cloning from the specified resource 205 | operationId: cloneAlert 206 | parameters: 207 | - $ref: common.yaml#/components/parameters/database 208 | - $ref: common.yaml#/components/parameters/schema 209 | - $ref: common.yaml#/components/parameters/name 210 | - $ref: common.yaml#/components/parameters/createMode 211 | - name: targetDatabase 212 | description: Database of the newly created resource. Defaults to the source's 213 | database 214 | in: query 215 | required: true 216 | schema: 217 | type: string 218 | - name: targetSchema 219 | description: Schema of the newly created resource. Defaults to the source's 220 | schema 221 | in: query 222 | required: true 223 | schema: 224 | type: string 225 | responses: 226 | '200': 227 | $ref: common.yaml#/components/responses/200SuccessResponse 228 | '202': 229 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 230 | '400': 231 | $ref: common.yaml#/components/responses/400BadRequest 232 | '401': 233 | $ref: common.yaml#/components/responses/401Unauthorized 234 | '403': 235 | $ref: common.yaml#/components/responses/403Forbidden 236 | '404': 237 | $ref: common.yaml#/components/responses/404NotFound 238 | '405': 239 | $ref: common.yaml#/components/responses/405MethodNotAllowed 240 | '408': 241 | $ref: common.yaml#/components/responses/408RequestTimeout 242 | '409': 243 | $ref: common.yaml#/components/responses/409Conflict 244 | '410': 245 | $ref: common.yaml#/components/responses/410Gone 246 | '429': 247 | $ref: common.yaml#/components/responses/429LimitExceeded 248 | '500': 249 | $ref: common.yaml#/components/responses/500InternalServerError 250 | '503': 251 | $ref: common.yaml#/components/responses/503ServiceUnavailable 252 | '504': 253 | $ref: common.yaml#/components/responses/504GatewayTimeout 254 | requestBody: 255 | required: true 256 | content: 257 | application/json: 258 | schema: 259 | $ref: '#/components/schemas/AlertClone' 260 | /api/v2/databases/{database}/schemas/{schema}/alerts/{name}:execute: 261 | post: 262 | summary: Execute an alert 263 | tags: 264 | - alert 265 | description: Execute an alert 266 | operationId: executeAlert 267 | parameters: 268 | - $ref: common.yaml#/components/parameters/database 269 | - $ref: common.yaml#/components/parameters/schema 270 | - $ref: common.yaml#/components/parameters/name 271 | responses: 272 | '200': 273 | $ref: common.yaml#/components/responses/200SuccessResponse 274 | '202': 275 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 276 | '400': 277 | $ref: common.yaml#/components/responses/400BadRequest 278 | '401': 279 | $ref: common.yaml#/components/responses/401Unauthorized 280 | '403': 281 | $ref: common.yaml#/components/responses/403Forbidden 282 | '404': 283 | $ref: common.yaml#/components/responses/404NotFound 284 | '405': 285 | $ref: common.yaml#/components/responses/405MethodNotAllowed 286 | '408': 287 | $ref: common.yaml#/components/responses/408RequestTimeout 288 | '409': 289 | $ref: common.yaml#/components/responses/409Conflict 290 | '410': 291 | $ref: common.yaml#/components/responses/410Gone 292 | '429': 293 | $ref: common.yaml#/components/responses/429LimitExceeded 294 | '500': 295 | $ref: common.yaml#/components/responses/500InternalServerError 296 | '503': 297 | $ref: common.yaml#/components/responses/503ServiceUnavailable 298 | '504': 299 | $ref: common.yaml#/components/responses/504GatewayTimeout 300 | components: 301 | schemas: 302 | Alert: 303 | type: object 304 | description: A Snowflake alert 305 | properties: 306 | name: 307 | type: string 308 | description: Name of the alert 309 | comment: 310 | type: string 311 | description: user comment associated to an object in the dictionary 312 | schedule: 313 | $ref: '#/components/schemas/Schedule' 314 | description: The schedule the alert runs under 315 | warehouse: 316 | type: string 317 | description: The warehouse the alert runs in 318 | condition: 319 | type: string 320 | description: The SQL statement that must be evaluated to determine whether 321 | to trigger the alert 322 | action: 323 | type: string 324 | description: The SQL statement to execute when the alert is triggered 325 | created_on: 326 | type: string 327 | format: date-time 328 | readOnly: true 329 | description: Date and time when the alert was created. 330 | database_name: 331 | type: string 332 | readOnly: true 333 | description: Database in which the alert is stored 334 | schema_name: 335 | type: string 336 | readOnly: true 337 | description: Schema in which the alert is stored 338 | owner: 339 | type: string 340 | readOnly: true 341 | description: Role that owns the alert 342 | owner_role_type: 343 | type: string 344 | readOnly: true 345 | description: The type of role that owns the alert 346 | state: 347 | type: string 348 | readOnly: true 349 | description: The current state of the alert 350 | required: 351 | - name 352 | - schedule 353 | - condition 354 | - action 355 | Schedule: 356 | type: object 357 | properties: 358 | schedule_type: 359 | type: string 360 | description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE 361 | required: 362 | - schedule_type 363 | discriminator: 364 | propertyName: schedule_type 365 | mapping: 366 | CRON_TYPE: CronSchedule 367 | SCHEDULE_TYPE: MinutesSchedule 368 | CronSchedule: 369 | type: object 370 | allOf: 371 | - $ref: '#/components/schemas/Schedule' 372 | properties: 373 | cron_expr: 374 | type: string 375 | description: A cron expression for the scheduled execution. 376 | timezone: 377 | type: string 378 | description: The time zone for the schedule. 379 | required: 380 | - cron_expr 381 | - timezone 382 | MinutesSchedule: 383 | type: object 384 | allOf: 385 | - $ref: '#/components/schemas/Schedule' 386 | properties: 387 | minutes: 388 | type: integer 389 | required: 390 | - minutes 391 | AlertClone: 392 | type: object 393 | properties: 394 | name: 395 | type: string 396 | description: Name of the alert 397 | point_of_time: 398 | $ref: '#/components/schemas/PointOfTime' 399 | description: 'Type of the point of time. Possible values include: 400 | 401 | 402 | - `timestamp`: Exact time using the standard timezone format. Example: 403 | `2023-09-15 10:59:43`. 404 | 405 | - `offset`: Interval relative to ''now.'' Example: `1 day`. 406 | 407 | - `statement`: ID of a query statement to use as the reference point for 408 | Time 409 | Travel. 410 | 411 | 412 | For more information, see https://docs.snowflake.com/en/sql-reference/data-types-datetime. 413 | 414 | ' 415 | required: 416 | - name 417 | PointOfTime: 418 | type: object 419 | properties: 420 | point_of_time_type: 421 | type: string 422 | description: 'Type of the point of time. Possible values include: timestamp, 423 | offset, statement' 424 | reference: 425 | type: string 426 | enum: 427 | - at 428 | - before 429 | x-enum-varnames: 430 | - AT 431 | - BEFORE 432 | description: Relation to the point of time. Currently, the API supports 433 | `at` and `before` 434 | required: 435 | - point_of_time_type 436 | - reference 437 | discriminator: 438 | propertyName: point_of_time_type 439 | mapping: 440 | timestamp: PointOfTimeTimestamp 441 | offset: PointOfTimeOffset 442 | statement: PointOfTimeStatement 443 | PointOfTimeTimestamp: 444 | type: object 445 | allOf: 446 | - $ref: '#/components/schemas/PointOfTime' 447 | properties: 448 | timestamp: 449 | type: string 450 | description: Timestamp of the point of time. 451 | required: 452 | - timestamp 453 | PointOfTimeOffset: 454 | type: object 455 | allOf: 456 | - $ref: '#/components/schemas/PointOfTime' 457 | properties: 458 | offset: 459 | type: string 460 | description: Point of time identified by an offset in reference to the current 461 | time, such as `10 min`. 462 | required: 463 | - offset 464 | PointOfTimeStatement: 465 | type: object 466 | allOf: 467 | - $ref: '#/components/schemas/PointOfTime' 468 | properties: 469 | statement: 470 | type: string 471 | description: Statement of the point of time. 472 | required: 473 | - statement 474 | securitySchemes: 475 | KeyPair: 476 | $ref: common.yaml#/components/securitySchemes/KeyPair 477 | ExternalOAuth: 478 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 479 | SnowflakeOAuth: 480 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 481 | security: 482 | - KeyPair: [] 483 | - ExternalOAuth: [] 484 | - SnowflakeOAuth: [] 485 | -------------------------------------------------------------------------------- /specifications/api-integration.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake API Integration API 8 | description: The Snowflake API Integration API is a REST API that you can use to 9 | access, update, and perform certain actions on API Integration resource in a Snowflake 10 | database. 11 | contact: 12 | name: Snowflake, Inc. 13 | url: https://snowflake.com 14 | email: support@snowflake.com 15 | paths: 16 | /api/v2/api-integrations: 17 | get: 18 | summary: List API integrations 19 | tags: 20 | - api-integration 21 | description: List API integrations 22 | operationId: listAPIIntegrations 23 | parameters: 24 | - $ref: common.yaml#/components/parameters/like 25 | responses: 26 | '200': 27 | description: successful 28 | headers: 29 | X-Snowflake-Request-ID: 30 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 31 | Link: 32 | $ref: common.yaml#/components/headers/Link 33 | content: 34 | application/json: 35 | schema: 36 | type: array 37 | items: 38 | $ref: '#/components/schemas/ApiIntegration' 39 | '202': 40 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 41 | '400': 42 | $ref: common.yaml#/components/responses/400BadRequest 43 | '401': 44 | $ref: common.yaml#/components/responses/401Unauthorized 45 | '403': 46 | $ref: common.yaml#/components/responses/403Forbidden 47 | '404': 48 | $ref: common.yaml#/components/responses/404NotFound 49 | '405': 50 | $ref: common.yaml#/components/responses/405MethodNotAllowed 51 | '408': 52 | $ref: common.yaml#/components/responses/408RequestTimeout 53 | '409': 54 | $ref: common.yaml#/components/responses/409Conflict 55 | '410': 56 | $ref: common.yaml#/components/responses/410Gone 57 | '429': 58 | $ref: common.yaml#/components/responses/429LimitExceeded 59 | '500': 60 | $ref: common.yaml#/components/responses/500InternalServerError 61 | '503': 62 | $ref: common.yaml#/components/responses/503ServiceUnavailable 63 | '504': 64 | $ref: common.yaml#/components/responses/504GatewayTimeout 65 | post: 66 | summary: Create an API integration 67 | tags: 68 | - api-integration 69 | description: Create an API integration 70 | operationId: createAPIIntegration 71 | parameters: 72 | - $ref: common.yaml#/components/parameters/createMode 73 | responses: 74 | '200': 75 | $ref: common.yaml#/components/responses/200SuccessResponse 76 | '202': 77 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 78 | '400': 79 | $ref: common.yaml#/components/responses/400BadRequest 80 | '401': 81 | $ref: common.yaml#/components/responses/401Unauthorized 82 | '403': 83 | $ref: common.yaml#/components/responses/403Forbidden 84 | '404': 85 | $ref: common.yaml#/components/responses/404NotFound 86 | '405': 87 | $ref: common.yaml#/components/responses/405MethodNotAllowed 88 | '408': 89 | $ref: common.yaml#/components/responses/408RequestTimeout 90 | '409': 91 | $ref: common.yaml#/components/responses/409Conflict 92 | '410': 93 | $ref: common.yaml#/components/responses/410Gone 94 | '429': 95 | $ref: common.yaml#/components/responses/429LimitExceeded 96 | '500': 97 | $ref: common.yaml#/components/responses/500InternalServerError 98 | '503': 99 | $ref: common.yaml#/components/responses/503ServiceUnavailable 100 | '504': 101 | $ref: common.yaml#/components/responses/504GatewayTimeout 102 | requestBody: 103 | required: true 104 | content: 105 | application/json: 106 | schema: 107 | $ref: '#/components/schemas/ApiIntegration' 108 | /api/v2/api-integrations/{name}: 109 | get: 110 | summary: Fetch an API integration 111 | tags: 112 | - api-integration 113 | description: Fetch an API integration 114 | operationId: fetchAPIIntegration 115 | parameters: 116 | - $ref: common.yaml#/components/parameters/name 117 | responses: 118 | '200': 119 | description: successful 120 | headers: 121 | X-Snowflake-Request-ID: 122 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 123 | Link: 124 | $ref: common.yaml#/components/headers/Link 125 | content: 126 | application/json: 127 | schema: 128 | $ref: '#/components/schemas/ApiIntegration' 129 | '202': 130 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 131 | '400': 132 | $ref: common.yaml#/components/responses/400BadRequest 133 | '401': 134 | $ref: common.yaml#/components/responses/401Unauthorized 135 | '403': 136 | $ref: common.yaml#/components/responses/403Forbidden 137 | '404': 138 | $ref: common.yaml#/components/responses/404NotFound 139 | '405': 140 | $ref: common.yaml#/components/responses/405MethodNotAllowed 141 | '408': 142 | $ref: common.yaml#/components/responses/408RequestTimeout 143 | '409': 144 | $ref: common.yaml#/components/responses/409Conflict 145 | '410': 146 | $ref: common.yaml#/components/responses/410Gone 147 | '429': 148 | $ref: common.yaml#/components/responses/429LimitExceeded 149 | '500': 150 | $ref: common.yaml#/components/responses/500InternalServerError 151 | '503': 152 | $ref: common.yaml#/components/responses/503ServiceUnavailable 153 | '504': 154 | $ref: common.yaml#/components/responses/504GatewayTimeout 155 | put: 156 | summary: Create an (or alter an existing) API integration 157 | tags: 158 | - api-integration 159 | description: Create an (or alter an existing) API integration. Note that API_KEY 160 | is not currently altered by this operation and is supported for a newly-created 161 | object only. Unsetting API_BLOCKED_PREFIXES is also unsupported. 162 | operationId: createOrAlterAPIIntegration 163 | parameters: 164 | - $ref: common.yaml#/components/parameters/name 165 | responses: 166 | '200': 167 | $ref: common.yaml#/components/responses/200SuccessResponse 168 | '202': 169 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 170 | '400': 171 | $ref: common.yaml#/components/responses/400BadRequest 172 | '401': 173 | $ref: common.yaml#/components/responses/401Unauthorized 174 | '403': 175 | $ref: common.yaml#/components/responses/403Forbidden 176 | '404': 177 | $ref: common.yaml#/components/responses/404NotFound 178 | '405': 179 | $ref: common.yaml#/components/responses/405MethodNotAllowed 180 | '500': 181 | $ref: common.yaml#/components/responses/500InternalServerError 182 | '503': 183 | $ref: common.yaml#/components/responses/503ServiceUnavailable 184 | '504': 185 | $ref: common.yaml#/components/responses/504GatewayTimeout 186 | requestBody: 187 | required: true 188 | content: 189 | application/json: 190 | schema: 191 | $ref: '#/components/schemas/ApiIntegration' 192 | delete: 193 | summary: Delete an API integration 194 | tags: 195 | - api-integration 196 | description: Delete an API integration 197 | operationId: deleteAPIIntegration 198 | parameters: 199 | - $ref: common.yaml#/components/parameters/name 200 | - $ref: common.yaml#/components/parameters/ifExists 201 | responses: 202 | '200': 203 | $ref: common.yaml#/components/responses/200SuccessResponse 204 | '202': 205 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 206 | '400': 207 | $ref: common.yaml#/components/responses/400BadRequest 208 | '401': 209 | $ref: common.yaml#/components/responses/401Unauthorized 210 | '403': 211 | $ref: common.yaml#/components/responses/403Forbidden 212 | '404': 213 | $ref: common.yaml#/components/responses/404NotFound 214 | '405': 215 | $ref: common.yaml#/components/responses/405MethodNotAllowed 216 | '408': 217 | $ref: common.yaml#/components/responses/408RequestTimeout 218 | '409': 219 | $ref: common.yaml#/components/responses/409Conflict 220 | '410': 221 | $ref: common.yaml#/components/responses/410Gone 222 | '429': 223 | $ref: common.yaml#/components/responses/429LimitExceeded 224 | '500': 225 | $ref: common.yaml#/components/responses/500InternalServerError 226 | '503': 227 | $ref: common.yaml#/components/responses/503ServiceUnavailable 228 | '504': 229 | $ref: common.yaml#/components/responses/504GatewayTimeout 230 | components: 231 | schemas: 232 | ApiIntegration: 233 | type: object 234 | description: A Snowflake API integration object. 235 | properties: 236 | name: 237 | type: string 238 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 239 | description: Name of the API integration. 240 | api_hook: 241 | $ref: '#/components/schemas/ApiHook' 242 | api_allowed_prefixes: 243 | type: array 244 | items: 245 | type: string 246 | description: A comma-separated list of endpoints and resources that Snowflake 247 | can access. 248 | api_blocked_prefixes: 249 | type: array 250 | items: 251 | type: string 252 | description: A comma-separated list of endpoints and resources that are 253 | not allowed to be called from Snowflake. 254 | nullable: true 255 | enabled: 256 | type: boolean 257 | description: Whether the API integration is enabled. 258 | comment: 259 | type: string 260 | description: Comment for the API integration. 261 | nullable: true 262 | created_on: 263 | type: string 264 | format: date-time 265 | readOnly: true 266 | description: Date and time when the API integration was created. 267 | required: 268 | - name 269 | - api_hook 270 | - api_allowed_prefixes 271 | - enabled 272 | ApiHook: 273 | type: object 274 | properties: 275 | type: 276 | type: string 277 | enum: 278 | - AWS 279 | - AZURE 280 | - GC 281 | - GIT 282 | description: Type of ApiHook, can be AWS, AZURE, GC or GIT. 283 | required: 284 | - type 285 | discriminator: 286 | propertyName: type 287 | mapping: 288 | AWS: AwsHook 289 | AZURE: AzureHook 290 | GC: GoogleCloudHook 291 | GIT: GitHook 292 | AwsHook: 293 | type: object 294 | allOf: 295 | - $ref: '#/components/schemas/ApiHook' 296 | properties: 297 | api_provider: 298 | type: string 299 | enum: 300 | - AWS_API_GATEWAY 301 | - AWS_PRIVATE_API_GATEWAY 302 | - AWS_GOV_API_GATEWAY 303 | - AWS_GOV_PRIVATE_API_GATEWAY 304 | api_aws_role_arn: 305 | type: string 306 | description: The ARN (Amazon resource name) of the IAM role. 307 | api_key: 308 | $ref: '#/components/schemas/ApiKey' 309 | required: 310 | - api_provider 311 | - api_aws_role_arn 312 | AzureHook: 313 | type: object 314 | allOf: 315 | - $ref: '#/components/schemas/ApiHook' 316 | properties: 317 | api_provider: 318 | type: string 319 | enum: 320 | - AZURE_API_MANAGEMENT 321 | - AZURE_PRIVATE_API_MANAGEMENT 322 | azure_tenant_id: 323 | type: string 324 | description: The ID of the Office 365 tenant that all Azure API Management 325 | instances belong to. 326 | azure_ad_application_id: 327 | type: string 328 | description: The application ID of the Azure Active Directory application. 329 | api_key: 330 | $ref: '#/components/schemas/ApiKey' 331 | required: 332 | - api_provider 333 | - azure_tenant_id 334 | - azure_ad_application_id 335 | GoogleCloudHook: 336 | type: object 337 | allOf: 338 | - $ref: '#/components/schemas/ApiHook' 339 | properties: 340 | api_provider: 341 | type: string 342 | enum: 343 | - GOOGLE_API_GATEWAY 344 | google_audience: 345 | type: string 346 | description: Used as an audience claim when generating the JTW (JSON Web 347 | Token) to authenticate to the Google API Gateway. 348 | api_key: 349 | $ref: '#/components/schemas/ApiKey' 350 | required: 351 | - api_provider 352 | - google_audience 353 | GitHook: 354 | type: object 355 | allOf: 356 | - $ref: '#/components/schemas/ApiHook' 357 | properties: 358 | allow_any_secret: 359 | type: boolean 360 | default: false 361 | description: Whether to allow any Snowflake secret when accessing the Git 362 | repository. This setting is ignored if allowed_authentication_secrets 363 | is present. 364 | allowed_authentication_secrets: 365 | type: array 366 | items: 367 | type: string 368 | description: A comma-separated list of fully-qualified Snowflake secret 369 | names that UDF or procedure handler code can use when accessing the Git 370 | repository. 371 | nullable: true 372 | allowed_api_authentication_integrations: 373 | type: array 374 | items: 375 | type: string 376 | description: A comma-separated list of Snowflake security integration names 377 | that UDF or procedure handler code can use when accessing the Git repository. 378 | If empty, allow no integrations. 379 | nullable: true 380 | ApiKey: 381 | type: string 382 | description: An alphanumeric string that is used to identify API clients and 383 | control access to the API, also called a subscription key. 384 | nullable: true 385 | securitySchemes: 386 | KeyPair: 387 | $ref: common.yaml#/components/securitySchemes/KeyPair 388 | ExternalOAuth: 389 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 390 | SnowflakeOAuth: 391 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 392 | security: 393 | - KeyPair: [] 394 | - ExternalOAuth: [] 395 | - SnowflakeOAuth: [] 396 | -------------------------------------------------------------------------------- /specifications/catalog-integration.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Catalog Integration API 8 | description: The Snowflake Catalog Integration API is a REST API that you can use 9 | to access, update, and perform certain actions on Catalog Integration resource 10 | in a Snowflake database. 11 | contact: 12 | name: Snowflake, Inc. 13 | url: https://snowflake.com 14 | email: support@snowflake.com 15 | paths: 16 | /api/v2/catalog-integrations: 17 | get: 18 | summary: List catalog integrations. 19 | tags: 20 | - catalog-integration 21 | description: List catalog integrations. 22 | operationId: listCatalogIntegrations 23 | parameters: 24 | - $ref: common.yaml#/components/parameters/like 25 | responses: 26 | '200': 27 | description: successful 28 | headers: 29 | X-Snowflake-Request-ID: 30 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 31 | content: 32 | application/json: 33 | schema: 34 | type: array 35 | items: 36 | $ref: '#/components/schemas/CatalogIntegration' 37 | '202': 38 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 39 | '400': 40 | $ref: common.yaml#/components/responses/400BadRequest 41 | '401': 42 | $ref: common.yaml#/components/responses/401Unauthorized 43 | '403': 44 | $ref: common.yaml#/components/responses/403Forbidden 45 | '404': 46 | $ref: common.yaml#/components/responses/404NotFound 47 | '405': 48 | $ref: common.yaml#/components/responses/405MethodNotAllowed 49 | '408': 50 | $ref: common.yaml#/components/responses/408RequestTimeout 51 | '409': 52 | $ref: common.yaml#/components/responses/409Conflict 53 | '410': 54 | $ref: common.yaml#/components/responses/410Gone 55 | '429': 56 | $ref: common.yaml#/components/responses/429LimitExceeded 57 | '500': 58 | $ref: common.yaml#/components/responses/500InternalServerError 59 | '503': 60 | $ref: common.yaml#/components/responses/503ServiceUnavailable 61 | '504': 62 | $ref: common.yaml#/components/responses/504GatewayTimeout 63 | post: 64 | summary: Create a catalog integration. 65 | tags: 66 | - catalog-integration 67 | description: Create a catalog integration. 68 | operationId: createCatalogIntegration 69 | parameters: 70 | - $ref: common.yaml#/components/parameters/createMode 71 | responses: 72 | '200': 73 | $ref: common.yaml#/components/responses/200SuccessResponse 74 | '202': 75 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 76 | '400': 77 | $ref: common.yaml#/components/responses/400BadRequest 78 | '401': 79 | $ref: common.yaml#/components/responses/401Unauthorized 80 | '403': 81 | $ref: common.yaml#/components/responses/403Forbidden 82 | '404': 83 | $ref: common.yaml#/components/responses/404NotFound 84 | '405': 85 | $ref: common.yaml#/components/responses/405MethodNotAllowed 86 | '408': 87 | $ref: common.yaml#/components/responses/408RequestTimeout 88 | '409': 89 | $ref: common.yaml#/components/responses/409Conflict 90 | '410': 91 | $ref: common.yaml#/components/responses/410Gone 92 | '429': 93 | $ref: common.yaml#/components/responses/429LimitExceeded 94 | '500': 95 | $ref: common.yaml#/components/responses/500InternalServerError 96 | '503': 97 | $ref: common.yaml#/components/responses/503ServiceUnavailable 98 | '504': 99 | $ref: common.yaml#/components/responses/504GatewayTimeout 100 | requestBody: 101 | required: true 102 | content: 103 | application/json: 104 | schema: 105 | $ref: '#/components/schemas/CatalogIntegration' 106 | /api/v2/catalog-integrations/{name}: 107 | get: 108 | summary: Fetch a catalog integration. 109 | tags: 110 | - catalog-integration 111 | description: Fetch a catalog integration. 112 | operationId: fetchCatalogIntegration 113 | parameters: 114 | - $ref: common.yaml#/components/parameters/name 115 | responses: 116 | '200': 117 | description: successful 118 | headers: 119 | X-Snowflake-Request-ID: 120 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 121 | content: 122 | application/json: 123 | schema: 124 | $ref: '#/components/schemas/CatalogIntegration' 125 | '202': 126 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 127 | '400': 128 | $ref: common.yaml#/components/responses/400BadRequest 129 | '401': 130 | $ref: common.yaml#/components/responses/401Unauthorized 131 | '403': 132 | $ref: common.yaml#/components/responses/403Forbidden 133 | '404': 134 | $ref: common.yaml#/components/responses/404NotFound 135 | '405': 136 | $ref: common.yaml#/components/responses/405MethodNotAllowed 137 | '408': 138 | $ref: common.yaml#/components/responses/408RequestTimeout 139 | '409': 140 | $ref: common.yaml#/components/responses/409Conflict 141 | '410': 142 | $ref: common.yaml#/components/responses/410Gone 143 | '429': 144 | $ref: common.yaml#/components/responses/429LimitExceeded 145 | '500': 146 | $ref: common.yaml#/components/responses/500InternalServerError 147 | '503': 148 | $ref: common.yaml#/components/responses/503ServiceUnavailable 149 | '504': 150 | $ref: common.yaml#/components/responses/504GatewayTimeout 151 | delete: 152 | summary: Delete a catalog integration. 153 | tags: 154 | - catalog-integration 155 | description: Delete a catalog integration. 156 | operationId: deleteCatalogIntegration 157 | parameters: 158 | - $ref: common.yaml#/components/parameters/name 159 | - $ref: common.yaml#/components/parameters/ifExists 160 | responses: 161 | '200': 162 | $ref: common.yaml#/components/responses/200SuccessResponse 163 | '202': 164 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 165 | '400': 166 | $ref: common.yaml#/components/responses/400BadRequest 167 | '401': 168 | $ref: common.yaml#/components/responses/401Unauthorized 169 | '403': 170 | $ref: common.yaml#/components/responses/403Forbidden 171 | '404': 172 | $ref: common.yaml#/components/responses/404NotFound 173 | '405': 174 | $ref: common.yaml#/components/responses/405MethodNotAllowed 175 | '408': 176 | $ref: common.yaml#/components/responses/408RequestTimeout 177 | '409': 178 | $ref: common.yaml#/components/responses/409Conflict 179 | '410': 180 | $ref: common.yaml#/components/responses/410Gone 181 | '429': 182 | $ref: common.yaml#/components/responses/429LimitExceeded 183 | '500': 184 | $ref: common.yaml#/components/responses/500InternalServerError 185 | '503': 186 | $ref: common.yaml#/components/responses/503ServiceUnavailable 187 | '504': 188 | $ref: common.yaml#/components/responses/504GatewayTimeout 189 | components: 190 | schemas: 191 | CatalogIntegration: 192 | type: object 193 | description: Catalog integration 194 | properties: 195 | name: 196 | type: string 197 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 198 | description: Name of the catalog integration. 199 | catalog: 200 | $ref: '#/components/schemas/Catalog' 201 | description: Type of catalog and its parameters. 202 | table_format: 203 | type: string 204 | enum: 205 | - ICEBERG 206 | description: Table format of the catalog. 207 | enabled: 208 | type: boolean 209 | description: 'whether this catalog integration is available to use for Iceberg 210 | tables. ' 211 | comment: 212 | type: string 213 | description: Comment. 214 | type: 215 | type: string 216 | readOnly: true 217 | description: Type of the integration. Always CATALOG. 218 | category: 219 | type: string 220 | readOnly: true 221 | description: Category of the integration. Always CATALOG. 222 | created_on: 223 | type: string 224 | format: date-time 225 | readOnly: true 226 | description: Date and time when the catalog integration was created. 227 | required: 228 | - name 229 | - catalog 230 | - table_format 231 | - enabled 232 | Catalog: 233 | type: object 234 | properties: 235 | catalog_source: 236 | type: string 237 | enum: 238 | - GLUE 239 | - OBJECT_STORE 240 | - POLARIS 241 | description: Type of external catalog 242 | required: 243 | - catalog_source 244 | discriminator: 245 | propertyName: catalog_source 246 | mapping: 247 | GLUE: Glue 248 | OBJECT_STORE: ObjectStore 249 | POLARIS: Polaris 250 | Glue: 251 | type: object 252 | allOf: 253 | - $ref: '#/components/schemas/Catalog' 254 | properties: 255 | glue_aws_role_arn: 256 | type: string 257 | description: ARN for AWS role to assume 258 | glue_catalog_id: 259 | type: string 260 | description: Glue catalog id 261 | glue_region: 262 | type: string 263 | description: AWS region of the Glue catalog. Must be specified if the Snowflake 264 | account is not hosted on AWS. 265 | catalog_namespace: 266 | type: string 267 | description: default AWS Glue catalog namespace for all Iceberg table that 268 | use this catalog integration 269 | required: 270 | - glue_aws_role_arn 271 | - glue_catalog_id 272 | - catalog_namespace 273 | ObjectStore: 274 | type: object 275 | allOf: 276 | - $ref: '#/components/schemas/Catalog' 277 | Polaris: 278 | type: object 279 | allOf: 280 | - $ref: '#/components/schemas/Catalog' 281 | properties: 282 | catalog_namespace: 283 | type: string 284 | description: Default Polaris namespace used by all Iceberg tables associated 285 | with this catalog integration 286 | rest_config: 287 | $ref: '#/components/schemas/RestConfig' 288 | description: Information about the Polaris catalog account and catalog name. 289 | rest_authentication: 290 | $ref: '#/components/schemas/RestAuthentication' 291 | description: Authentication details that Snowflake uses to connect to the 292 | Polaris catalog. 293 | required: 294 | - catalog_namespace 295 | - rest_config 296 | - rest_authentication 297 | RestConfig: 298 | type: object 299 | properties: 300 | catalog_uri: 301 | type: string 302 | description: Customer's Polaris account locator URL 303 | warehouse: 304 | type: string 305 | description: Name of the catalog to use in Polaris 306 | required: 307 | - catalog_uri 308 | - warehouse 309 | RestAuthentication: 310 | type: object 311 | properties: 312 | type: 313 | type: string 314 | enum: 315 | - OAUTH 316 | description: Authentication type. 317 | required: 318 | - type 319 | discriminator: 320 | propertyName: type 321 | mapping: 322 | OAUTH: OAuth 323 | OAuth: 324 | type: object 325 | allOf: 326 | - $ref: '#/components/schemas/RestAuthentication' 327 | properties: 328 | oauth_client_id: 329 | type: string 330 | description: The client ID of the OAuth2 credential associated with the 331 | Polaris service connection. 332 | oauth_client_secret: 333 | type: string 334 | description: The secret for the OAuth2 credential associated with the Polaris 335 | service connection. 336 | oauth_allowed_scopes: 337 | type: array 338 | items: 339 | type: string 340 | description: The scope of the OAuth token. Only one scope is included in 341 | the Iceberg REST API specification, but catalogs can support more than 342 | one scope in their implementation. 343 | required: 344 | - oauth_client_id 345 | - oauth_client_secret 346 | - oauth_allowed_scopes 347 | -------------------------------------------------------------------------------- /specifications/cortex-inference.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | info: 3 | title: Cortex Inference API 4 | description: OpenAPI 3.0 specification for the Cortex REST API 5 | version: 0.1.0 6 | contact: 7 | name: Snowflake, Inc. 8 | url: https://snowflake.com 9 | email: support@snowflake.com 10 | paths: 11 | /api/v2/cortex/models: 12 | get: 13 | summary: Returns the LLMs available for the current session 14 | tags: 15 | - cortex-inference 16 | description: Returns the LLMs available for the current session 17 | operationId: getModels 18 | requestBody: 19 | required: false 20 | content: 21 | application/json: 22 | schema: 23 | $ref: '#/components/schemas/GetModelsRequest' 24 | responses: 25 | '200': 26 | description: OK 27 | content: 28 | application/json: 29 | schema: 30 | $ref: '#/components/schemas/GetModelsResponse' 31 | '400': 32 | $ref: common.yaml#/components/responses/400BadRequest 33 | '401': 34 | $ref: common.yaml#/components/responses/401Unauthorized 35 | '403': 36 | $ref: common.yaml#/components/responses/403Forbidden 37 | '404': 38 | $ref: common.yaml#/components/responses/404NotFound 39 | '405': 40 | $ref: common.yaml#/components/responses/405MethodNotAllowed 41 | '500': 42 | $ref: common.yaml#/components/responses/500InternalServerError 43 | '503': 44 | $ref: common.yaml#/components/responses/503ServiceUnavailable 45 | '504': 46 | $ref: common.yaml#/components/responses/504GatewayTimeout 47 | /api/v2/cortex/inference:complete: 48 | post: 49 | summary: Perform LLM text completion inference. 50 | tags: 51 | - cortex-inference 52 | description: Perform LLM text completion inference, similar to snowflake.cortex.Complete. 53 | operationId: cortexLLMInferenceComplete 54 | requestBody: 55 | content: 56 | application/json: 57 | schema: 58 | $ref: '#/components/schemas/CompleteRequest' 59 | responses: 60 | '200': 61 | description: OK 62 | content: 63 | text/event-stream: 64 | schema: 65 | $ref: '#/components/schemas/StreamingCompleteResponse' 66 | '400': 67 | $ref: common.yaml#/components/responses/400BadRequest 68 | '401': 69 | $ref: common.yaml#/components/responses/401Unauthorized 70 | '403': 71 | $ref: common.yaml#/components/responses/403Forbidden 72 | '404': 73 | $ref: common.yaml#/components/responses/404NotFound 74 | '405': 75 | $ref: common.yaml#/components/responses/405MethodNotAllowed 76 | '500': 77 | $ref: common.yaml#/components/responses/500InternalServerError 78 | '503': 79 | $ref: common.yaml#/components/responses/503ServiceUnavailable 80 | '504': 81 | $ref: common.yaml#/components/responses/504GatewayTimeout 82 | components: 83 | schemas: 84 | GetModelsRequest: 85 | type: object 86 | properties: 87 | models: 88 | type: array 89 | items: 90 | type: string 91 | GetModelsResponse: 92 | type: object 93 | properties: 94 | models: 95 | type: array 96 | items: 97 | type: string 98 | CompleteRequest: 99 | type: object 100 | description: LLM text completion request. 101 | properties: 102 | model: 103 | description: The model name. See documentation for possible values. 104 | type: string 105 | messages: 106 | type: array 107 | items: 108 | type: object 109 | properties: 110 | role: 111 | type: string 112 | description: "Indicates the role of the message, one of 'system',\ 113 | \ 'user' or 'assistant'.\n\nRules:\n - A 'user' message must be\ 114 | \ the last message in the list.\n - If a 'system' message is specified,\ 115 | \ it must be the first message.\n - If a 'assistant' message is\ 116 | \ specified, it must be immediately before a 'user' message in the\ 117 | \ list.\n\nMultiple 'assistant' and 'user' messages can be specified,\ 118 | \ but they must alternate in sequence.\n" 119 | default: user 120 | content: 121 | type: string 122 | description: The text completion prompt, e.g. 'What is a Large Language 123 | Model?'. 124 | content_list: 125 | type: array 126 | description: Contents of toolUse and toolResults 127 | items: 128 | discriminator: 129 | propertyName: type 130 | mapping: 131 | text: common-cortex-tool.yaml#/components/schemas/TextContent 132 | tool_result: common-cortex-tool.yaml#/components/schemas/ToolResults 133 | tool_use: common-cortex-tool.yaml#/components/schemas/ToolUse 134 | required: 135 | - content 136 | minItems: 1 137 | temperature: 138 | description: Temperature controls the amount of randomness used in response 139 | generation. A higher temperature corresponds to more randomness. 140 | type: number 141 | nullable: true 142 | minimum: 0.0 143 | top_p: 144 | description: Threshold probability for nucleus sampling. A higher top-p 145 | value increases the diversity of tokens that the model considers, while 146 | a lower value results in more predictable output. 147 | type: number 148 | default: 1.0 149 | minimum: 0.0 150 | maximum: 1.0 151 | max_tokens: 152 | description: The maximum number of output tokens to produce. The default 153 | value is model-dependent. 154 | type: integer 155 | default: 4096 156 | minimum: 0 157 | max_output_tokens: 158 | deprecated: true 159 | description: Deprecated in favor of "max_tokens", which has identical behavior. 160 | type: integer 161 | nullable: true 162 | response_format: 163 | type: object 164 | nullable: true 165 | description: An object describing response format config for structured-output 166 | mode. 167 | properties: 168 | type: 169 | type: string 170 | enum: 171 | - json 172 | description: The response format type (e.g., "json"). 173 | schema: 174 | type: object 175 | description: The schema defining the structure of the response. If the 176 | `type` is "json", the `schema` field should contain a valid JSON schema. 177 | guardrails: 178 | $ref: '#/components/schemas/GuardrailsConfig' 179 | tools: 180 | description: List of tools to be used during tool calling 181 | type: array 182 | items: 183 | $ref: common-cortex-tool.yaml#/components/schemas/Tool 184 | tool_choice: 185 | $ref: common-cortex-tool.yaml#/components/schemas/ToolChoice 186 | provisioned_throughput_id: 187 | type: string 188 | description: The provisioned throughput ID to be used with the request. 189 | nullable: true 190 | sf-ml-xp-inflight-prompt-action: 191 | type: string 192 | description: Reserved 193 | sf-ml-xp-inflight-prompt-client-id: 194 | type: string 195 | description: Reserved 196 | sf-ml-xp-inflight-prompt-public-key: 197 | type: string 198 | description: Reserved 199 | stream: 200 | type: boolean 201 | default: true 202 | nullable: true 203 | description: Reserved 204 | required: 205 | - model 206 | - messages 207 | GuardrailsConfig: 208 | type: object 209 | title: GuardrailsConfig 210 | description: Guardrails configuration 211 | nullable: true 212 | properties: 213 | enabled: 214 | type: boolean 215 | description: Controls whether guardrails are enabled 216 | response_when_unsafe: 217 | type: string 218 | description: The response when the guardrails model marks the completion 219 | as unsafe 220 | example: Response filtered by Cortex Guard 221 | NonStreamingCompleteResponse: 222 | type: object 223 | description: Text-completion response for non-streaming request. 224 | properties: 225 | choices: 226 | type: array 227 | items: 228 | type: object 229 | properties: 230 | message: 231 | type: object 232 | properties: 233 | content: 234 | type: string 235 | description: The text completion response. 236 | content_list: 237 | type: array 238 | description: Contents of text and toolUse response. 239 | items: 240 | discriminator: 241 | propertyName: type 242 | mapping: 243 | text: common-cortex-tool.yaml#/components/schemas/TextContent 244 | tool_use: common-cortex-tool.yaml#/components/schemas/ToolUse 245 | usage: 246 | type: object 247 | title: Usage 248 | properties: 249 | prompt_tokens: 250 | type: integer 251 | description: Input token count. 252 | completion_tokens: 253 | type: integer 254 | description: Output token count. 255 | guard_tokens: 256 | type: integer 257 | description: Tokens used by cortex guard. 258 | total_tokens: 259 | type: integer 260 | description: Sum of all tokens. 261 | StreamingCompleteResponse: 262 | type: object 263 | description: Server-sent events for streaming text-completion updates. 264 | x-events: 265 | data: 266 | $ref: '#/components/schemas/StreamingCompleteResponseDataEvent' 267 | StreamingCompleteResponseDataEvent: 268 | type: object 269 | description: Streaming text-completion response event. 270 | properties: 271 | choices: 272 | type: array 273 | items: 274 | type: object 275 | properties: 276 | delta: 277 | $ref: '#/components/schemas/StreamingCompleteResponseDelta' 278 | StreamingCompleteResponseDelta: 279 | type: object 280 | required: 281 | - type 282 | discriminator: 283 | propertyName: type 284 | mapping: 285 | text: common-cortex-tool.yaml#/components/schemas/StreamingTextContent 286 | tool_use: common-cortex-tool.yaml#/components/schemas/StreamingToolUse 287 | securitySchemes: 288 | KeyPair: 289 | $ref: common.yaml#/components/securitySchemes/KeyPair 290 | ExternalOAuth: 291 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 292 | SnowflakeOAuth: 293 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 294 | security: 295 | - KeyPair: [] 296 | - ExternalOAuth: [] 297 | - SnowflakeOAuth: [] 298 | -------------------------------------------------------------------------------- /specifications/event-table.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Event Table API 8 | description: The Snowflake Event Table API is a REST API that you can use to access, 9 | update, and perform certain actions on Event Table resource in a Snowflake database. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/databases/{database}/schemas/{schema}/event-tables: 16 | get: 17 | summary: List event tables 18 | tags: 19 | - event-table 20 | description: List event tables 21 | operationId: listEventTables 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/database 24 | - $ref: common.yaml#/components/parameters/schema 25 | - $ref: common.yaml#/components/parameters/like 26 | - $ref: common.yaml#/components/parameters/startsWith 27 | - $ref: common.yaml#/components/parameters/showLimit 28 | - $ref: common.yaml#/components/parameters/fromName 29 | responses: 30 | '200': 31 | description: successful 32 | headers: 33 | X-Snowflake-Request-ID: 34 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 35 | content: 36 | application/json: 37 | schema: 38 | type: array 39 | items: 40 | $ref: '#/components/schemas/EventTable' 41 | '202': 42 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 43 | '400': 44 | $ref: common.yaml#/components/responses/400BadRequest 45 | '401': 46 | $ref: common.yaml#/components/responses/401Unauthorized 47 | '403': 48 | $ref: common.yaml#/components/responses/403Forbidden 49 | '404': 50 | $ref: common.yaml#/components/responses/404NotFound 51 | '405': 52 | $ref: common.yaml#/components/responses/405MethodNotAllowed 53 | '408': 54 | $ref: common.yaml#/components/responses/408RequestTimeout 55 | '409': 56 | $ref: common.yaml#/components/responses/409Conflict 57 | '410': 58 | $ref: common.yaml#/components/responses/410Gone 59 | '429': 60 | $ref: common.yaml#/components/responses/429LimitExceeded 61 | '500': 62 | $ref: common.yaml#/components/responses/500InternalServerError 63 | '503': 64 | $ref: common.yaml#/components/responses/503ServiceUnavailable 65 | '504': 66 | $ref: common.yaml#/components/responses/504GatewayTimeout 67 | post: 68 | summary: Create an event table 69 | tags: 70 | - event-table 71 | description: Create an event table 72 | operationId: createEventTable 73 | parameters: 74 | - $ref: common.yaml#/components/parameters/database 75 | - $ref: common.yaml#/components/parameters/schema 76 | - $ref: common.yaml#/components/parameters/createMode 77 | - $ref: common.yaml#/components/parameters/copyGrants 78 | responses: 79 | '200': 80 | $ref: common.yaml#/components/responses/200SuccessResponse 81 | '202': 82 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 83 | '400': 84 | $ref: common.yaml#/components/responses/400BadRequest 85 | '401': 86 | $ref: common.yaml#/components/responses/401Unauthorized 87 | '403': 88 | $ref: common.yaml#/components/responses/403Forbidden 89 | '404': 90 | $ref: common.yaml#/components/responses/404NotFound 91 | '405': 92 | $ref: common.yaml#/components/responses/405MethodNotAllowed 93 | '408': 94 | $ref: common.yaml#/components/responses/408RequestTimeout 95 | '409': 96 | $ref: common.yaml#/components/responses/409Conflict 97 | '410': 98 | $ref: common.yaml#/components/responses/410Gone 99 | '429': 100 | $ref: common.yaml#/components/responses/429LimitExceeded 101 | '500': 102 | $ref: common.yaml#/components/responses/500InternalServerError 103 | '503': 104 | $ref: common.yaml#/components/responses/503ServiceUnavailable 105 | '504': 106 | $ref: common.yaml#/components/responses/504GatewayTimeout 107 | requestBody: 108 | required: true 109 | content: 110 | application/json: 111 | schema: 112 | $ref: '#/components/schemas/EventTable' 113 | /api/v2/databases/{database}/schemas/{schema}/event-tables/{name}: 114 | get: 115 | summary: Fetch an event table 116 | tags: 117 | - event-table 118 | description: Fetch an event table 119 | operationId: fetchEventTable 120 | parameters: 121 | - $ref: common.yaml#/components/parameters/database 122 | - $ref: common.yaml#/components/parameters/schema 123 | - $ref: common.yaml#/components/parameters/name 124 | responses: 125 | '200': 126 | description: successful 127 | headers: 128 | X-Snowflake-Request-ID: 129 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 130 | content: 131 | application/json: 132 | schema: 133 | $ref: '#/components/schemas/EventTable' 134 | '202': 135 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 136 | '400': 137 | $ref: common.yaml#/components/responses/400BadRequest 138 | '401': 139 | $ref: common.yaml#/components/responses/401Unauthorized 140 | '403': 141 | $ref: common.yaml#/components/responses/403Forbidden 142 | '404': 143 | $ref: common.yaml#/components/responses/404NotFound 144 | '405': 145 | $ref: common.yaml#/components/responses/405MethodNotAllowed 146 | '408': 147 | $ref: common.yaml#/components/responses/408RequestTimeout 148 | '409': 149 | $ref: common.yaml#/components/responses/409Conflict 150 | '410': 151 | $ref: common.yaml#/components/responses/410Gone 152 | '429': 153 | $ref: common.yaml#/components/responses/429LimitExceeded 154 | '500': 155 | $ref: common.yaml#/components/responses/500InternalServerError 156 | '503': 157 | $ref: common.yaml#/components/responses/503ServiceUnavailable 158 | '504': 159 | $ref: common.yaml#/components/responses/504GatewayTimeout 160 | delete: 161 | summary: Delete an event table 162 | tags: 163 | - event-table 164 | description: Delete an event table 165 | operationId: deleteEventTable 166 | parameters: 167 | - $ref: common.yaml#/components/parameters/database 168 | - $ref: common.yaml#/components/parameters/schema 169 | - $ref: common.yaml#/components/parameters/name 170 | - $ref: common.yaml#/components/parameters/ifExists 171 | responses: 172 | '200': 173 | $ref: common.yaml#/components/responses/200SuccessResponse 174 | '202': 175 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 176 | '400': 177 | $ref: common.yaml#/components/responses/400BadRequest 178 | '401': 179 | $ref: common.yaml#/components/responses/401Unauthorized 180 | '403': 181 | $ref: common.yaml#/components/responses/403Forbidden 182 | '404': 183 | $ref: common.yaml#/components/responses/404NotFound 184 | '405': 185 | $ref: common.yaml#/components/responses/405MethodNotAllowed 186 | '408': 187 | $ref: common.yaml#/components/responses/408RequestTimeout 188 | '409': 189 | $ref: common.yaml#/components/responses/409Conflict 190 | '410': 191 | $ref: common.yaml#/components/responses/410Gone 192 | '429': 193 | $ref: common.yaml#/components/responses/429LimitExceeded 194 | '500': 195 | $ref: common.yaml#/components/responses/500InternalServerError 196 | '503': 197 | $ref: common.yaml#/components/responses/503ServiceUnavailable 198 | '504': 199 | $ref: common.yaml#/components/responses/504GatewayTimeout 200 | /api/v2/databases/{database}/schemas/{schema}/event-tables/{name}:rename: 201 | post: 202 | summary: Rename the event table 203 | tags: 204 | - event-table 205 | description: Rename the event table 206 | operationId: renameEventTable 207 | parameters: 208 | - $ref: common.yaml#/components/parameters/database 209 | - $ref: common.yaml#/components/parameters/schema 210 | - $ref: common.yaml#/components/parameters/name 211 | - $ref: common.yaml#/components/parameters/ifExists 212 | - name: targetName 213 | description: Specify the name of the target resource to be renamed to. 214 | in: query 215 | required: true 216 | schema: 217 | type: string 218 | responses: 219 | '200': 220 | $ref: common.yaml#/components/responses/200SuccessResponse 221 | '202': 222 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 223 | '400': 224 | $ref: common.yaml#/components/responses/400BadRequest 225 | '401': 226 | $ref: common.yaml#/components/responses/401Unauthorized 227 | '403': 228 | $ref: common.yaml#/components/responses/403Forbidden 229 | '404': 230 | $ref: common.yaml#/components/responses/404NotFound 231 | '405': 232 | $ref: common.yaml#/components/responses/405MethodNotAllowed 233 | '408': 234 | $ref: common.yaml#/components/responses/408RequestTimeout 235 | '409': 236 | $ref: common.yaml#/components/responses/409Conflict 237 | '410': 238 | $ref: common.yaml#/components/responses/410Gone 239 | '429': 240 | $ref: common.yaml#/components/responses/429LimitExceeded 241 | '500': 242 | $ref: common.yaml#/components/responses/500InternalServerError 243 | '503': 244 | $ref: common.yaml#/components/responses/503ServiceUnavailable 245 | '504': 246 | $ref: common.yaml#/components/responses/504GatewayTimeout 247 | components: 248 | schemas: 249 | EventTable: 250 | type: object 251 | description: A Snowflake event table 252 | properties: 253 | name: 254 | type: string 255 | description: Name of the event table 256 | cluster_by: 257 | type: array 258 | items: 259 | type: string 260 | description: Cluster key column(s) or expression 261 | data_retention_time_in_days: 262 | type: integer 263 | description: number of days to retain the old version of deleted/updated 264 | data 265 | max_data_extension_time_in_days: 266 | type: integer 267 | description: Maximum number of days to extend data retention beyond the 268 | retention period to prevent a stream becoming stale. 269 | change_tracking: 270 | type: boolean 271 | description: True if change tracking is enabled, allowing streams and CHANGES 272 | to be used on the entity. 273 | default_ddl_collation: 274 | type: string 275 | description: Collation that is used for all the new columns created by the 276 | DDL statements (if not specified) 277 | comment: 278 | type: string 279 | description: user comment associated to an object in the dictionary 280 | created_on: 281 | type: string 282 | format: date-time 283 | readOnly: true 284 | description: Date and time when the event table was created. 285 | database_name: 286 | type: string 287 | readOnly: true 288 | description: Database in which the event table is stored 289 | schema_name: 290 | type: string 291 | readOnly: true 292 | description: Schema in which the event table is stored 293 | owner: 294 | type: string 295 | readOnly: true 296 | description: Role that owns the event table 297 | owner_role_type: 298 | type: string 299 | readOnly: true 300 | description: The type of role that owns the event table 301 | rows: 302 | type: integer 303 | format: int64 304 | readOnly: true 305 | description: Number of rows in the table. 306 | bytes: 307 | type: integer 308 | format: int64 309 | readOnly: true 310 | description: Number of bytes that will be scanned if the entire table is 311 | scanned in a query.Note that this number may be different than the number 312 | of actual physical bytes stored on-disk for the table 313 | automatic_clustering: 314 | type: boolean 315 | readOnly: true 316 | description: If Automatic Clustering is enabled for your account, specifies 317 | whether it is explicitly enabled or disabled for the table. 318 | search_optimization: 319 | type: boolean 320 | readOnly: true 321 | description: If ON, the table has the search optimization service enabled 322 | search_optimization_progress: 323 | type: integer 324 | format: int64 325 | readOnly: true 326 | description: Percentage of the table that has been optimized for search 327 | search_optimization_bytes: 328 | type: integer 329 | format: int64 330 | readOnly: true 331 | description: Number of additional bytes of storage that the search optimization 332 | service consumes for this table 333 | columns: 334 | type: array 335 | items: 336 | $ref: '#/components/schemas/EventTableColumn' 337 | readOnly: true 338 | required: 339 | - name 340 | EventTableColumn: 341 | type: object 342 | properties: 343 | name: 344 | type: string 345 | description: Column name 346 | datatype: 347 | type: string 348 | description: The data type for the column 349 | nullable: 350 | type: boolean 351 | description: Specifies that the column does allow NULL values or not 352 | default: 353 | type: string 354 | description: Specifies whether a default value is automatically inserted 355 | in the column if a value is not explicitly specified via an INSERT or 356 | CREATE TABLE AS SELECT statement 357 | primary_key: 358 | type: boolean 359 | description: A primary key is the column or columns that contain values 360 | that uniquely identify each row in a table 361 | unique_key: 362 | type: boolean 363 | description: Unique keys are columns in a table that uniquely identify items 364 | in the rows. This sounds a lot like a primary key, but the main difference 365 | is that unique keys can have NULL values. 366 | check: 367 | type: string 368 | description: '' 369 | expression: 370 | type: string 371 | description: '' 372 | comment: 373 | type: string 374 | description: Specifies a comment for the column 375 | securitySchemes: 376 | KeyPair: 377 | $ref: common.yaml#/components/securitySchemes/KeyPair 378 | ExternalOAuth: 379 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 380 | SnowflakeOAuth: 381 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 382 | security: 383 | - KeyPair: [] 384 | - ExternalOAuth: [] 385 | - SnowflakeOAuth: [] 386 | -------------------------------------------------------------------------------- /specifications/external-volume.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake External Volume API 8 | description: The Snowflake External Volume API is a REST API that you can use to 9 | access, update, and perform certain actions on External Volume resource in a Snowflake 10 | database. 11 | contact: 12 | name: Snowflake, Inc. 13 | url: https://snowflake.com 14 | email: support@snowflake.com 15 | paths: 16 | /api/v2/external-volumes: 17 | get: 18 | summary: List external volumes 19 | tags: 20 | - external-volume 21 | description: List external volumes 22 | operationId: listExternalVolumes 23 | parameters: 24 | - $ref: common.yaml#/components/parameters/like 25 | responses: 26 | '200': 27 | description: successful 28 | headers: 29 | X-Snowflake-Request-ID: 30 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 31 | Link: 32 | $ref: common.yaml#/components/headers/Link 33 | content: 34 | application/json: 35 | schema: 36 | type: array 37 | items: 38 | $ref: '#/components/schemas/ExternalVolume' 39 | '202': 40 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 41 | '400': 42 | $ref: common.yaml#/components/responses/400BadRequest 43 | '401': 44 | $ref: common.yaml#/components/responses/401Unauthorized 45 | '403': 46 | $ref: common.yaml#/components/responses/403Forbidden 47 | '404': 48 | $ref: common.yaml#/components/responses/404NotFound 49 | '405': 50 | $ref: common.yaml#/components/responses/405MethodNotAllowed 51 | '408': 52 | $ref: common.yaml#/components/responses/408RequestTimeout 53 | '409': 54 | $ref: common.yaml#/components/responses/409Conflict 55 | '410': 56 | $ref: common.yaml#/components/responses/410Gone 57 | '429': 58 | $ref: common.yaml#/components/responses/429LimitExceeded 59 | '500': 60 | $ref: common.yaml#/components/responses/500InternalServerError 61 | '503': 62 | $ref: common.yaml#/components/responses/503ServiceUnavailable 63 | '504': 64 | $ref: common.yaml#/components/responses/504GatewayTimeout 65 | post: 66 | summary: Create an external volume 67 | tags: 68 | - external-volume 69 | description: Create an external volume 70 | operationId: createExternalVolume 71 | parameters: 72 | - $ref: common.yaml#/components/parameters/createMode 73 | responses: 74 | '200': 75 | $ref: common.yaml#/components/responses/200SuccessResponse 76 | '202': 77 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 78 | '400': 79 | $ref: common.yaml#/components/responses/400BadRequest 80 | '401': 81 | $ref: common.yaml#/components/responses/401Unauthorized 82 | '403': 83 | $ref: common.yaml#/components/responses/403Forbidden 84 | '404': 85 | $ref: common.yaml#/components/responses/404NotFound 86 | '405': 87 | $ref: common.yaml#/components/responses/405MethodNotAllowed 88 | '408': 89 | $ref: common.yaml#/components/responses/408RequestTimeout 90 | '409': 91 | $ref: common.yaml#/components/responses/409Conflict 92 | '410': 93 | $ref: common.yaml#/components/responses/410Gone 94 | '429': 95 | $ref: common.yaml#/components/responses/429LimitExceeded 96 | '500': 97 | $ref: common.yaml#/components/responses/500InternalServerError 98 | '503': 99 | $ref: common.yaml#/components/responses/503ServiceUnavailable 100 | '504': 101 | $ref: common.yaml#/components/responses/504GatewayTimeout 102 | requestBody: 103 | required: true 104 | content: 105 | application/json: 106 | schema: 107 | $ref: '#/components/schemas/ExternalVolume' 108 | /api/v2/external-volumes/{name}: 109 | get: 110 | summary: Fetch an external volume 111 | tags: 112 | - external-volume 113 | description: Fetch an external volume 114 | operationId: fetchExternalVolume 115 | parameters: 116 | - $ref: common.yaml#/components/parameters/name 117 | responses: 118 | '200': 119 | description: successful 120 | headers: 121 | X-Snowflake-Request-ID: 122 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 123 | Link: 124 | $ref: common.yaml#/components/headers/Link 125 | content: 126 | application/json: 127 | schema: 128 | $ref: '#/components/schemas/ExternalVolume' 129 | '202': 130 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 131 | '400': 132 | $ref: common.yaml#/components/responses/400BadRequest 133 | '401': 134 | $ref: common.yaml#/components/responses/401Unauthorized 135 | '403': 136 | $ref: common.yaml#/components/responses/403Forbidden 137 | '404': 138 | $ref: common.yaml#/components/responses/404NotFound 139 | '405': 140 | $ref: common.yaml#/components/responses/405MethodNotAllowed 141 | '408': 142 | $ref: common.yaml#/components/responses/408RequestTimeout 143 | '409': 144 | $ref: common.yaml#/components/responses/409Conflict 145 | '410': 146 | $ref: common.yaml#/components/responses/410Gone 147 | '429': 148 | $ref: common.yaml#/components/responses/429LimitExceeded 149 | '500': 150 | $ref: common.yaml#/components/responses/500InternalServerError 151 | '503': 152 | $ref: common.yaml#/components/responses/503ServiceUnavailable 153 | '504': 154 | $ref: common.yaml#/components/responses/504GatewayTimeout 155 | delete: 156 | summary: Delete an external volume 157 | tags: 158 | - external-volume 159 | description: Delete an external volume 160 | operationId: deleteExternalVolume 161 | parameters: 162 | - $ref: common.yaml#/components/parameters/name 163 | - $ref: common.yaml#/components/parameters/ifExists 164 | responses: 165 | '200': 166 | $ref: common.yaml#/components/responses/200SuccessResponse 167 | '202': 168 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 169 | '400': 170 | $ref: common.yaml#/components/responses/400BadRequest 171 | '401': 172 | $ref: common.yaml#/components/responses/401Unauthorized 173 | '403': 174 | $ref: common.yaml#/components/responses/403Forbidden 175 | '404': 176 | $ref: common.yaml#/components/responses/404NotFound 177 | '405': 178 | $ref: common.yaml#/components/responses/405MethodNotAllowed 179 | '408': 180 | $ref: common.yaml#/components/responses/408RequestTimeout 181 | '409': 182 | $ref: common.yaml#/components/responses/409Conflict 183 | '410': 184 | $ref: common.yaml#/components/responses/410Gone 185 | '429': 186 | $ref: common.yaml#/components/responses/429LimitExceeded 187 | '500': 188 | $ref: common.yaml#/components/responses/500InternalServerError 189 | '503': 190 | $ref: common.yaml#/components/responses/503ServiceUnavailable 191 | '504': 192 | $ref: common.yaml#/components/responses/504GatewayTimeout 193 | /api/v2/external-volumes/{name}:undrop: 194 | post: 195 | summary: Undrop an external volume 196 | tags: 197 | - external-volume 198 | description: Undrop an external volume 199 | operationId: undropExternalVolume 200 | parameters: 201 | - $ref: common.yaml#/components/parameters/name 202 | responses: 203 | '200': 204 | $ref: common.yaml#/components/responses/200SuccessResponse 205 | '202': 206 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 207 | '400': 208 | $ref: common.yaml#/components/responses/400BadRequest 209 | '401': 210 | $ref: common.yaml#/components/responses/401Unauthorized 211 | '403': 212 | $ref: common.yaml#/components/responses/403Forbidden 213 | '404': 214 | $ref: common.yaml#/components/responses/404NotFound 215 | '405': 216 | $ref: common.yaml#/components/responses/405MethodNotAllowed 217 | '408': 218 | $ref: common.yaml#/components/responses/408RequestTimeout 219 | '409': 220 | $ref: common.yaml#/components/responses/409Conflict 221 | '410': 222 | $ref: common.yaml#/components/responses/410Gone 223 | '429': 224 | $ref: common.yaml#/components/responses/429LimitExceeded 225 | '500': 226 | $ref: common.yaml#/components/responses/500InternalServerError 227 | '503': 228 | $ref: common.yaml#/components/responses/503ServiceUnavailable 229 | '504': 230 | $ref: common.yaml#/components/responses/504GatewayTimeout 231 | components: 232 | schemas: 233 | ExternalVolume: 234 | type: object 235 | description: A Snowflake external volume 236 | properties: 237 | name: 238 | type: string 239 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 240 | description: String that specifies the identifier (the name) for the external 241 | volume; must be unique in your account. 242 | storage_locations: 243 | type: array 244 | items: 245 | $ref: '#/components/schemas/StorageLocation' 246 | description: Set of named cloud storage locations in different regions and, 247 | optionally, cloud platforms. 248 | allow_writes: 249 | type: boolean 250 | description: Specifies whether write operations are allowed for the external 251 | volume; must be set to TRUE for Iceberg tables that use Snowflake as the 252 | catalog. 253 | comment: 254 | type: string 255 | description: String (literal) that specifies a comment for the external 256 | volume. 257 | created_on: 258 | type: string 259 | format: date-time 260 | readOnly: true 261 | description: Date and time when the external volume was created. 262 | owner: 263 | type: string 264 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 265 | readOnly: true 266 | description: Role that owns the external volume 267 | owner_role_type: 268 | type: string 269 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 270 | readOnly: true 271 | description: The type of role that owns the external volume 272 | required: 273 | - name 274 | - storage_locations 275 | StorageLocation: 276 | type: object 277 | properties: 278 | name: 279 | type: string 280 | description: '' 281 | storage_provider: 282 | type: string 283 | enum: 284 | - S3 285 | - S3GOV 286 | - GCS 287 | - AZURE 288 | description: Specifies the cloud storage provider that stores your data 289 | files. 290 | required: 291 | - name 292 | - storage_provider 293 | discriminator: 294 | propertyName: storage_provider 295 | mapping: 296 | S3: StorageLocationS3 297 | S3GOV: StorageLocationS3Gov 298 | GCS: StorageLocationGcs 299 | AZURE: StorageLocationAzure 300 | StorageLocationS3: 301 | allOf: 302 | - $ref: '#/components/schemas/StorageLocation' 303 | properties: 304 | storage_aws_role_arn: 305 | type: string 306 | description: Specifies the case-sensitive Amazon Resource Name (ARN) of 307 | the AWS identity and access management (IAM) role that grants privileges 308 | on the S3 bucket containing your data files. 309 | storage_base_url: 310 | type: string 311 | description: Specifies the base URL for your cloud storage location. 312 | storage_aws_external_id: 313 | type: string 314 | description: Optionally specifies an external ID that Snowflake uses to 315 | establish a trust relationship with AWS. 316 | encryption: 317 | $ref: '#/components/schemas/Encryption' 318 | description: Specifies the properties needed to encrypt data on the external 319 | volume. 320 | required: 321 | - storage_aws_role_arn 322 | - storage_base_url 323 | Encryption: 324 | type: object 325 | properties: 326 | type: 327 | type: string 328 | enum: 329 | - NONE 330 | - AWS_SSE_S3 331 | - AWS_SSE_KMS 332 | - GCS_SSE_KMS 333 | description: Specifies the encryption type used. 334 | kms_key_id: 335 | type: string 336 | description: Specifies the ID for the Cloud KMS-managed key used to encrypt 337 | files written to the bucket. 338 | required: 339 | - type 340 | StorageLocationS3Gov: 341 | allOf: 342 | - $ref: '#/components/schemas/StorageLocation' 343 | properties: 344 | storage_aws_role_arn: 345 | type: string 346 | description: Specifies the case-sensitive Amazon Resource Name (ARN) of 347 | the AWS identity and access management (IAM) role that grants privileges 348 | on the S3 bucket containing your data files. 349 | storage_base_url: 350 | type: string 351 | description: Specifies the base URL for your cloud storage location. 352 | storage_aws_external_id: 353 | type: string 354 | description: Optionally specifies an external ID that Snowflake uses to 355 | establish a trust relationship with AWS. 356 | encryption: 357 | $ref: '#/components/schemas/Encryption' 358 | description: Specifies the properties needed to encrypt data on the external 359 | volume. 360 | required: 361 | - storage_aws_role_arn 362 | - storage_base_url 363 | StorageLocationGcs: 364 | allOf: 365 | - $ref: '#/components/schemas/StorageLocation' 366 | properties: 367 | storage_base_url: 368 | type: string 369 | description: Specifies the base URL for your cloud storage location. 370 | encryption: 371 | $ref: '#/components/schemas/Encryption' 372 | description: Specifies the properties needed to encrypt data on the external 373 | volume. 374 | required: 375 | - storage_base_url 376 | StorageLocationAzure: 377 | allOf: 378 | - $ref: '#/components/schemas/StorageLocation' 379 | properties: 380 | azure_tenant_id: 381 | type: string 382 | description: Specifies the ID for your Office 365 tenant that the allowed 383 | and blocked storage accounts belong to. 384 | storage_base_url: 385 | type: string 386 | description: Specifies the base URL for your cloud storage location. 387 | required: 388 | - azure_tenant_id 389 | - storage_base_url 390 | securitySchemes: 391 | KeyPair: 392 | $ref: common.yaml#/components/securitySchemes/KeyPair 393 | ExternalOAuth: 394 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 395 | SnowflakeOAuth: 396 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 397 | security: 398 | - KeyPair: [] 399 | - ExternalOAuth: [] 400 | - SnowflakeOAuth: [] 401 | -------------------------------------------------------------------------------- /specifications/function.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Function API 8 | description: The Snowflake Function API is a REST API that allows caller to create, 9 | execute and drop functions in a Snowflake database. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/databases/{database}/schemas/{schema}/functions: 16 | get: 17 | summary: List Functions 18 | tags: 19 | - function 20 | description: Lists the user functions under the database and schema. 21 | operationId: listFunctions 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/database 24 | - $ref: common.yaml#/components/parameters/schema 25 | - $ref: common.yaml#/components/parameters/like 26 | responses: 27 | '200': 28 | description: successful 29 | headers: 30 | X-Snowflake-Request-ID: 31 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 32 | Link: 33 | $ref: common.yaml#/components/headers/Link 34 | content: 35 | application/json: 36 | schema: 37 | type: array 38 | items: 39 | $ref: '#/components/schemas/Function' 40 | '202': 41 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 42 | '400': 43 | $ref: common.yaml#/components/responses/400BadRequest 44 | '401': 45 | $ref: common.yaml#/components/responses/401Unauthorized 46 | '403': 47 | $ref: common.yaml#/components/responses/403Forbidden 48 | '404': 49 | $ref: common.yaml#/components/responses/404NotFound 50 | '405': 51 | $ref: common.yaml#/components/responses/405MethodNotAllowed 52 | '429': 53 | $ref: common.yaml#/components/responses/429LimitExceeded 54 | '500': 55 | $ref: common.yaml#/components/responses/500InternalServerError 56 | '503': 57 | $ref: common.yaml#/components/responses/503ServiceUnavailable 58 | '504': 59 | $ref: common.yaml#/components/responses/504GatewayTimeout 60 | post: 61 | summary: Create a Function 62 | tags: 63 | - function 64 | description: Create a function. 65 | operationId: createFunction 66 | parameters: 67 | - $ref: common.yaml#/components/parameters/database 68 | - $ref: common.yaml#/components/parameters/schema 69 | - $ref: common.yaml#/components/parameters/createMode 70 | requestBody: 71 | required: true 72 | content: 73 | application/json: 74 | schema: 75 | $ref: '#/components/schemas/Function' 76 | responses: 77 | '200': 78 | $ref: common.yaml#/components/responses/200SuccessResponse 79 | '202': 80 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 81 | '400': 82 | $ref: common.yaml#/components/responses/400BadRequest 83 | '401': 84 | $ref: common.yaml#/components/responses/401Unauthorized 85 | '403': 86 | $ref: common.yaml#/components/responses/403Forbidden 87 | '404': 88 | $ref: common.yaml#/components/responses/404NotFound 89 | '405': 90 | $ref: common.yaml#/components/responses/405MethodNotAllowed 91 | '408': 92 | $ref: common.yaml#/components/responses/408RequestTimeout 93 | '409': 94 | $ref: common.yaml#/components/responses/409Conflict 95 | '429': 96 | $ref: common.yaml#/components/responses/429LimitExceeded 97 | '500': 98 | $ref: common.yaml#/components/responses/500InternalServerError 99 | '503': 100 | $ref: common.yaml#/components/responses/503ServiceUnavailable 101 | '504': 102 | $ref: common.yaml#/components/responses/504GatewayTimeout 103 | /api/v2/databases/{database}/schemas/{schema}/functions/{nameWithArgs}: 104 | get: 105 | summary: Fetch a Function. 106 | tags: 107 | - function 108 | description: Fetch a Function using the describe command output. 109 | operationId: fetchFunction 110 | parameters: 111 | - $ref: common.yaml#/components/parameters/database 112 | - $ref: common.yaml#/components/parameters/schema 113 | - $ref: common.yaml#/components/parameters/nameWithArgs 114 | responses: 115 | '200': 116 | description: successful 117 | headers: 118 | X-Snowflake-Request-ID: 119 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 120 | Link: 121 | $ref: common.yaml#/components/headers/Link 122 | content: 123 | application/json: 124 | schema: 125 | $ref: '#/components/schemas/Function' 126 | '202': 127 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 128 | '400': 129 | $ref: common.yaml#/components/responses/400BadRequest 130 | '401': 131 | $ref: common.yaml#/components/responses/401Unauthorized 132 | '403': 133 | $ref: common.yaml#/components/responses/403Forbidden 134 | '404': 135 | $ref: common.yaml#/components/responses/404NotFound 136 | '405': 137 | $ref: common.yaml#/components/responses/405MethodNotAllowed 138 | '429': 139 | $ref: common.yaml#/components/responses/429LimitExceeded 140 | '500': 141 | $ref: common.yaml#/components/responses/500InternalServerError 142 | '503': 143 | $ref: common.yaml#/components/responses/503ServiceUnavailable 144 | '504': 145 | $ref: common.yaml#/components/responses/504GatewayTimeout 146 | delete: 147 | parameters: 148 | - $ref: common.yaml#/components/parameters/database 149 | - $ref: common.yaml#/components/parameters/schema 150 | - $ref: common.yaml#/components/parameters/nameWithArgs 151 | - $ref: common.yaml#/components/parameters/ifExists 152 | summary: Delete a function 153 | tags: 154 | - function 155 | description: Delete a function with the given name and args. 156 | operationId: deleteFunction 157 | responses: 158 | '200': 159 | $ref: common.yaml#/components/responses/200SuccessResponse 160 | '202': 161 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 162 | '400': 163 | $ref: common.yaml#/components/responses/400BadRequest 164 | '401': 165 | $ref: common.yaml#/components/responses/401Unauthorized 166 | '403': 167 | $ref: common.yaml#/components/responses/403Forbidden 168 | '404': 169 | $ref: common.yaml#/components/responses/404NotFound 170 | '405': 171 | $ref: common.yaml#/components/responses/405MethodNotAllowed 172 | '429': 173 | $ref: common.yaml#/components/responses/429LimitExceeded 174 | '500': 175 | $ref: common.yaml#/components/responses/500InternalServerError 176 | '503': 177 | $ref: common.yaml#/components/responses/503ServiceUnavailable 178 | '504': 179 | $ref: common.yaml#/components/responses/504GatewayTimeout 180 | /api/v2/databases/{database}/schemas/{schema}/functions/{name}:execute: 181 | post: 182 | summary: Execute a Function. 183 | tags: 184 | - function 185 | description: Execute a Function. 186 | operationId: executeFunction 187 | parameters: 188 | - $ref: common.yaml#/components/parameters/database 189 | - $ref: common.yaml#/components/parameters/schema 190 | - $ref: common.yaml#/components/parameters/name 191 | requestBody: 192 | content: 193 | application/json: 194 | schema: 195 | $ref: '#/components/schemas/FunctionArguments' 196 | responses: 197 | '200': 198 | description: successful 199 | headers: 200 | X-Snowflake-Request-ID: 201 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 202 | content: 203 | application/json: 204 | schema: 205 | type: object 206 | '202': 207 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 208 | '400': 209 | $ref: common.yaml#/components/responses/400BadRequest 210 | '401': 211 | $ref: common.yaml#/components/responses/401Unauthorized 212 | '403': 213 | $ref: common.yaml#/components/responses/403Forbidden 214 | '404': 215 | $ref: common.yaml#/components/responses/404NotFound 216 | '405': 217 | $ref: common.yaml#/components/responses/405MethodNotAllowed 218 | '429': 219 | $ref: common.yaml#/components/responses/429LimitExceeded 220 | '500': 221 | $ref: common.yaml#/components/responses/500InternalServerError 222 | '503': 223 | $ref: common.yaml#/components/responses/503ServiceUnavailable 224 | '504': 225 | $ref: common.yaml#/components/responses/504GatewayTimeout 226 | components: 227 | schemas: 228 | Function: 229 | type: object 230 | description: A Snowflake function 231 | discriminator: 232 | propertyName: function_type 233 | mapping: 234 | service-function: '#/components/schemas/ServiceFunction' 235 | properties: 236 | function_type: 237 | type: string 238 | default: service-function 239 | name: 240 | type: string 241 | description: Specifies the name for the function, must be unique for the 242 | schema in which the function is created 243 | arguments: 244 | type: array 245 | items: 246 | $ref: '#/components/schemas/FunctionArgument' 247 | returns: 248 | type: string 249 | description: Specifies the type for the function return value. 250 | enum: 251 | - FIXED 252 | - INT 253 | - REAL 254 | - NUMBER 255 | - TEXT 256 | - BOOLEAN 257 | - DATE 258 | - TIME 259 | - TIMESTAMP_TZ 260 | - TIMESTAMP_LTZ 261 | - TIMESTAMP_NTZ 262 | default: TEXT 263 | max_batch_rows: 264 | type: integer 265 | description: Specifies the max rows for batch operation. 266 | created_on: 267 | type: string 268 | format: date-time 269 | description: Date and time when the function was created. 270 | signature: 271 | type: string 272 | description: Function's arguments. 273 | language: 274 | type: string 275 | description: Function's language. 276 | body: 277 | type: string 278 | description: Function's body. 279 | required: 280 | - name 281 | - arguments 282 | FunctionArgument: 283 | type: object 284 | description: An argument of function 285 | properties: 286 | name: 287 | type: string 288 | description: Argument's name 289 | datatype: 290 | description: Argument's type 291 | type: string 292 | enum: 293 | - FIXED 294 | - INT 295 | - REAL 296 | - NUMBER 297 | - TEXT 298 | - BOOLEAN 299 | - DATE 300 | - TIME 301 | - TIMESTAMP_TZ 302 | - TIMESTAMP_LTZ 303 | - TIMESTAMP_NTZ 304 | default: TEXT 305 | value: 306 | description: Argument's value 307 | FunctionArguments: 308 | type: array 309 | items: 310 | $ref: '#/components/schemas/FunctionArgument' 311 | ServiceFunction: 312 | allOf: 313 | - $ref: '#/components/schemas/Function' 314 | description: Service based function 315 | required: 316 | - service 317 | - endpoint 318 | - path 319 | properties: 320 | service: 321 | $ref: ./common.yaml#/components/schemas/Identifier 322 | description: Service's name 323 | service_database: 324 | $ref: ./common.yaml#/components/schemas/Identifier 325 | description: Service's database name 326 | service_schema: 327 | $ref: ./common.yaml#/components/schemas/Identifier 328 | description: Service's schema name 329 | endpoint: 330 | type: string 331 | description: Function's endpoint 332 | path: 333 | type: string 334 | description: Function's path 335 | securitySchemes: 336 | KeyPair: 337 | $ref: common.yaml#/components/securitySchemes/KeyPair 338 | ExternalOAuth: 339 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 340 | SnowflakeOAuth: 341 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 342 | security: 343 | - KeyPair: [] 344 | - ExternalOAuth: [] 345 | - SnowflakeOAuth: [] 346 | -------------------------------------------------------------------------------- /specifications/image-repository.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake Image Repository API 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Image Repository API 8 | description: The Snowflake Image Repository API is a REST API that you can use to 9 | access, update, and perform common actions on Image Repository resource in Snowflake. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/databases/{database}/schemas/{schema}/image-repositories: 16 | get: 17 | summary: Lists image repositories. 18 | tags: 19 | - image-repository 20 | description: Lists the image repositories under a specified database and schema. 21 | operationId: listImageRepositories 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/database 24 | - $ref: common.yaml#/components/parameters/schema 25 | - $ref: common.yaml#/components/parameters/like 26 | responses: 27 | '200': 28 | description: Successful request. 29 | headers: 30 | X-Snowflake-Request-ID: 31 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 32 | Link: 33 | $ref: common.yaml#/components/headers/Link 34 | content: 35 | application/json: 36 | schema: 37 | type: array 38 | items: 39 | $ref: '#/components/schemas/ImageRepository' 40 | '202': 41 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 42 | '400': 43 | $ref: common.yaml#/components/responses/400BadRequest 44 | '401': 45 | $ref: common.yaml#/components/responses/401Unauthorized 46 | '403': 47 | $ref: common.yaml#/components/responses/403Forbidden 48 | '404': 49 | $ref: common.yaml#/components/responses/404NotFound 50 | '405': 51 | $ref: common.yaml#/components/responses/405MethodNotAllowed 52 | '408': 53 | $ref: common.yaml#/components/responses/408RequestTimeout 54 | '409': 55 | $ref: common.yaml#/components/responses/409Conflict 56 | '429': 57 | $ref: common.yaml#/components/responses/429LimitExceeded 58 | '500': 59 | $ref: common.yaml#/components/responses/500InternalServerError 60 | '503': 61 | $ref: common.yaml#/components/responses/503ServiceUnavailable 62 | '504': 63 | $ref: common.yaml#/components/responses/504GatewayTimeout 64 | post: 65 | summary: Creates an image repository in the specified database and schema. 66 | tags: 67 | - image-repository 68 | description: Creates an image repository in the specified database, schema, 69 | and create mode. The `createMode` query parameter specifies what action to 70 | take based on whether the repository already exists. See the ImageRepository 71 | component definition for what is required to be provided in the request body. 72 | operationId: createImageRepository 73 | parameters: 74 | - $ref: common.yaml#/components/parameters/database 75 | - $ref: common.yaml#/components/parameters/schema 76 | - $ref: common.yaml#/components/parameters/createMode 77 | requestBody: 78 | required: true 79 | content: 80 | application/json: 81 | schema: 82 | $ref: '#/components/schemas/ImageRepository' 83 | responses: 84 | '200': 85 | $ref: common.yaml#/components/responses/200SuccessResponse 86 | '202': 87 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 88 | '400': 89 | $ref: common.yaml#/components/responses/400BadRequest 90 | '401': 91 | $ref: common.yaml#/components/responses/401Unauthorized 92 | '403': 93 | $ref: common.yaml#/components/responses/403Forbidden 94 | '404': 95 | $ref: common.yaml#/components/responses/404NotFound 96 | '405': 97 | $ref: common.yaml#/components/responses/405MethodNotAllowed 98 | '408': 99 | $ref: common.yaml#/components/responses/408RequestTimeout 100 | '409': 101 | $ref: common.yaml#/components/responses/409Conflict 102 | '429': 103 | $ref: common.yaml#/components/responses/429LimitExceeded 104 | '500': 105 | $ref: common.yaml#/components/responses/500InternalServerError 106 | '503': 107 | $ref: common.yaml#/components/responses/503ServiceUnavailable 108 | '504': 109 | $ref: common.yaml#/components/responses/504GatewayTimeout 110 | /api/v2/databases/{database}/schemas/{schema}/image-repositories/{name}: 111 | get: 112 | summary: Fetches an image repository. 113 | tags: 114 | - image-repository 115 | description: Fetches a named image repository in a specified database and schema. 116 | operationId: fetchImageRepository 117 | parameters: 118 | - $ref: common.yaml#/components/parameters/database 119 | - $ref: common.yaml#/components/parameters/schema 120 | - $ref: common.yaml#/components/parameters/name 121 | responses: 122 | '200': 123 | description: Successful request. 124 | headers: 125 | X-Snowflake-Request-ID: 126 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 127 | Link: 128 | $ref: common.yaml#/components/headers/Link 129 | content: 130 | application/json: 131 | schema: 132 | $ref: '#/components/schemas/ImageRepository' 133 | '202': 134 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 135 | '400': 136 | $ref: common.yaml#/components/responses/400BadRequest 137 | '401': 138 | $ref: common.yaml#/components/responses/401Unauthorized 139 | '403': 140 | $ref: common.yaml#/components/responses/403Forbidden 141 | '404': 142 | $ref: common.yaml#/components/responses/404NotFound 143 | '405': 144 | $ref: common.yaml#/components/responses/405MethodNotAllowed 145 | '429': 146 | $ref: common.yaml#/components/responses/429LimitExceeded 147 | '500': 148 | $ref: common.yaml#/components/responses/500InternalServerError 149 | '503': 150 | $ref: common.yaml#/components/responses/503ServiceUnavailable 151 | '504': 152 | $ref: common.yaml#/components/responses/504GatewayTimeout 153 | delete: 154 | parameters: 155 | - $ref: common.yaml#/components/parameters/database 156 | - $ref: common.yaml#/components/parameters/schema 157 | - $ref: common.yaml#/components/parameters/name 158 | - $ref: common.yaml#/components/parameters/ifExists 159 | summary: Deletes an image repository. 160 | tags: 161 | - image-repository 162 | description: Deletes an image repository with the given name. If you enable 163 | the `ifExists` query parameter, the operation succeeds even if the object 164 | does not exist. Otherwise, a 404 failure is returned if the object does not 165 | exist. 166 | operationId: deleteImageRepository 167 | responses: 168 | '200': 169 | $ref: common.yaml#/components/responses/200SuccessResponse 170 | '202': 171 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 172 | '400': 173 | $ref: common.yaml#/components/responses/400BadRequest 174 | '401': 175 | $ref: common.yaml#/components/responses/401Unauthorized 176 | '403': 177 | $ref: common.yaml#/components/responses/403Forbidden 178 | '404': 179 | $ref: common.yaml#/components/responses/404NotFound 180 | '405': 181 | $ref: common.yaml#/components/responses/405MethodNotAllowed 182 | '429': 183 | $ref: common.yaml#/components/responses/429LimitExceeded 184 | '500': 185 | $ref: common.yaml#/components/responses/500InternalServerError 186 | '503': 187 | $ref: common.yaml#/components/responses/503ServiceUnavailable 188 | '504': 189 | $ref: common.yaml#/components/responses/504GatewayTimeout 190 | /api/v2/databases/{database}/schemas/{schema}/image-repositories/{name}/images: 191 | get: 192 | summary: List images in the image repository. 193 | tags: 194 | - image-repository 195 | description: List images in the given image repository. 196 | operationId: listImagesInRepository 197 | parameters: 198 | - $ref: common.yaml#/components/parameters/database 199 | - $ref: common.yaml#/components/parameters/schema 200 | - $ref: common.yaml#/components/parameters/name 201 | responses: 202 | '200': 203 | description: Successful request. 204 | headers: 205 | X-Snowflake-Request-ID: 206 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 207 | Link: 208 | $ref: common.yaml#/components/headers/Link 209 | content: 210 | application/json: 211 | schema: 212 | type: array 213 | items: 214 | $ref: '#/components/schemas/Image' 215 | '202': 216 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 217 | '400': 218 | $ref: common.yaml#/components/responses/400BadRequest 219 | '401': 220 | $ref: common.yaml#/components/responses/401Unauthorized 221 | '403': 222 | $ref: common.yaml#/components/responses/403Forbidden 223 | '404': 224 | $ref: common.yaml#/components/responses/404NotFound 225 | '405': 226 | $ref: common.yaml#/components/responses/405MethodNotAllowed 227 | '429': 228 | $ref: common.yaml#/components/responses/429LimitExceeded 229 | '500': 230 | $ref: common.yaml#/components/responses/500InternalServerError 231 | '503': 232 | $ref: common.yaml#/components/responses/503ServiceUnavailable 233 | '504': 234 | $ref: common.yaml#/components/responses/504GatewayTimeout 235 | components: 236 | schemas: 237 | Image: 238 | type: object 239 | description: A image in a Snowflake image repository. 240 | properties: 241 | created_on: 242 | type: string 243 | description: Date and time when the image was uploaded to the image repository. 244 | readOnly: true 245 | image_name: 246 | type: string 247 | description: Image name. 248 | readOnly: true 249 | tags: 250 | type: string 251 | description: Image tags. 252 | readOnly: true 253 | digest: 254 | type: string 255 | description: SHA256 digest of the image. 256 | readOnly: true 257 | image_path: 258 | type: string 259 | description: Image path (database_name/schema_name/repository_name/image_name:image_tag). 260 | readOnly: true 261 | ImageRepository: 262 | type: object 263 | description: A Snowflake image repository. 264 | properties: 265 | name: 266 | $ref: ./common.yaml#/components/schemas/Identifier 267 | database_name: 268 | $ref: ./common.yaml#/components/schemas/Identifier 269 | readOnly: true 270 | schema_name: 271 | $ref: ./common.yaml#/components/schemas/Identifier 272 | readOnly: true 273 | created_on: 274 | type: string 275 | description: Time the image repository was created. 276 | format: date-time 277 | readOnly: true 278 | repository_url: 279 | type: string 280 | description: Current URL of the image repository. 281 | readOnly: true 282 | owner: 283 | type: string 284 | description: Identifier for the current owner of the image repository. 285 | readOnly: true 286 | owner_role_type: 287 | type: string 288 | description: Role type of the image repository owner. 289 | readOnly: true 290 | example: 291 | name: image_repository_name 292 | database_name: test_db 293 | schema_name: test_schema 294 | created_on: '2024-06-18T01:01:01.111111' 295 | repository_url: https://www.snowflake.com 296 | owner: IMAGE_ADMIN 297 | owner_role_type: ADMIN 298 | required: 299 | - name 300 | securitySchemes: 301 | KeyPair: 302 | $ref: common.yaml#/components/securitySchemes/KeyPair 303 | ExternalOAuth: 304 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 305 | SnowflakeOAuth: 306 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 307 | security: 308 | - KeyPair: [] 309 | - ExternalOAuth: [] 310 | - SnowflakeOAuth: [] 311 | -------------------------------------------------------------------------------- /specifications/managed-account.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake Managed Account API 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Managed Account API 8 | description: The Snowflake Managed Account API is a REST API that you can use to 9 | access, update, and perform certain actions on Managed Account resource in Snowflake. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/managed-accounts: 16 | get: 17 | summary: List managed accounts. 18 | tags: 19 | - managed-account 20 | description: Lists the accessible managed accounts. 21 | operationId: listManagedAccounts 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/like 24 | responses: 25 | '200': 26 | description: Successful request. 27 | headers: 28 | X-Snowflake-Request-ID: 29 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 30 | content: 31 | application/json: 32 | schema: 33 | type: array 34 | items: 35 | $ref: '#/components/schemas/ManagedAccount' 36 | '202': 37 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 38 | '400': 39 | $ref: common.yaml#/components/responses/400BadRequest 40 | '401': 41 | $ref: common.yaml#/components/responses/401Unauthorized 42 | '403': 43 | $ref: common.yaml#/components/responses/403Forbidden 44 | '404': 45 | $ref: common.yaml#/components/responses/404NotFound 46 | '405': 47 | $ref: common.yaml#/components/responses/405MethodNotAllowed 48 | '408': 49 | $ref: common.yaml#/components/responses/408RequestTimeout 50 | '409': 51 | $ref: common.yaml#/components/responses/409Conflict 52 | '410': 53 | $ref: common.yaml#/components/responses/410Gone 54 | '429': 55 | $ref: common.yaml#/components/responses/429LimitExceeded 56 | '500': 57 | $ref: common.yaml#/components/responses/500InternalServerError 58 | '503': 59 | $ref: common.yaml#/components/responses/503ServiceUnavailable 60 | '504': 61 | $ref: common.yaml#/components/responses/504GatewayTimeout 62 | post: 63 | summary: Create a managed accounts. 64 | tags: 65 | - managed-account 66 | description: Creates a managed account. You must provide the full managed account 67 | definition when creating a managed account. 68 | operationId: createManagedAccount 69 | requestBody: 70 | required: true 71 | content: 72 | application/json: 73 | schema: 74 | $ref: '#/components/schemas/ManagedAccount' 75 | responses: 76 | '200': 77 | $ref: common.yaml#/components/responses/200SuccessResponse 78 | '202': 79 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 80 | '400': 81 | $ref: common.yaml#/components/responses/400BadRequest 82 | '401': 83 | $ref: common.yaml#/components/responses/401Unauthorized 84 | '403': 85 | $ref: common.yaml#/components/responses/403Forbidden 86 | '404': 87 | $ref: common.yaml#/components/responses/404NotFound 88 | '405': 89 | $ref: common.yaml#/components/responses/405MethodNotAllowed 90 | '408': 91 | $ref: common.yaml#/components/responses/408RequestTimeout 92 | '409': 93 | $ref: common.yaml#/components/responses/409Conflict 94 | '410': 95 | $ref: common.yaml#/components/responses/410Gone 96 | '429': 97 | $ref: common.yaml#/components/responses/429LimitExceeded 98 | '500': 99 | $ref: common.yaml#/components/responses/500InternalServerError 100 | '503': 101 | $ref: common.yaml#/components/responses/503ServiceUnavailable 102 | '504': 103 | $ref: common.yaml#/components/responses/504GatewayTimeout 104 | /api/v2/managed-accounts/{name}: 105 | delete: 106 | summary: Delete a managed account. 107 | tags: 108 | - managed-account 109 | description: Removes a managed account, including all objects created in the 110 | account, and immediately restricts access to the account. Currently used by 111 | data providers to create reader accounts for their consumers. For more details, 112 | see Manage reader accounts. 113 | operationId: deleteManagedAccount 114 | parameters: 115 | - $ref: common.yaml#/components/parameters/name 116 | responses: 117 | '200': 118 | $ref: common.yaml#/components/responses/200SuccessResponse 119 | '202': 120 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 121 | '400': 122 | $ref: common.yaml#/components/responses/400BadRequest 123 | '401': 124 | $ref: common.yaml#/components/responses/401Unauthorized 125 | '403': 126 | $ref: common.yaml#/components/responses/403Forbidden 127 | '404': 128 | $ref: common.yaml#/components/responses/404NotFound 129 | '405': 130 | $ref: common.yaml#/components/responses/405MethodNotAllowed 131 | '408': 132 | $ref: common.yaml#/components/responses/408RequestTimeout 133 | '409': 134 | $ref: common.yaml#/components/responses/409Conflict 135 | '410': 136 | $ref: common.yaml#/components/responses/410Gone 137 | '429': 138 | $ref: common.yaml#/components/responses/429LimitExceeded 139 | '500': 140 | $ref: common.yaml#/components/responses/500InternalServerError 141 | '503': 142 | $ref: common.yaml#/components/responses/503ServiceUnavailable 143 | '504': 144 | $ref: common.yaml#/components/responses/504GatewayTimeout 145 | components: 146 | schemas: 147 | ManagedAccount: 148 | type: object 149 | description: Snowflake account object. 150 | properties: 151 | name: 152 | $ref: ./common.yaml#/components/schemas/Identifier 153 | description: Name of the account. 154 | cloud: 155 | type: string 156 | readOnly: true 157 | description: Cloud in which the managed account is located. For reader accounts, 158 | this is always the same as the cloud for the provider account. 159 | region: 160 | type: string 161 | readOnly: true 162 | description: Region in which the managed account is located. For reader 163 | accounts, this is always the same as the region for the provider account. 164 | locator: 165 | type: string 166 | readOnly: true 167 | description: Legacy identifier for the account. 168 | created_on: 169 | type: string 170 | format: date-time 171 | readOnly: true 172 | description: Date and time the account was created. 173 | url: 174 | type: string 175 | readOnly: true 176 | description: Account URL that is used to connect to the account, in the 177 | account name format. The account identifier in this format follows the 178 | pattern -. 179 | account_locator_url: 180 | type: string 181 | readOnly: true 182 | description: Account URL that is used to connect to the account, in the 183 | legacy account locator format. 184 | comment: 185 | type: string 186 | description: Optional comment in which to store information related to the 187 | account. 188 | admin_name: 189 | type: string 190 | description: Name of the account administrator. 191 | writeOnly: true 192 | nullable: true 193 | admin_password: 194 | type: string 195 | description: Password for the account administrator. 196 | writeOnly: true 197 | nullable: true 198 | format: password 199 | account_type: 200 | type: string 201 | description: Type of the account. 202 | enum: 203 | - READER 204 | default: READER 205 | required: 206 | - name 207 | - admin_name 208 | - admin_password 209 | - account_type 210 | securitySchemes: 211 | KeyPair: 212 | $ref: common.yaml#/components/securitySchemes/KeyPair 213 | ExternalOAuth: 214 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 215 | SnowflakeOAuth: 216 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 217 | security: 218 | - KeyPair: [] 219 | - ExternalOAuth: [] 220 | - SnowflakeOAuth: [] 221 | tags: 222 | - name: managed-account 223 | -------------------------------------------------------------------------------- /specifications/network-policy.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Network Policy API 8 | description: The Snowflake Network Policy API is a REST API that you can use to 9 | access, update, and perform certain actions on Network Policy resource in a Snowflake 10 | database. 11 | contact: 12 | name: Snowflake, Inc. 13 | url: https://snowflake.com 14 | email: support@snowflake.com 15 | paths: 16 | /api/v2/network-policies: 17 | get: 18 | summary: List network policies 19 | tags: 20 | - network-policy 21 | description: List network policies 22 | operationId: listNetworkPolicies 23 | parameters: [] 24 | responses: 25 | '200': 26 | description: successful 27 | headers: 28 | X-Snowflake-Request-ID: 29 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 30 | content: 31 | application/json: 32 | schema: 33 | type: array 34 | items: 35 | $ref: '#/components/schemas/NetworkPolicy' 36 | '202': 37 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 38 | '400': 39 | $ref: common.yaml#/components/responses/400BadRequest 40 | '401': 41 | $ref: common.yaml#/components/responses/401Unauthorized 42 | '403': 43 | $ref: common.yaml#/components/responses/403Forbidden 44 | '404': 45 | $ref: common.yaml#/components/responses/404NotFound 46 | '405': 47 | $ref: common.yaml#/components/responses/405MethodNotAllowed 48 | '408': 49 | $ref: common.yaml#/components/responses/408RequestTimeout 50 | '409': 51 | $ref: common.yaml#/components/responses/409Conflict 52 | '410': 53 | $ref: common.yaml#/components/responses/410Gone 54 | '429': 55 | $ref: common.yaml#/components/responses/429LimitExceeded 56 | '500': 57 | $ref: common.yaml#/components/responses/500InternalServerError 58 | '503': 59 | $ref: common.yaml#/components/responses/503ServiceUnavailable 60 | '504': 61 | $ref: common.yaml#/components/responses/504GatewayTimeout 62 | post: 63 | summary: Create a network policy 64 | tags: 65 | - network-policy 66 | description: Create a network policy 67 | operationId: createNetworkPolicy 68 | parameters: 69 | - $ref: common.yaml#/components/parameters/createMode 70 | responses: 71 | '200': 72 | $ref: common.yaml#/components/responses/200SuccessResponse 73 | '202': 74 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 75 | '400': 76 | $ref: common.yaml#/components/responses/400BadRequest 77 | '401': 78 | $ref: common.yaml#/components/responses/401Unauthorized 79 | '403': 80 | $ref: common.yaml#/components/responses/403Forbidden 81 | '404': 82 | $ref: common.yaml#/components/responses/404NotFound 83 | '405': 84 | $ref: common.yaml#/components/responses/405MethodNotAllowed 85 | '408': 86 | $ref: common.yaml#/components/responses/408RequestTimeout 87 | '409': 88 | $ref: common.yaml#/components/responses/409Conflict 89 | '410': 90 | $ref: common.yaml#/components/responses/410Gone 91 | '429': 92 | $ref: common.yaml#/components/responses/429LimitExceeded 93 | '500': 94 | $ref: common.yaml#/components/responses/500InternalServerError 95 | '503': 96 | $ref: common.yaml#/components/responses/503ServiceUnavailable 97 | '504': 98 | $ref: common.yaml#/components/responses/504GatewayTimeout 99 | requestBody: 100 | required: true 101 | content: 102 | application/json: 103 | schema: 104 | $ref: '#/components/schemas/NetworkPolicy' 105 | /api/v2/network-policies/{name}: 106 | get: 107 | summary: Fetch a network policy 108 | tags: 109 | - network-policy 110 | description: Fetch a network policy 111 | operationId: fetchNetworkPolicy 112 | parameters: 113 | - $ref: common.yaml#/components/parameters/name 114 | responses: 115 | '200': 116 | description: successful 117 | headers: 118 | X-Snowflake-Request-ID: 119 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 120 | content: 121 | application/json: 122 | schema: 123 | $ref: '#/components/schemas/NetworkPolicy' 124 | '202': 125 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 126 | '400': 127 | $ref: common.yaml#/components/responses/400BadRequest 128 | '401': 129 | $ref: common.yaml#/components/responses/401Unauthorized 130 | '403': 131 | $ref: common.yaml#/components/responses/403Forbidden 132 | '404': 133 | $ref: common.yaml#/components/responses/404NotFound 134 | '405': 135 | $ref: common.yaml#/components/responses/405MethodNotAllowed 136 | '408': 137 | $ref: common.yaml#/components/responses/408RequestTimeout 138 | '409': 139 | $ref: common.yaml#/components/responses/409Conflict 140 | '410': 141 | $ref: common.yaml#/components/responses/410Gone 142 | '429': 143 | $ref: common.yaml#/components/responses/429LimitExceeded 144 | '500': 145 | $ref: common.yaml#/components/responses/500InternalServerError 146 | '503': 147 | $ref: common.yaml#/components/responses/503ServiceUnavailable 148 | '504': 149 | $ref: common.yaml#/components/responses/504GatewayTimeout 150 | delete: 151 | summary: Delete a network policy 152 | tags: 153 | - network-policy 154 | description: Delete a network policy 155 | operationId: deleteNetworkPolicy 156 | parameters: 157 | - $ref: common.yaml#/components/parameters/name 158 | - $ref: common.yaml#/components/parameters/ifExists 159 | responses: 160 | '200': 161 | $ref: common.yaml#/components/responses/200SuccessResponse 162 | '202': 163 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 164 | '400': 165 | $ref: common.yaml#/components/responses/400BadRequest 166 | '401': 167 | $ref: common.yaml#/components/responses/401Unauthorized 168 | '403': 169 | $ref: common.yaml#/components/responses/403Forbidden 170 | '404': 171 | $ref: common.yaml#/components/responses/404NotFound 172 | '405': 173 | $ref: common.yaml#/components/responses/405MethodNotAllowed 174 | '408': 175 | $ref: common.yaml#/components/responses/408RequestTimeout 176 | '409': 177 | $ref: common.yaml#/components/responses/409Conflict 178 | '410': 179 | $ref: common.yaml#/components/responses/410Gone 180 | '429': 181 | $ref: common.yaml#/components/responses/429LimitExceeded 182 | '500': 183 | $ref: common.yaml#/components/responses/500InternalServerError 184 | '503': 185 | $ref: common.yaml#/components/responses/503ServiceUnavailable 186 | '504': 187 | $ref: common.yaml#/components/responses/504GatewayTimeout 188 | components: 189 | schemas: 190 | NetworkPolicy: 191 | type: object 192 | description: A Snowflake network policy 193 | properties: 194 | name: 195 | type: string 196 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 197 | description: Name of the network policy 198 | allowed_network_rule_list: 199 | type: array 200 | items: 201 | type: string 202 | description: List of names of allowed network rules in a network policy 203 | blocked_network_rule_list: 204 | type: array 205 | items: 206 | type: string 207 | description: List of names of blocked network rules in a network policy 208 | allowed_ip_list: 209 | type: array 210 | items: 211 | type: string 212 | description: List of allowed IPs in a network policy 213 | blocked_ip_list: 214 | type: array 215 | items: 216 | type: string 217 | description: List of blocked IPs in a network policy 218 | comment: 219 | type: string 220 | description: user comment associated to an object in the dictionary 221 | created_on: 222 | type: string 223 | format: date-time 224 | readOnly: true 225 | description: Date and time when the network policy was created. 226 | owner: 227 | type: string 228 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 229 | readOnly: true 230 | description: Role that owns the network policy 231 | owner_role_type: 232 | type: string 233 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 234 | readOnly: true 235 | description: The type of role that owns the network policy 236 | required: 237 | - name 238 | -------------------------------------------------------------------------------- /specifications/notification-integration.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Notification Integration API 8 | description: The Snowflake Notification Integration API is a REST API that you can 9 | use to access, update, and perform certain actions on Notification Integration 10 | resource in a Snowflake database. 11 | contact: 12 | name: Snowflake, Inc. 13 | url: https://snowflake.com 14 | email: support@snowflake.com 15 | paths: 16 | /api/v2/notification-integrations: 17 | get: 18 | summary: List notification integrations 19 | tags: 20 | - notification-integration 21 | description: List notification integrations 22 | operationId: listNotificationIntegrations 23 | parameters: 24 | - $ref: common.yaml#/components/parameters/like 25 | responses: 26 | '200': 27 | description: successful 28 | headers: 29 | X-Snowflake-Request-ID: 30 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 31 | Link: 32 | $ref: common.yaml#/components/headers/Link 33 | content: 34 | application/json: 35 | schema: 36 | type: array 37 | items: 38 | $ref: '#/components/schemas/NotificationIntegration' 39 | '202': 40 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 41 | '400': 42 | $ref: common.yaml#/components/responses/400BadRequest 43 | '401': 44 | $ref: common.yaml#/components/responses/401Unauthorized 45 | '403': 46 | $ref: common.yaml#/components/responses/403Forbidden 47 | '404': 48 | $ref: common.yaml#/components/responses/404NotFound 49 | '405': 50 | $ref: common.yaml#/components/responses/405MethodNotAllowed 51 | '408': 52 | $ref: common.yaml#/components/responses/408RequestTimeout 53 | '409': 54 | $ref: common.yaml#/components/responses/409Conflict 55 | '410': 56 | $ref: common.yaml#/components/responses/410Gone 57 | '429': 58 | $ref: common.yaml#/components/responses/429LimitExceeded 59 | '500': 60 | $ref: common.yaml#/components/responses/500InternalServerError 61 | '503': 62 | $ref: common.yaml#/components/responses/503ServiceUnavailable 63 | '504': 64 | $ref: common.yaml#/components/responses/504GatewayTimeout 65 | post: 66 | summary: Create a notification integration 67 | tags: 68 | - notification-integration 69 | description: Create a notification integration 70 | operationId: createNotificationIntegration 71 | parameters: 72 | - $ref: common.yaml#/components/parameters/createMode 73 | responses: 74 | '200': 75 | $ref: common.yaml#/components/responses/200SuccessResponse 76 | '202': 77 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 78 | '400': 79 | $ref: common.yaml#/components/responses/400BadRequest 80 | '401': 81 | $ref: common.yaml#/components/responses/401Unauthorized 82 | '403': 83 | $ref: common.yaml#/components/responses/403Forbidden 84 | '404': 85 | $ref: common.yaml#/components/responses/404NotFound 86 | '405': 87 | $ref: common.yaml#/components/responses/405MethodNotAllowed 88 | '408': 89 | $ref: common.yaml#/components/responses/408RequestTimeout 90 | '409': 91 | $ref: common.yaml#/components/responses/409Conflict 92 | '410': 93 | $ref: common.yaml#/components/responses/410Gone 94 | '429': 95 | $ref: common.yaml#/components/responses/429LimitExceeded 96 | '500': 97 | $ref: common.yaml#/components/responses/500InternalServerError 98 | '503': 99 | $ref: common.yaml#/components/responses/503ServiceUnavailable 100 | '504': 101 | $ref: common.yaml#/components/responses/504GatewayTimeout 102 | requestBody: 103 | required: true 104 | content: 105 | application/json: 106 | schema: 107 | $ref: '#/components/schemas/NotificationIntegration' 108 | /api/v2/notification-integrations/{name}: 109 | get: 110 | summary: Fetch a notification integration 111 | tags: 112 | - notification-integration 113 | description: Fetch a notification integration 114 | operationId: fetchNotificationIntegration 115 | parameters: 116 | - $ref: common.yaml#/components/parameters/name 117 | responses: 118 | '200': 119 | description: successful 120 | headers: 121 | X-Snowflake-Request-ID: 122 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 123 | Link: 124 | $ref: common.yaml#/components/headers/Link 125 | content: 126 | application/json: 127 | schema: 128 | $ref: '#/components/schemas/NotificationIntegration' 129 | '202': 130 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 131 | '400': 132 | $ref: common.yaml#/components/responses/400BadRequest 133 | '401': 134 | $ref: common.yaml#/components/responses/401Unauthorized 135 | '403': 136 | $ref: common.yaml#/components/responses/403Forbidden 137 | '404': 138 | $ref: common.yaml#/components/responses/404NotFound 139 | '405': 140 | $ref: common.yaml#/components/responses/405MethodNotAllowed 141 | '408': 142 | $ref: common.yaml#/components/responses/408RequestTimeout 143 | '409': 144 | $ref: common.yaml#/components/responses/409Conflict 145 | '410': 146 | $ref: common.yaml#/components/responses/410Gone 147 | '429': 148 | $ref: common.yaml#/components/responses/429LimitExceeded 149 | '500': 150 | $ref: common.yaml#/components/responses/500InternalServerError 151 | '503': 152 | $ref: common.yaml#/components/responses/503ServiceUnavailable 153 | '504': 154 | $ref: common.yaml#/components/responses/504GatewayTimeout 155 | delete: 156 | summary: Delete a notification integration 157 | tags: 158 | - notification-integration 159 | description: Delete a notification integration 160 | operationId: deleteNotificationIntegration 161 | parameters: 162 | - $ref: common.yaml#/components/parameters/name 163 | - $ref: common.yaml#/components/parameters/ifExists 164 | responses: 165 | '200': 166 | $ref: common.yaml#/components/responses/200SuccessResponse 167 | '202': 168 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 169 | '400': 170 | $ref: common.yaml#/components/responses/400BadRequest 171 | '401': 172 | $ref: common.yaml#/components/responses/401Unauthorized 173 | '403': 174 | $ref: common.yaml#/components/responses/403Forbidden 175 | '404': 176 | $ref: common.yaml#/components/responses/404NotFound 177 | '405': 178 | $ref: common.yaml#/components/responses/405MethodNotAllowed 179 | '408': 180 | $ref: common.yaml#/components/responses/408RequestTimeout 181 | '409': 182 | $ref: common.yaml#/components/responses/409Conflict 183 | '410': 184 | $ref: common.yaml#/components/responses/410Gone 185 | '429': 186 | $ref: common.yaml#/components/responses/429LimitExceeded 187 | '500': 188 | $ref: common.yaml#/components/responses/500InternalServerError 189 | '503': 190 | $ref: common.yaml#/components/responses/503ServiceUnavailable 191 | '504': 192 | $ref: common.yaml#/components/responses/504GatewayTimeout 193 | components: 194 | schemas: 195 | NotificationIntegration: 196 | type: object 197 | description: A Snowflake notification 198 | properties: 199 | name: 200 | type: string 201 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 202 | description: Name of the notification. 203 | enabled: 204 | type: boolean 205 | description: Whether the notification integration is enabled. 206 | comment: 207 | type: string 208 | description: Comment for the notification integration. 209 | created_on: 210 | type: string 211 | format: date-time 212 | readOnly: true 213 | description: Date and time when the notification was created. 214 | notification_hook: 215 | $ref: '#/components/schemas/NotificationHook' 216 | required: 217 | - name 218 | - notification_hook 219 | NotificationHook: 220 | type: object 221 | properties: 222 | type: 223 | type: string 224 | enum: 225 | - EMAIL 226 | - WEBHOOK 227 | - QUEUE_AWS_SNS_OUTBOUND 228 | - QUEUE_AZURE_EVENT_GRID_OUTBOUND 229 | - QUEUE_GCP_PUBSUB_OUTBOUND 230 | - QUEUE_AZURE_EVENT_GRID_INBOUND 231 | - QUEUE_GCP_PUBSUB_INBOUND 232 | description: Type of NotificationHook, can be QUEUE, EMAIL or WEBHOOK 233 | required: 234 | - type 235 | discriminator: 236 | propertyName: type 237 | mapping: 238 | EMAIL: NotificationEmail 239 | WEBHOOK: NotificationWebhook 240 | QUEUE_AWS_SNS_OUTBOUND: NotificationQueueAwsSnsOutbound 241 | QUEUE_AZURE_EVENT_GRID_OUTBOUND: NotificationQueueAzureEventGridOutbound 242 | QUEUE_GCP_PUBSUB_OUTBOUND: NotificationQueueGcpPubsubOutbound 243 | QUEUE_AZURE_EVENT_GRID_INBOUND: NotificationQueueAzureEventGridInbound 244 | QUEUE_GCP_PUBSUB_INBOUND: NotificationQueueGcpPubsubInbound 245 | NotificationEmail: 246 | allOf: 247 | - $ref: '#/components/schemas/NotificationHook' 248 | properties: 249 | allowed_recipients: 250 | type: array 251 | items: 252 | type: string 253 | description: A comma-separated list of quoted email addresses that can receive 254 | notification emails from this integration. 255 | default_recipients: 256 | type: array 257 | items: 258 | type: string 259 | description: A comma-separated list of default recipients for messages sent 260 | with this integration. 261 | default_subject: 262 | type: string 263 | description: the default subject line for messages sent with this integration. 264 | NotificationWebhook: 265 | allOf: 266 | - $ref: '#/components/schemas/NotificationHook' 267 | properties: 268 | webhook_url: 269 | type: string 270 | description: The URL for the webhook. The URL must use the https:// protocol. 271 | webhook_secret: 272 | $ref: '#/components/schemas/WebhookSecret' 273 | description: The secret to use with this integration. 274 | webhook_body_template: 275 | type: string 276 | description: A template for the body of the HTTP request to send for the 277 | notification. 278 | webhook_headers: 279 | type: object 280 | additionalProperties: 281 | type: string 282 | description: A list of HTTP headers and values to include in the HTTP request 283 | for the webhook. 284 | required: 285 | - webhook_url 286 | WebhookSecret: 287 | type: object 288 | properties: 289 | name: 290 | type: string 291 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 292 | description: The name of the secret. 293 | database_name: 294 | type: string 295 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 296 | description: The database which stores the secret. 297 | schema_name: 298 | type: string 299 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 300 | description: The schema which stores the secret. 301 | required: 302 | - name 303 | - database_name 304 | - schema_name 305 | NotificationQueueAwsSnsOutbound: 306 | allOf: 307 | - $ref: '#/components/schemas/NotificationHook' 308 | properties: 309 | aws_sns_topic_arn: 310 | type: string 311 | description: Amazon Resource Name (ARN) of the Amazon SNS (SNS) topic to 312 | which notifications are pushed. 313 | aws_sns_role_arn: 314 | type: string 315 | description: ARN of the IAM role that has permissions to publish messages 316 | to the SNS topic. 317 | sf_aws_iam_user_arn: 318 | type: string 319 | readOnly: true 320 | description: ARN for the Snowflake IAM user created for your account. 321 | sf_aws_external_id: 322 | type: string 323 | readOnly: true 324 | description: External ID for the Snowflake IAM user created for your account. 325 | NotificationQueueAzureEventGridOutbound: 326 | allOf: 327 | - $ref: '#/components/schemas/NotificationHook' 328 | properties: 329 | azure_event_grid_topic_endpoint: 330 | type: string 331 | description: Event Grid topic endpoint to which Snowpipe pushes notifications. 332 | azure_tenant_id: 333 | type: string 334 | description: ID of the Azure Active Directory tenant used for identity management. 335 | azure_consent_url: 336 | type: string 337 | readOnly: true 338 | description: URL to the Microsoft permissions request page. 339 | azure_multi_tenant_app_name: 340 | type: string 341 | readOnly: true 342 | description: Name of the Snowflake client application created for your account. 343 | NotificationQueueGcpPubsubOutbound: 344 | allOf: 345 | - $ref: '#/components/schemas/NotificationHook' 346 | properties: 347 | gcp_pubsub_topic_name: 348 | type: string 349 | description: Identification of the Pub/Sub topic to which Snowpipe pushes 350 | notifications. 351 | gcp_pubsub_service_account: 352 | type: string 353 | readOnly: true 354 | description: Google Cloud Platform (GCP) service account created for your 355 | account. 356 | NotificationQueueAzureEventGridInbound: 357 | allOf: 358 | - $ref: '#/components/schemas/NotificationHook' 359 | properties: 360 | azure_storage_queue_primary_uri: 361 | type: string 362 | description: the queue ID for the Azure Queue Storage queue created for 363 | Event Grid notifications. 364 | azure_tenant_id: 365 | type: string 366 | description: the ID of the Azure Active Directory tenant used for identity 367 | management. 368 | azure_consent_url: 369 | type: string 370 | readOnly: true 371 | description: URL to the Microsoft permissions request page. 372 | azure_multi_tenant_app_name: 373 | type: string 374 | readOnly: true 375 | description: Name of the Snowflake client application created for your account. 376 | NotificationQueueGcpPubsubInbound: 377 | allOf: 378 | - $ref: '#/components/schemas/NotificationHook' 379 | properties: 380 | gcp_pubsub_subscription_name: 381 | type: string 382 | description: Pub/Sub topic subscription ID used to allow Snowflake access 383 | to event messages. 384 | gcp_pubsub_service_account: 385 | type: string 386 | readOnly: true 387 | description: Google Cloud Platform (GCP) service account created for your 388 | account. 389 | securitySchemes: 390 | KeyPair: 391 | $ref: common.yaml#/components/securitySchemes/KeyPair 392 | ExternalOAuth: 393 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 394 | SnowflakeOAuth: 395 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 396 | security: 397 | - KeyPair: [] 398 | - ExternalOAuth: [] 399 | - SnowflakeOAuth: [] 400 | -------------------------------------------------------------------------------- /specifications/pipe.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Pipe API 8 | description: The Snowflake Pipe API is a REST API that you can use to access, update, 9 | and perform certain actions on Pipe resource in a Snowflake database. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/databases/{database}/schemas/{schema}/pipes: 16 | get: 17 | summary: List pipes 18 | tags: 19 | - pipe 20 | description: List pipes 21 | operationId: listPipes 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/database 24 | - $ref: common.yaml#/components/parameters/schema 25 | - $ref: common.yaml#/components/parameters/like 26 | responses: 27 | '200': 28 | description: successful 29 | headers: 30 | X-Snowflake-Request-ID: 31 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 32 | content: 33 | application/json: 34 | schema: 35 | type: array 36 | items: 37 | $ref: '#/components/schemas/Pipe' 38 | '202': 39 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 40 | '400': 41 | $ref: common.yaml#/components/responses/400BadRequest 42 | '401': 43 | $ref: common.yaml#/components/responses/401Unauthorized 44 | '403': 45 | $ref: common.yaml#/components/responses/403Forbidden 46 | '404': 47 | $ref: common.yaml#/components/responses/404NotFound 48 | '405': 49 | $ref: common.yaml#/components/responses/405MethodNotAllowed 50 | '408': 51 | $ref: common.yaml#/components/responses/408RequestTimeout 52 | '409': 53 | $ref: common.yaml#/components/responses/409Conflict 54 | '410': 55 | $ref: common.yaml#/components/responses/410Gone 56 | '429': 57 | $ref: common.yaml#/components/responses/429LimitExceeded 58 | '500': 59 | $ref: common.yaml#/components/responses/500InternalServerError 60 | '503': 61 | $ref: common.yaml#/components/responses/503ServiceUnavailable 62 | '504': 63 | $ref: common.yaml#/components/responses/504GatewayTimeout 64 | post: 65 | summary: Create a pipe 66 | tags: 67 | - pipe 68 | description: Create a pipe 69 | operationId: createPipe 70 | parameters: 71 | - $ref: common.yaml#/components/parameters/database 72 | - $ref: common.yaml#/components/parameters/schema 73 | - $ref: common.yaml#/components/parameters/createMode 74 | responses: 75 | '200': 76 | $ref: common.yaml#/components/responses/200SuccessResponse 77 | '202': 78 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 79 | '400': 80 | $ref: common.yaml#/components/responses/400BadRequest 81 | '401': 82 | $ref: common.yaml#/components/responses/401Unauthorized 83 | '403': 84 | $ref: common.yaml#/components/responses/403Forbidden 85 | '404': 86 | $ref: common.yaml#/components/responses/404NotFound 87 | '405': 88 | $ref: common.yaml#/components/responses/405MethodNotAllowed 89 | '408': 90 | $ref: common.yaml#/components/responses/408RequestTimeout 91 | '409': 92 | $ref: common.yaml#/components/responses/409Conflict 93 | '410': 94 | $ref: common.yaml#/components/responses/410Gone 95 | '429': 96 | $ref: common.yaml#/components/responses/429LimitExceeded 97 | '500': 98 | $ref: common.yaml#/components/responses/500InternalServerError 99 | '503': 100 | $ref: common.yaml#/components/responses/503ServiceUnavailable 101 | '504': 102 | $ref: common.yaml#/components/responses/504GatewayTimeout 103 | requestBody: 104 | required: true 105 | content: 106 | application/json: 107 | schema: 108 | $ref: '#/components/schemas/Pipe' 109 | /api/v2/databases/{database}/schemas/{schema}/pipes/{name}: 110 | get: 111 | summary: Fetch a pipe 112 | tags: 113 | - pipe 114 | description: Fetch a pipe 115 | operationId: fetchPipe 116 | parameters: 117 | - $ref: common.yaml#/components/parameters/database 118 | - $ref: common.yaml#/components/parameters/schema 119 | - $ref: common.yaml#/components/parameters/name 120 | responses: 121 | '200': 122 | description: successful 123 | headers: 124 | X-Snowflake-Request-ID: 125 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 126 | content: 127 | application/json: 128 | schema: 129 | $ref: '#/components/schemas/Pipe' 130 | '202': 131 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 132 | '400': 133 | $ref: common.yaml#/components/responses/400BadRequest 134 | '401': 135 | $ref: common.yaml#/components/responses/401Unauthorized 136 | '403': 137 | $ref: common.yaml#/components/responses/403Forbidden 138 | '404': 139 | $ref: common.yaml#/components/responses/404NotFound 140 | '405': 141 | $ref: common.yaml#/components/responses/405MethodNotAllowed 142 | '408': 143 | $ref: common.yaml#/components/responses/408RequestTimeout 144 | '409': 145 | $ref: common.yaml#/components/responses/409Conflict 146 | '410': 147 | $ref: common.yaml#/components/responses/410Gone 148 | '429': 149 | $ref: common.yaml#/components/responses/429LimitExceeded 150 | '500': 151 | $ref: common.yaml#/components/responses/500InternalServerError 152 | '503': 153 | $ref: common.yaml#/components/responses/503ServiceUnavailable 154 | '504': 155 | $ref: common.yaml#/components/responses/504GatewayTimeout 156 | delete: 157 | summary: Delete a pipe 158 | tags: 159 | - pipe 160 | description: Delete a pipe 161 | operationId: deletePipe 162 | parameters: 163 | - $ref: common.yaml#/components/parameters/database 164 | - $ref: common.yaml#/components/parameters/schema 165 | - $ref: common.yaml#/components/parameters/name 166 | - $ref: common.yaml#/components/parameters/ifExists 167 | responses: 168 | '200': 169 | $ref: common.yaml#/components/responses/200SuccessResponse 170 | '202': 171 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 172 | '400': 173 | $ref: common.yaml#/components/responses/400BadRequest 174 | '401': 175 | $ref: common.yaml#/components/responses/401Unauthorized 176 | '403': 177 | $ref: common.yaml#/components/responses/403Forbidden 178 | '404': 179 | $ref: common.yaml#/components/responses/404NotFound 180 | '405': 181 | $ref: common.yaml#/components/responses/405MethodNotAllowed 182 | '408': 183 | $ref: common.yaml#/components/responses/408RequestTimeout 184 | '409': 185 | $ref: common.yaml#/components/responses/409Conflict 186 | '410': 187 | $ref: common.yaml#/components/responses/410Gone 188 | '429': 189 | $ref: common.yaml#/components/responses/429LimitExceeded 190 | '500': 191 | $ref: common.yaml#/components/responses/500InternalServerError 192 | '503': 193 | $ref: common.yaml#/components/responses/503ServiceUnavailable 194 | '504': 195 | $ref: common.yaml#/components/responses/504GatewayTimeout 196 | /api/v2/databases/{database}/schemas/{schema}/pipes/{name}:refresh: 197 | post: 198 | summary: Refresh the pipe 199 | tags: 200 | - pipe 201 | description: Refresh the pipe 202 | operationId: refreshPipe 203 | parameters: 204 | - $ref: common.yaml#/components/parameters/database 205 | - $ref: common.yaml#/components/parameters/schema 206 | - $ref: common.yaml#/components/parameters/name 207 | - $ref: common.yaml#/components/parameters/ifExists 208 | - name: prefix 209 | description: Path (or prefix) appended to the stage reference in the pipe 210 | definition. The path limits the set of files to load. 211 | in: query 212 | required: false 213 | schema: 214 | type: string 215 | - name: modified_after 216 | description: Timestamp (in ISO-8601 format) of the oldest data files to copy 217 | into the Snowpipe ingest queue based on the LAST_MODIFIED date (i.e. date 218 | when a file was staged) 219 | in: query 220 | required: false 221 | schema: 222 | type: string 223 | format: date-time 224 | responses: 225 | '200': 226 | $ref: common.yaml#/components/responses/200SuccessResponse 227 | '202': 228 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 229 | '400': 230 | $ref: common.yaml#/components/responses/400BadRequest 231 | '401': 232 | $ref: common.yaml#/components/responses/401Unauthorized 233 | '403': 234 | $ref: common.yaml#/components/responses/403Forbidden 235 | '404': 236 | $ref: common.yaml#/components/responses/404NotFound 237 | '405': 238 | $ref: common.yaml#/components/responses/405MethodNotAllowed 239 | '408': 240 | $ref: common.yaml#/components/responses/408RequestTimeout 241 | '409': 242 | $ref: common.yaml#/components/responses/409Conflict 243 | '410': 244 | $ref: common.yaml#/components/responses/410Gone 245 | '429': 246 | $ref: common.yaml#/components/responses/429LimitExceeded 247 | '500': 248 | $ref: common.yaml#/components/responses/500InternalServerError 249 | '503': 250 | $ref: common.yaml#/components/responses/503ServiceUnavailable 251 | '504': 252 | $ref: common.yaml#/components/responses/504GatewayTimeout 253 | components: 254 | schemas: 255 | Pipe: 256 | type: object 257 | description: A Snowflake pipe 258 | properties: 259 | name: 260 | type: string 261 | description: Name of the pipe 262 | comment: 263 | type: string 264 | description: user comment associated to an object in the dictionary 265 | auto_ingest: 266 | type: boolean 267 | description: TRUE if all files from stage need to be auto-ingested 268 | error_integration: 269 | type: string 270 | description: Link to integration object that point to a user provided Azure 271 | storage queue / SQS. When present, errors (e.g. ingest failure for Snowpipe 272 | or a user task failure or replication failure) will be sent to this queue 273 | to notify customers 274 | aws_sns_topic: 275 | type: string 276 | description: Optional, if provided, auto_ingest pipe will only receive messages 277 | from this SNS topic. 278 | integration: 279 | type: string 280 | description: Link to integration object that ties a user provided storage 281 | queue to an auto_ingest enabled pipe. Required for auto_ingest to work 282 | on azure. 283 | copy_statement: 284 | type: string 285 | description: COPY INTO statement used to load data from queued files 286 | into a Snowflake table. This statement serves as the text/definition for 287 | the pipe and is displayed in the SHOW PIPES output 288 | pattern: (?i)^COPY INTO .* 289 | created_on: 290 | type: string 291 | format: date-time 292 | readOnly: true 293 | description: Date and time when the pipe was created. 294 | database_name: 295 | type: string 296 | readOnly: true 297 | description: Database in which the pipe is stored 298 | schema_name: 299 | type: string 300 | readOnly: true 301 | description: Schema in which the pipe is stored 302 | owner: 303 | type: string 304 | readOnly: true 305 | description: Role that owns the pipe 306 | pattern: 307 | type: string 308 | readOnly: true 309 | description: PATTERN copy option value in the COPY INTO
statement 310 | in the pipe definition, if the copy option was specified. 311 | owner_role_type: 312 | type: string 313 | readOnly: true 314 | description: The type of role that owns the pipe 315 | invalid_reason: 316 | type: string 317 | readOnly: true 318 | description: Displays some detailed information for your pipes that may 319 | have issues 320 | budget: 321 | type: string 322 | readOnly: true 323 | description: Name of the budget if the pipe is monitored by a budget 324 | required: 325 | - name 326 | - copy_statement 327 | securitySchemes: 328 | KeyPair: 329 | $ref: common.yaml#/components/securitySchemes/KeyPair 330 | ExternalOAuth: 331 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 332 | SnowflakeOAuth: 333 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 334 | security: 335 | - KeyPair: [] 336 | - ExternalOAuth: [] 337 | - SnowflakeOAuth: [] 338 | -------------------------------------------------------------------------------- /specifications/result.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake Result API 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Result API 8 | description: The Snowflake Result API is a REST API that you can use to check request 9 | status and fetch request response. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/results/{result_handler}: 16 | get: 17 | summary: Check result status or fetch request 18 | tags: 19 | - result 20 | description: Get result status or the result when it is ready. 21 | operationId: fetchResult 22 | parameters: 23 | - name: result_handler 24 | in: path 25 | required: true 26 | schema: 27 | type: string 28 | description: The opaque result id. 29 | - name: page 30 | in: query 31 | required: false 32 | schema: 33 | type: integer 34 | format: int64 35 | minimum: 0 36 | default: 0 37 | description: Number of the page of results to return. The number can range 38 | from 0 to the total number of pages minus 1. 39 | responses: 40 | '200': 41 | description: successful 42 | headers: 43 | X-Snowflake-Request-ID: 44 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 45 | Link: 46 | $ref: common.yaml#/components/headers/Link 47 | content: 48 | application/json: {} 49 | '202': 50 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 51 | '400': 52 | $ref: common.yaml#/components/responses/400BadRequest 53 | '401': 54 | $ref: common.yaml#/components/responses/401Unauthorized 55 | '403': 56 | $ref: common.yaml#/components/responses/403Forbidden 57 | '404': 58 | $ref: common.yaml#/components/responses/404NotFound 59 | '405': 60 | $ref: common.yaml#/components/responses/405MethodNotAllowed 61 | '408': 62 | $ref: common.yaml#/components/responses/408RequestTimeout 63 | '409': 64 | $ref: common.yaml#/components/responses/409Conflict 65 | '500': 66 | $ref: common.yaml#/components/responses/500InternalServerError 67 | '503': 68 | $ref: common.yaml#/components/responses/503ServiceUnavailable 69 | '504': 70 | $ref: common.yaml#/components/responses/504GatewayTimeout 71 | components: 72 | securitySchemes: 73 | KeyPair: 74 | $ref: common.yaml#/components/securitySchemes/KeyPair 75 | ExternalOAuth: 76 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 77 | SnowflakeOAuth: 78 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 79 | security: 80 | - KeyPair: [] 81 | - ExternalOAuth: [] 82 | - SnowflakeOAuth: [] 83 | -------------------------------------------------------------------------------- /specifications/stream.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake Stream API 8 | description: The Snowflake Stream API is a REST API that you can use to access, 9 | update, and perform certain actions on Stream resource in a Snowflake database. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/databases/{database}/schemas/{schema}/streams: 16 | get: 17 | summary: List streams 18 | tags: 19 | - stream 20 | description: List streams 21 | operationId: listStreams 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/database 24 | - $ref: common.yaml#/components/parameters/schema 25 | - $ref: common.yaml#/components/parameters/like 26 | - $ref: common.yaml#/components/parameters/startsWith 27 | - $ref: common.yaml#/components/parameters/showLimit 28 | - $ref: common.yaml#/components/parameters/fromName 29 | responses: 30 | '200': 31 | description: successful 32 | headers: 33 | X-Snowflake-Request-ID: 34 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 35 | content: 36 | application/json: 37 | schema: 38 | type: array 39 | items: 40 | $ref: '#/components/schemas/Stream' 41 | '202': 42 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 43 | '400': 44 | $ref: common.yaml#/components/responses/400BadRequest 45 | '401': 46 | $ref: common.yaml#/components/responses/401Unauthorized 47 | '403': 48 | $ref: common.yaml#/components/responses/403Forbidden 49 | '404': 50 | $ref: common.yaml#/components/responses/404NotFound 51 | '405': 52 | $ref: common.yaml#/components/responses/405MethodNotAllowed 53 | '408': 54 | $ref: common.yaml#/components/responses/408RequestTimeout 55 | '409': 56 | $ref: common.yaml#/components/responses/409Conflict 57 | '410': 58 | $ref: common.yaml#/components/responses/410Gone 59 | '429': 60 | $ref: common.yaml#/components/responses/429LimitExceeded 61 | '500': 62 | $ref: common.yaml#/components/responses/500InternalServerError 63 | '503': 64 | $ref: common.yaml#/components/responses/503ServiceUnavailable 65 | '504': 66 | $ref: common.yaml#/components/responses/504GatewayTimeout 67 | post: 68 | summary: Create a stream 69 | tags: 70 | - stream 71 | description: Create a stream 72 | operationId: createStream 73 | parameters: 74 | - $ref: common.yaml#/components/parameters/database 75 | - $ref: common.yaml#/components/parameters/schema 76 | - $ref: common.yaml#/components/parameters/createMode 77 | - $ref: common.yaml#/components/parameters/copyGrants 78 | responses: 79 | '200': 80 | $ref: common.yaml#/components/responses/200SuccessResponse 81 | '202': 82 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 83 | '400': 84 | $ref: common.yaml#/components/responses/400BadRequest 85 | '401': 86 | $ref: common.yaml#/components/responses/401Unauthorized 87 | '403': 88 | $ref: common.yaml#/components/responses/403Forbidden 89 | '404': 90 | $ref: common.yaml#/components/responses/404NotFound 91 | '405': 92 | $ref: common.yaml#/components/responses/405MethodNotAllowed 93 | '408': 94 | $ref: common.yaml#/components/responses/408RequestTimeout 95 | '409': 96 | $ref: common.yaml#/components/responses/409Conflict 97 | '410': 98 | $ref: common.yaml#/components/responses/410Gone 99 | '429': 100 | $ref: common.yaml#/components/responses/429LimitExceeded 101 | '500': 102 | $ref: common.yaml#/components/responses/500InternalServerError 103 | '503': 104 | $ref: common.yaml#/components/responses/503ServiceUnavailable 105 | '504': 106 | $ref: common.yaml#/components/responses/504GatewayTimeout 107 | requestBody: 108 | required: true 109 | content: 110 | application/json: 111 | schema: 112 | $ref: '#/components/schemas/Stream' 113 | /api/v2/databases/{database}/schemas/{schema}/streams/{name}: 114 | get: 115 | summary: Fetch a stream 116 | tags: 117 | - stream 118 | description: Fetch a stream 119 | operationId: fetchStream 120 | parameters: 121 | - $ref: common.yaml#/components/parameters/database 122 | - $ref: common.yaml#/components/parameters/schema 123 | - $ref: common.yaml#/components/parameters/name 124 | responses: 125 | '200': 126 | description: successful 127 | headers: 128 | X-Snowflake-Request-ID: 129 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 130 | content: 131 | application/json: 132 | schema: 133 | $ref: '#/components/schemas/Stream' 134 | '202': 135 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 136 | '400': 137 | $ref: common.yaml#/components/responses/400BadRequest 138 | '401': 139 | $ref: common.yaml#/components/responses/401Unauthorized 140 | '403': 141 | $ref: common.yaml#/components/responses/403Forbidden 142 | '404': 143 | $ref: common.yaml#/components/responses/404NotFound 144 | '405': 145 | $ref: common.yaml#/components/responses/405MethodNotAllowed 146 | '408': 147 | $ref: common.yaml#/components/responses/408RequestTimeout 148 | '409': 149 | $ref: common.yaml#/components/responses/409Conflict 150 | '410': 151 | $ref: common.yaml#/components/responses/410Gone 152 | '429': 153 | $ref: common.yaml#/components/responses/429LimitExceeded 154 | '500': 155 | $ref: common.yaml#/components/responses/500InternalServerError 156 | '503': 157 | $ref: common.yaml#/components/responses/503ServiceUnavailable 158 | '504': 159 | $ref: common.yaml#/components/responses/504GatewayTimeout 160 | delete: 161 | summary: Delete a stream 162 | tags: 163 | - stream 164 | description: Delete a stream 165 | operationId: deleteStream 166 | parameters: 167 | - $ref: common.yaml#/components/parameters/database 168 | - $ref: common.yaml#/components/parameters/schema 169 | - $ref: common.yaml#/components/parameters/name 170 | - $ref: common.yaml#/components/parameters/ifExists 171 | responses: 172 | '200': 173 | $ref: common.yaml#/components/responses/200SuccessResponse 174 | '202': 175 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 176 | '400': 177 | $ref: common.yaml#/components/responses/400BadRequest 178 | '401': 179 | $ref: common.yaml#/components/responses/401Unauthorized 180 | '403': 181 | $ref: common.yaml#/components/responses/403Forbidden 182 | '404': 183 | $ref: common.yaml#/components/responses/404NotFound 184 | '405': 185 | $ref: common.yaml#/components/responses/405MethodNotAllowed 186 | '408': 187 | $ref: common.yaml#/components/responses/408RequestTimeout 188 | '409': 189 | $ref: common.yaml#/components/responses/409Conflict 190 | '410': 191 | $ref: common.yaml#/components/responses/410Gone 192 | '429': 193 | $ref: common.yaml#/components/responses/429LimitExceeded 194 | '500': 195 | $ref: common.yaml#/components/responses/500InternalServerError 196 | '503': 197 | $ref: common.yaml#/components/responses/503ServiceUnavailable 198 | '504': 199 | $ref: common.yaml#/components/responses/504GatewayTimeout 200 | /api/v2/databases/{database}/schemas/{schema}/streams/{name}:clone: 201 | post: 202 | summary: Clone a stream 203 | tags: 204 | - stream 205 | description: Clone a stream 206 | operationId: cloneStream 207 | parameters: 208 | - $ref: common.yaml#/components/parameters/database 209 | - $ref: common.yaml#/components/parameters/schema 210 | - $ref: common.yaml#/components/parameters/name 211 | - $ref: common.yaml#/components/parameters/createMode 212 | - name: targetDatabase 213 | description: Database of the target resource. Defaults to the source's database 214 | in: query 215 | required: true 216 | schema: 217 | type: string 218 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 219 | - name: targetSchema 220 | description: Schema of the target resource. Defaults to the source's schema 221 | in: query 222 | required: true 223 | schema: 224 | type: string 225 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 226 | - $ref: common.yaml#/components/parameters/copyGrants 227 | responses: 228 | '200': 229 | $ref: common.yaml#/components/responses/200SuccessResponse 230 | '202': 231 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 232 | '400': 233 | $ref: common.yaml#/components/responses/400BadRequest 234 | '401': 235 | $ref: common.yaml#/components/responses/401Unauthorized 236 | '403': 237 | $ref: common.yaml#/components/responses/403Forbidden 238 | '404': 239 | $ref: common.yaml#/components/responses/404NotFound 240 | '405': 241 | $ref: common.yaml#/components/responses/405MethodNotAllowed 242 | '408': 243 | $ref: common.yaml#/components/responses/408RequestTimeout 244 | '409': 245 | $ref: common.yaml#/components/responses/409Conflict 246 | '410': 247 | $ref: common.yaml#/components/responses/410Gone 248 | '429': 249 | $ref: common.yaml#/components/responses/429LimitExceeded 250 | '500': 251 | $ref: common.yaml#/components/responses/500InternalServerError 252 | '503': 253 | $ref: common.yaml#/components/responses/503ServiceUnavailable 254 | '504': 255 | $ref: common.yaml#/components/responses/504GatewayTimeout 256 | requestBody: 257 | required: true 258 | content: 259 | application/json: 260 | schema: 261 | $ref: '#/components/schemas/StreamClone' 262 | components: 263 | schemas: 264 | Stream: 265 | type: object 266 | description: A Snowflake stream 267 | properties: 268 | created_on: 269 | type: string 270 | format: date-time 271 | readOnly: true 272 | description: Date and time when the stream was created. 273 | name: 274 | type: string 275 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 276 | description: Name of the stream 277 | stream_source: 278 | $ref: '#/components/schemas/StreamSource' 279 | description: Source for the stream 280 | comment: 281 | type: string 282 | description: user comment associated to an object in the dictionary 283 | database_name: 284 | type: string 285 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 286 | readOnly: true 287 | description: Database in which the stream is stored 288 | schema_name: 289 | type: string 290 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 291 | readOnly: true 292 | description: Schema in which the stream is stored 293 | owner: 294 | type: string 295 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 296 | readOnly: true 297 | description: Role that owns the stream 298 | table_name: 299 | type: string 300 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 301 | readOnly: true 302 | description: Table name whose changes are tracked by the stream 303 | stale: 304 | type: boolean 305 | readOnly: true 306 | description: Specifies whether the stream is stale or not 307 | mode: 308 | type: string 309 | readOnly: true 310 | description: 'Mode of the stream. Possible values include: APPEND_ONLY, 311 | INSERT_ONLY. For streams on tables, the column displays DEFAULT.' 312 | stale_after: 313 | type: string 314 | format: date-time 315 | readOnly: true 316 | description: 'Timestamp when the stream became stale or may become stale 317 | if not consumed. ' 318 | invalid_reason: 319 | type: string 320 | readOnly: true 321 | description: Reason why the stream cannot be queried successfully. This 322 | column supports future functionality. Currently, the only value returned 323 | is N/A. 324 | owner_role_type: 325 | type: string 326 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 327 | readOnly: true 328 | description: The type of role that owns the stream 329 | type: 330 | type: string 331 | readOnly: true 332 | description: Type of the stream; currently DELTA only. 333 | required: 334 | - name 335 | - stream_source 336 | StreamSource: 337 | type: object 338 | properties: 339 | src_type: 340 | type: string 341 | description: 'Type of the source. Possible values include: stream, table, 342 | view' 343 | name: 344 | type: string 345 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 346 | description: Name of the source whose changes are tracked by the stream 347 | database_name: 348 | type: string 349 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 350 | description: Database name to which stream source type belongs. If not provided, 351 | database name provided in the path param will be used. 352 | schema_name: 353 | type: string 354 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 355 | description: Schema name to which stream source type belongs. If not provided, 356 | schema name provided in the path param will be used. 357 | required: 358 | - src_type 359 | - name 360 | discriminator: 361 | propertyName: src_type 362 | mapping: 363 | table: StreamSourceTable 364 | external_table: StreamSourceExternalTable 365 | view: StreamSourceView 366 | stage: StreamSourceStage 367 | StreamSourceTable: 368 | type: object 369 | allOf: 370 | - $ref: '#/components/schemas/StreamSource' 371 | properties: 372 | append_only: 373 | type: boolean 374 | description: Whether this stream is an append only stream or not 375 | show_initial_rows: 376 | type: boolean 377 | description: Whether this stream show initial rows on first consumption 378 | point_of_time: 379 | $ref: '#/components/schemas/PointOfTime' 380 | description: Point of time for the stream 381 | PointOfTime: 382 | type: object 383 | properties: 384 | point_of_time_type: 385 | type: string 386 | description: 'Type of the point of time. Possible values include: timestamp, 387 | offset, statement' 388 | reference: 389 | type: string 390 | enum: 391 | - at 392 | - before 393 | x-enum-varnames: 394 | - AT 395 | - BEFORE 396 | description: Relation to the point of time. Currently, the API supports 397 | `at` and `before` 398 | required: 399 | - point_of_time_type 400 | - reference 401 | discriminator: 402 | propertyName: point_of_time_type 403 | mapping: 404 | timestamp: PointOfTimeTimestamp 405 | offset: PointOfTimeOffset 406 | statement: PointOfTimeStatement 407 | stream: PointOfTimeStream 408 | PointOfTimeTimestamp: 409 | type: object 410 | allOf: 411 | - $ref: '#/components/schemas/PointOfTime' 412 | properties: 413 | timestamp: 414 | type: string 415 | description: Timestamp of the point of time. 416 | required: 417 | - timestamp 418 | PointOfTimeOffset: 419 | type: object 420 | allOf: 421 | - $ref: '#/components/schemas/PointOfTime' 422 | properties: 423 | offset: 424 | type: string 425 | description: Point of time identified by an offset in reference to the current 426 | time, such as `10 min`. 427 | required: 428 | - offset 429 | PointOfTimeStatement: 430 | type: object 431 | allOf: 432 | - $ref: '#/components/schemas/PointOfTime' 433 | properties: 434 | statement: 435 | type: string 436 | description: Statement of the point of time. 437 | required: 438 | - statement 439 | PointOfTimeStream: 440 | type: object 441 | allOf: 442 | - $ref: '#/components/schemas/PointOfTime' 443 | properties: 444 | stream: 445 | type: string 446 | description: 'Creates the new stream at the same offset as the specified 447 | stream. ' 448 | StreamSourceExternalTable: 449 | type: object 450 | allOf: 451 | - $ref: '#/components/schemas/StreamSource' 452 | properties: 453 | insert_only: 454 | type: boolean 455 | description: Whether this stream is an insert only stream or not 456 | point_of_time: 457 | $ref: '#/components/schemas/PointOfTime' 458 | description: Point of time for the stream 459 | StreamSourceView: 460 | type: object 461 | allOf: 462 | - $ref: '#/components/schemas/StreamSource' 463 | properties: 464 | append_only: 465 | type: boolean 466 | description: Whether this stream is an append only stream or not 467 | show_initial_rows: 468 | type: boolean 469 | description: Whether this stream show initial rows on first consumption 470 | point_of_time: 471 | $ref: '#/components/schemas/PointOfTime' 472 | description: Point of time for the stream 473 | base_tables: 474 | type: array 475 | items: 476 | type: string 477 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 478 | readOnly: true 479 | description: List of base tables for the stream 480 | StreamSourceStage: 481 | type: object 482 | allOf: 483 | - $ref: '#/components/schemas/StreamSource' 484 | StreamClone: 485 | type: object 486 | properties: 487 | name: 488 | type: string 489 | pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$ 490 | description: Name of the stream 491 | comment: 492 | type: string 493 | description: user comment associated to an object in the dictionary 494 | required: 495 | - name 496 | -------------------------------------------------------------------------------- /specifications/view.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | servers: 3 | - description: Snowflake REST Server 4 | url: https://org-account.snowflakecomputing.com 5 | info: 6 | version: 0.0.1 7 | title: Snowflake View API 8 | description: The Snowflake View API is a REST API that you can use to access, update, 9 | and perform certain actions on View resource in a Snowflake database. 10 | contact: 11 | name: Snowflake, Inc. 12 | url: https://snowflake.com 13 | email: support@snowflake.com 14 | paths: 15 | /api/v2/databases/{database}/schemas/{schema}/views: 16 | get: 17 | summary: List views 18 | tags: 19 | - view 20 | description: List views 21 | operationId: listViews 22 | parameters: 23 | - $ref: common.yaml#/components/parameters/database 24 | - $ref: common.yaml#/components/parameters/schema 25 | - $ref: common.yaml#/components/parameters/like 26 | - $ref: common.yaml#/components/parameters/startsWith 27 | - $ref: common.yaml#/components/parameters/showLimit 28 | - $ref: common.yaml#/components/parameters/fromName 29 | - name: deep 30 | description: Optionally includes dependency information of the view. 31 | in: query 32 | required: false 33 | schema: 34 | type: boolean 35 | responses: 36 | '200': 37 | description: successful 38 | headers: 39 | X-Snowflake-Request-ID: 40 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 41 | content: 42 | application/json: 43 | schema: 44 | type: array 45 | items: 46 | $ref: '#/components/schemas/View' 47 | '202': 48 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 49 | '400': 50 | $ref: common.yaml#/components/responses/400BadRequest 51 | '401': 52 | $ref: common.yaml#/components/responses/401Unauthorized 53 | '403': 54 | $ref: common.yaml#/components/responses/403Forbidden 55 | '404': 56 | $ref: common.yaml#/components/responses/404NotFound 57 | '405': 58 | $ref: common.yaml#/components/responses/405MethodNotAllowed 59 | '408': 60 | $ref: common.yaml#/components/responses/408RequestTimeout 61 | '409': 62 | $ref: common.yaml#/components/responses/409Conflict 63 | '410': 64 | $ref: common.yaml#/components/responses/410Gone 65 | '429': 66 | $ref: common.yaml#/components/responses/429LimitExceeded 67 | '500': 68 | $ref: common.yaml#/components/responses/500InternalServerError 69 | '503': 70 | $ref: common.yaml#/components/responses/503ServiceUnavailable 71 | '504': 72 | $ref: common.yaml#/components/responses/504GatewayTimeout 73 | post: 74 | summary: Create a view 75 | tags: 76 | - view 77 | description: Create a view 78 | operationId: createView 79 | parameters: 80 | - $ref: common.yaml#/components/parameters/database 81 | - $ref: common.yaml#/components/parameters/schema 82 | - $ref: common.yaml#/components/parameters/createMode 83 | - $ref: common.yaml#/components/parameters/copyGrants 84 | responses: 85 | '200': 86 | $ref: common.yaml#/components/responses/200SuccessResponse 87 | '202': 88 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 89 | '400': 90 | $ref: common.yaml#/components/responses/400BadRequest 91 | '401': 92 | $ref: common.yaml#/components/responses/401Unauthorized 93 | '403': 94 | $ref: common.yaml#/components/responses/403Forbidden 95 | '404': 96 | $ref: common.yaml#/components/responses/404NotFound 97 | '405': 98 | $ref: common.yaml#/components/responses/405MethodNotAllowed 99 | '408': 100 | $ref: common.yaml#/components/responses/408RequestTimeout 101 | '409': 102 | $ref: common.yaml#/components/responses/409Conflict 103 | '410': 104 | $ref: common.yaml#/components/responses/410Gone 105 | '429': 106 | $ref: common.yaml#/components/responses/429LimitExceeded 107 | '500': 108 | $ref: common.yaml#/components/responses/500InternalServerError 109 | '503': 110 | $ref: common.yaml#/components/responses/503ServiceUnavailable 111 | '504': 112 | $ref: common.yaml#/components/responses/504GatewayTimeout 113 | requestBody: 114 | required: true 115 | content: 116 | application/json: 117 | schema: 118 | $ref: '#/components/schemas/View' 119 | /api/v2/databases/{database}/schemas/{schema}/views/{name}: 120 | get: 121 | summary: Fetch a view 122 | tags: 123 | - view 124 | description: Fetch a view 125 | operationId: fetchView 126 | parameters: 127 | - $ref: common.yaml#/components/parameters/database 128 | - $ref: common.yaml#/components/parameters/schema 129 | - $ref: common.yaml#/components/parameters/name 130 | responses: 131 | '200': 132 | description: successful 133 | headers: 134 | X-Snowflake-Request-ID: 135 | $ref: common.yaml#/components/headers/X-Snowflake-Request-ID 136 | content: 137 | application/json: 138 | schema: 139 | $ref: '#/components/schemas/View' 140 | '202': 141 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 142 | '400': 143 | $ref: common.yaml#/components/responses/400BadRequest 144 | '401': 145 | $ref: common.yaml#/components/responses/401Unauthorized 146 | '403': 147 | $ref: common.yaml#/components/responses/403Forbidden 148 | '404': 149 | $ref: common.yaml#/components/responses/404NotFound 150 | '405': 151 | $ref: common.yaml#/components/responses/405MethodNotAllowed 152 | '408': 153 | $ref: common.yaml#/components/responses/408RequestTimeout 154 | '409': 155 | $ref: common.yaml#/components/responses/409Conflict 156 | '410': 157 | $ref: common.yaml#/components/responses/410Gone 158 | '429': 159 | $ref: common.yaml#/components/responses/429LimitExceeded 160 | '500': 161 | $ref: common.yaml#/components/responses/500InternalServerError 162 | '503': 163 | $ref: common.yaml#/components/responses/503ServiceUnavailable 164 | '504': 165 | $ref: common.yaml#/components/responses/504GatewayTimeout 166 | delete: 167 | summary: Delete a view 168 | tags: 169 | - view 170 | description: Delete a view 171 | operationId: deleteView 172 | parameters: 173 | - $ref: common.yaml#/components/parameters/database 174 | - $ref: common.yaml#/components/parameters/schema 175 | - $ref: common.yaml#/components/parameters/name 176 | - $ref: common.yaml#/components/parameters/ifExists 177 | responses: 178 | '200': 179 | $ref: common.yaml#/components/responses/200SuccessResponse 180 | '202': 181 | $ref: common.yaml#/components/responses/202SuccessAcceptedResponse 182 | '400': 183 | $ref: common.yaml#/components/responses/400BadRequest 184 | '401': 185 | $ref: common.yaml#/components/responses/401Unauthorized 186 | '403': 187 | $ref: common.yaml#/components/responses/403Forbidden 188 | '404': 189 | $ref: common.yaml#/components/responses/404NotFound 190 | '405': 191 | $ref: common.yaml#/components/responses/405MethodNotAllowed 192 | '408': 193 | $ref: common.yaml#/components/responses/408RequestTimeout 194 | '409': 195 | $ref: common.yaml#/components/responses/409Conflict 196 | '410': 197 | $ref: common.yaml#/components/responses/410Gone 198 | '429': 199 | $ref: common.yaml#/components/responses/429LimitExceeded 200 | '500': 201 | $ref: common.yaml#/components/responses/500InternalServerError 202 | '503': 203 | $ref: common.yaml#/components/responses/503ServiceUnavailable 204 | '504': 205 | $ref: common.yaml#/components/responses/504GatewayTimeout 206 | components: 207 | schemas: 208 | View: 209 | type: object 210 | description: A Snowflake view 211 | properties: 212 | name: 213 | type: string 214 | description: Name of the view 215 | secure: 216 | type: boolean 217 | description: Whether or not this view is secure 218 | kind: 219 | type: string 220 | enum: 221 | - PERMANENT 222 | - TEMPORARY 223 | description: Kind of the view, permanent (default) or temporary 224 | recursive: 225 | type: boolean 226 | description: Whether or not this view can refer to itself using recursive 227 | syntax withot requiring a CTE (common table expression) 228 | columns: 229 | type: array 230 | items: 231 | $ref: '#/components/schemas/ViewColumn' 232 | description: The columns of the view 233 | comment: 234 | type: string 235 | description: user comment associated to an object in the dictionary 236 | query: 237 | type: string 238 | description: Query used to create the view 239 | created_on: 240 | type: string 241 | format: date-time 242 | readOnly: true 243 | description: Date and time when the view was created. 244 | database_name: 245 | type: string 246 | readOnly: true 247 | description: Database in which the view is stored 248 | schema_name: 249 | type: string 250 | readOnly: true 251 | description: Schema in which the view is stored 252 | owner: 253 | type: string 254 | readOnly: true 255 | description: Role that owns the view 256 | owner_role_type: 257 | type: string 258 | readOnly: true 259 | description: The type of role that owns the view 260 | required: 261 | - name 262 | - columns 263 | - query 264 | ViewColumn: 265 | type: object 266 | description: A column specifier in the view 267 | properties: 268 | name: 269 | type: string 270 | description: Column name 271 | comment: 272 | type: string 273 | description: Specifies a comment for the column 274 | datatype: 275 | type: string 276 | readOnly: true 277 | description: The data type for the column 278 | required: 279 | - name 280 | securitySchemes: 281 | KeyPair: 282 | $ref: common.yaml#/components/securitySchemes/KeyPair 283 | ExternalOAuth: 284 | $ref: common.yaml#/components/securitySchemes/ExternalOAuth 285 | SnowflakeOAuth: 286 | $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth 287 | security: 288 | - KeyPair: [] 289 | - ExternalOAuth: [] 290 | - SnowflakeOAuth: [] 291 | --------------------------------------------------------------------------------