Difference between revisions of "HowTo: WebDAV properties"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
= WebDAV properties = | = WebDAV properties = | ||
− | + | Limited support for WebDAV properties are implemented in dCache. WebDAV provides an extensible mechanism for reporting additional meta data about files and directories. These are known as properties and can be queried through the PROPFIND HTTP method - the same mechanism used to list WebDAV collection resources (directories in dCache). Currently only support for checksums, access latency and retention policy is provided. | |
− | == Get file properties from a single file == | + | == Get file properties from a single file via WebDAV == |
curl -u <user>:<passwd> -X PROPFIND -H Depth:'''0''' https://<dcache_webdav_endpoint>/<path>/'''<file>''' --data '<?xml version="1.0" encoding="utf-8"?> | curl -u <user>:<passwd> -X PROPFIND -H Depth:'''0''' https://<dcache_webdav_endpoint>/<path>/'''<file>''' --data '<?xml version="1.0" encoding="utf-8"?> | ||
<D:propfind xmlns:D="DAV:"> | <D:propfind xmlns:D="DAV:"> | ||
Line 13: | Line 13: | ||
</D:propfind>' | </D:propfind>' | ||
− | == Get file properties from all files in a directory == | + | == Get file properties from all files in a directory via WebDAV == |
curl -u <user>:<passwd> -X PROPFIND -H Depth:'''1''' https://<dcache_webdav_endpoint>/<path>/ --data '<?xml version="1.0" encoding="utf-8"?> | curl -u <user>:<passwd> -X PROPFIND -H Depth:'''1''' https://<dcache_webdav_endpoint>/<path>/ --data '<?xml version="1.0" encoding="utf-8"?> | ||
<D:propfind xmlns:D="DAV:"> | <D:propfind xmlns:D="DAV:"> | ||
Line 24: | Line 24: | ||
</D:propfind>' | </D:propfind>' | ||
− | == Example: | + | == Example: File Checksum via WebDAV == |
=== Get checksum from a single file === | === Get checksum from a single file === | ||
curl -u <user>:<passwd> -X PROPFIND -H Depth:'''0''' https://<dcache_webdav_endpoint>/<path>/'''<file>''' --data '<?xml version="1.0" encoding="utf-8"?> | curl -u <user>:<passwd> -X PROPFIND -H Depth:'''0''' https://<dcache_webdav_endpoint>/<path>/'''<file>''' --data '<?xml version="1.0" encoding="utf-8"?> |
Latest revision as of 10:19, 20 December 2016
WebDAV properties
Limited support for WebDAV properties are implemented in dCache. WebDAV provides an extensible mechanism for reporting additional meta data about files and directories. These are known as properties and can be queried through the PROPFIND HTTP method - the same mechanism used to list WebDAV collection resources (directories in dCache). Currently only support for checksums, access latency and retention policy is provided.
Get file properties from a single file via WebDAV
curl -u <user>:<passwd> -X PROPFIND -H Depth:0 https://<dcache_webdav_endpoint>/<path>/<file> --data '<?xml version="1.0" encoding="utf-8"?> <D:propfind xmlns:D="DAV:"> <D:prop xmlns:R="http://www.dcache.org/2013/webdav" xmlns:S="http://srm.lbl.gov/StorageResourceManager"> <R:Checksums/> <S:AccessLatency/> <S:RetentionPolicy/> </D:prop> </D:propfind>'
Get file properties from all files in a directory via WebDAV
curl -u <user>:<passwd> -X PROPFIND -H Depth:1 https://<dcache_webdav_endpoint>/<path>/ --data '<?xml version="1.0" encoding="utf-8"?> <D:propfind xmlns:D="DAV:"> <D:prop xmlns:R="http://www.dcache.org/2013/webdav" xmlns:S="http://srm.lbl.gov/StorageResourceManager"> <R:Checksums/> <S:AccessLatency/> <S:RetentionPolicy/> </D:prop> </D:propfind>'
Example: File Checksum via WebDAV
Get checksum from a single file
curl -u <user>:<passwd> -X PROPFIND -H Depth:0 https://<dcache_webdav_endpoint>/<path>/<file> --data '<?xml version="1.0" encoding="utf-8"?> <D:propfind xmlns:D="DAV:"> <D:prop xmlns:R="http://www.dcache.org/2013/webdav" xmlns:S="http://srm.lbl.gov/StorageResourceManager"> <R:Checksums/> </D:prop> </D:propfind>'
Get checksum from all files in a directory
curl -u <user>:<passwd> -X PROPFIND -H Depth:1 https://<dcache_webdav_endpoint>/<path>/ --data '<?xml version="1.0" encoding="utf-8"?> <D:propfind xmlns:D="DAV:"> <D:prop xmlns:R="http://www.dcache.org/2013/webdav" xmlns:S="http://srm.lbl.gov/StorageResourceManager"> <R:Checksums/> </D:prop> </D:propfind>'