# File Tools

Most of the file commands in Captivate can also take a url parameter to download the file from an online resource.

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/runDbQuery" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/convertToJson" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/fetchUrl" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/downloadImage" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/encodeImage" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/getDirectoryContent" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/getFileContent" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/openDirectoryDialog" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/openFileDialog" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/openUrl" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="<https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media>" path="/api/command/setFileContent" method="get" %}
[api-spec.yaml](https://2284285836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkMvk0MrY3BcyplZ0pf7%2Fuploads%2Fgit-blob-9747ed12ce0fd98c0e68140fa1ab97f706e4eefc%2Fapi-spec.yaml?alt=media)
{% endopenapi %}

> Note: The `fetchUrl` command exists to let you perform web requests when your controller is running in a browser context. Browsers have different security models that can sometimes limit your ability to get data from a remote resource.
