ConnectorTypeWEBDAV
class connector_types.connector_type_webdav.ConnectorTypeWEBDAV
Access a WebDAV service.
Inputs
Name | Type | Default | Description |
---|---|---|---|
auth | str | token | The authentication method to use. One of token , basic , digest or None (unauthenticated). |
base64 | str | None | A base64 string. Used with method upload_base64 . |
cacert | str | None | Provide the certificate to be able to connect to servers with self-signed certificates. Alternatively TLS verification can be disabled with verify_ssl=False . |
cloudomation_path | str | None | A path of a Cloudomation file. Used with the methods download_cloudomation and upload_cloudomation . |
detail | bool | True | If set, additional information is returned from method ls . |
login | str | None | The name of the user. Used with basic and digest authentication methods. |
method | str | The webdav method to call. One of * content_language * content_length * content_type * copy * created * download_base64 * download_cloudomation * download_text * etag * exists * get_property * info * isdir * isfile * ls * mkdir * modified * move * options * remove * upload_bas64 * upload_cloudomation * upload_text | |
overwrite | bool | False | If set, existing resources on the WebDAV server are overwritten. |
password | str | None | The password of the user. Used with basic and digest authentication methods |
path | str | A path on the WebDAV server. Used with the methods content_language , content_length , content_type , copy , created , download_base64 , download_cloudomation , download_text , etag , exists , get_property , info , isdir , isfile , ls , mkdir , modified , move , options , remove , upload_bas64 , upload_cloudomation , and upload_text . | |
property_name | str | None | A property name. Used with the get_property method. |
property_namespace | str | None | A property namespace. Used with the get_property method. |
proxy_password | str | None | The password of the user trying to log into the proxy server. |
proxy_url | str | None | Route the traffic through this proxy server. |
proxy_user | str | None | Use this username to log into the proxy server. |
text | str | None | A string. Used with method upload_text . |
timeout | int | 30 | Timeout operations after this many seconds. |
to_path | str | None | A destination path on the WebDAV server. Used with the methods copy and move . |
token | str | None | The authentication token. Used with token authentication method. |
url | str | The URl where the WebDAV server is reachable. Scheme must be either http or https. May contain a path which is to be considered the root of the server. | |
verify_ssl | bool | True | Verify TLS certificates. Only takes effect when requesting over https. |
Outputs
Name | Type | Default | Description |
---|---|---|---|
result | object |
Constants
input_list = ['auth', 'base64', 'cacert', 'cloudomation_path', 'detail', 'login', 'method', 'overwrite', 'password', 'path', 'property_name', 'property_namespace', 'proxy_password', 'proxy_url', 'proxy_user', 'text', 'timeout', 'to_path', 'token', 'url', 'verify_ssl'] output_list = ['result'] ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca'] version = 1Methods
execute
details
log
details
one_of_inputs
details
run
details
Example
Fetch a text file from a WebDAV server
import flow_api
def handler(system: flow_api.System, this: flow_api.Execution):
file_content = this.connect(
connector_type='WEBDAV',
url='https://my-webdav-server/path',
auth='basic',
login='kevin',
password='secret',
method='download_text',
kwargs={
'path': 'file.txt',
},
).get('output_value')['result']
this.log(file_content=file_content)
return this.success('all done')