Skip to main content
Version: 7 - Gugelhupf

ConnectorTypeWEBDAV

class connector_types.connector_type_webdav.ConnectorTypeWEBDAV

Access a WebDAV service.

Inputs

NameTypeDefaultDescription
authstrtokenThe authentication method to use. One of token, basic, digest or None (unauthenticated).
base64strNoneA base64 string. Used with method upload_base64.
cacertstrNoneProvide the certificate to be able to connect to servers with self-signed certificates. Alternatively TLS verification can be disabled with verify_ssl=False.
cloudomation_pathstrNoneA path of a Cloudomation file. Used with the methods download_cloudomation and upload_cloudomation.
detailboolTrueIf set, additional information is returned from method ls.
loginstrNoneThe name of the user. Used with basic and digest authentication methods.
methodstrThe 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
overwriteboolFalseIf set, existing resources on the WebDAV server are overwritten.
passwordstrNoneThe password of the user. Used with basic and digest authentication methods
pathstrA 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_namestrNoneA property name. Used with the get_property method.
property_namespacestrNoneA property namespace. Used with the get_property method.
proxy_passwordstrNoneThe password of the user trying to log into the proxy server.
proxy_urlstrNoneRoute the traffic through this proxy server.
proxy_userstrNoneUse this username to log into the proxy server.
textstrNoneA string. Used with method upload_text.
timeoutint30Timeout operations after this many seconds.
to_pathstrNoneA destination path on the WebDAV server. Used with the methods copy and move.
tokenstrNoneThe authentication token. Used with token authentication method.
urlstrThe 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_sslboolTrueVerify TLS certificates. Only takes effect when requesting over https.

Outputs

NameTypeDefaultDescription
resultobject

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 = 1

Methods

execute

log

one_of_inputs

run

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')