ConnectorTypeWEBDAV
class connector_types.connector_type_webdav.ConnectorTypeWEBDAV
Access a WebDAV service.
Input Schema
-
url
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.
Type:
string
-
auth
The authentication method to use. One of
token
,basic
,digest
or None (unauthenticated)Type:
string
Default:
token
-
login
The name of the user. Mutually exclusive with
token
. If setpassword
must also be set.Type:
anyOf
Options: -
password
The password of the user.
Type:
anyOf
Options: -
token
The authentication token. Mutually exclusive with
login
.Type:
anyOf
Options: -
timeout
Timeout operations after this many seconds.
Type:
integer
Default:
30
-
proxy_url
Route the traffic through this proxy server.
Type:
anyOf
Options: -
proxy_user
Use this username to log into the proxy server.
Type:
anyOf
Options: -
proxy_password
The password of the user trying to log into the proxy server.
Type:
anyOf
Options: -
verify_ssl
Verify TLS certificates. Only takes effect when requesting over https.
Type:
boolean
Default:
True
-
cacert
Provide the certificate to be able to connect to servers with self-signed certificates. Alternatively TLS verification can be disabled with
verify_ssl=False
.Type:
anyOf
Options: -
method
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
.Type:
string
-
path
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
, andupload_text
.Type:
string
-
cloudomation_path
A path of a Cloudomation Engine file. Used with the methods
download_cloudomation
andupload_cloudomation
.Type:
string
-
to_path
A destination path on the WebDAV server. Used with the methods
copy
andmove
.Type:
string
-
overwrite
If set, existing resources on the WebDAV server are overwritten.
Type:
boolean
-
detail
If set, additional information is returned from method
ls
.Type:
boolean
Default:
True
-
property_name
A property name. Used with the
get_property
method.Type:
string
-
property_namespace
A property namespace. Used with the
get_property
method.Type:
string
-
base64
A base64 string. Used with method
upload_base64
.Type:
string
-
text
A string. Used with method
upload_text
.Type:
string
-
Output Schema
-
result
Data
Constants
ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca']Example
Fetch a text file from a WebDAV server
import flow_api
def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
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')