Functions/Public/Find-Artifact.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function Find-Artifact {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)]
        [ValidateNotNullOrEmpty()]
        [string]
        $Path
        ,
        [Parameter()]
        [ValidateNotNullOrEmpty()]
        [int]
        $Depth = 1
    )

    Invoke-ArtifactoryApi -Path "/api/storage/$($Path)?list&deep=1&depth=$Depth&listFolders=1"
}