Examples
Note: By default, this command lists only the
files and folders in the root folder, as in the following example. The command does not
recurse into other
folders.
curl -k -u jsmith:passwd
"https://myserver.example.com:8443/cli/version/listVersionArtifacts
?component=MyComponent&version=1.0"
The
result of this command looks like the following example
code:
[
{
"name": "fileA.txt",
"path": "fileA.txt",
"version": 1,
"$ref": "fileA.txt/",
"type": "file",
"children": false,
"lastModified": 1449262065000,
"length": 0,
"metaOnly": false
},
{
"name": "folderA",
"path": "folderA",
"version": 1,
"$ref": "folderA/",
"type": "folder",
"children": true,
"lastModified": 1449262065000,
"length": 0,
"metaOnly": false
},
{
"name": "folderB",
"path": "folderB",
"version": 1,
"$ref": "folderB/",
"type": "folder",
"children": true,
"lastModified": 1449262065000,
"length": 0,
"metaOnly": false
}
]
Note: To
list files and folders that are not in the root folder, you must specify the
singleFilePath parameter, as in the following
example:
curl -k -u jsmith:passwd
"https://myserver.example.com:8443/cli/version/listVersionArtifacts
?component=MyComponent&version=1.0&singleFilePath=folderA"
The
result of this command includes only the contents of the specified folder, as in the
following
example:
[
{
"name": "fileA.txt",
"path": "folderA/fileA.txt",
"version": 1,
"$ref": "folderA/fileA.txt/",
"type": "file",
"children": false,
"lastModified": 1451488971000,
"length": 0,
"metaOnly": false
}
]