Skip to content

Invoke AzureRestMethod

apobekiaris edited this page May 23, 2019 · 3 revisions

schema: 2.0.0

Invoke-AzureRestMethod

SYNOPSIS

Invokes Azure DevOps REST API

SYNTAX

Invoke-AzureRestMethod [-Token] <String> [-Organization] <String> [-Project] <String> [-Resource] <String>
 [[-Version] <String>] [<CommonParameters>]

DESCRIPTION

Invokes Azure DevOps REST API

EXAMPLES

Example 1

PS C:\> $testRunName="TestRun_$BuildName`_$BuildNumber"
"TestRunName=$testRunName"
$testRun=Invoke-AzureRestMethod $Token eXpandDevOps eXpandFramework test/runs|Where-Object{$_.name -eq $testRunName}
if ($testRun.unanalyzedTests){
    throw "$($testRun.unanalyzedTests) test fail"
}

The above script checks the eXpandFramework TestRuns for failing test and fails the build if found. By default the build does not fail.

{{ Add example description here }}

PARAMETERS

-Organization

{{ Fill Organization Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Project

{{ Fill Project Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Resource

{{ Fill Resource Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Token

{{ Fill Token Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version

{{ Fill Version Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS

Star the project if you think it deserves it.

GitHub stars

Fork the project to extend and contribute.

GitHub forks

Clone this wiki locally
You can’t perform that action at this time.