Invokes the ADO Rest API
Invokes the Azure DevOps REST API
# Uses the Azure DevOps REST api to get builds from a project
$org = 'StartAutomating'
$project = 'PSDevOps'
Invoke-ADORestAPI "https://dev.azure.com/$org/$project/_apis/build/builds/?api-version=5.1"The REST API Url
Type:
[Uri]
Required: true
Position: 1
PipelineInput:true (ByPropertyName)
Specifies the method used for the web request. The acceptable values for this parameter are:
- Default
- Delete
- Get
- Head
- Merge
- Options
- Patch
- Post
- Put
- Trace
Valid Values:
- GET
- DELETE
- HEAD
- MERGE
- OPTIONS
- PATCH
- POST
- PUT
- TRACE
Type:
[String]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
Specifies the body of the request. If this value is a string, it will be passed as-is Otherwise, this value will be converted into JSON.
Type:
[Object]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
Parameters provided as part of the URL (in segments or a query string).
Type:
[IDictionary]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
Additional parameters provided after the URL.
Type:
[IDictionary]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
Specifies the content type of the web request. If this parameter is omitted and the request method is POST, Invoke-RestMethod sets the content type to application/x-www-form-urlencoded. Otherwise, the content type is not specified in the call.
Type:
[String]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
Specifies the headers of the web request. Enter a hash table or dictionary.
Type:
[IDictionary]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
A Personal Access Token
Type:
[String]
Required: false
Position: named
PipelineInput:false
Specifies a user account that has permission to send the request. The default is the current user. Type a user name, such as User01 or Domain01\User01, or enter a PSCredential object, such as one generated by the Get-Credential cmdlet.
Type:
[PSCredential]
Required: false
Position: named
PipelineInput:false
Indicates that the cmdlet uses the credentials of the current user to send the web request.
Type:
[Switch]
Required: false
Position: named
PipelineInput:false
A continuation token. This is appended as a query parameter, and can be used to continue a request. Invoke-ADORestAPI will call recursively invoke itself until a response does not have a ContinuationToken
Type:
[String]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
The typename of the results.
Type:
[String[]]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
A set of additional properties to add to an object
Type:
[IDictionary]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
A list of property names to remove from an object
Type:
[String[]]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
If provided, will expand a given property returned from the REST api.
Type:
[String]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
If provided, will decorate the values within a property in the return object. This allows nested REST properties to work with the PowerShell Extended Type System.
Type:
[IDictionary]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
If set, will cache results from a request. Only HTTP GET results will be cached.
Type:
[Switch]
Required: false
Position: named
PipelineInput:false
If set, will return results as a byte array.
Type:
[Switch]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
If set, will run as a background job. This parameter will be ignored if the caller is piping the results of Invoke-ADORestAPI. This parameter will also be ignore when calling with -DynamicParameter or -MapParameter.
Type:
[Switch]
Required: false
Position: named
PipelineInput:false
If set, will get the dynamic parameters that should be provided to any function that wraps Invoke-ADORestApi
Type:
[Switch]
Required: true
Position: named
PipelineInput:true (ByPropertyName)
If set, will return the parameters for any function that can be passed to Invoke-ADORestApi. Unmapped parameters will be added as a noteproperty of the returned dictionary.
Type:
[IDictionary]
Required: true
Position: named
PipelineInput:true (ByPropertyName)
Invoke-ADORestAPI [-Uri] <Uri> [-Method <String>] [-Body <Object>] [-UrlParameter <IDictionary>] [-QueryParameter <IDictionary>] [-ContentType <String>] [-Headers <IDictionary>] [-PersonalAccessToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-ContinuationToken <String>] [-PSTypeName <String[]>] [-Property <IDictionary>] [-RemoveProperty <String[]>] [-ExpandProperty <String>] [-DecorateProperty <IDictionary>] [-Cache] [-AsByte] [-AsJob] [<CommonParameters>]Invoke-ADORestAPI [-PersonalAccessToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Cache] [-AsByte] [-AsJob] -DynamicParameter [<CommonParameters>]Invoke-ADORestAPI [-PersonalAccessToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Cache] [-AsByte] [-AsJob] -MapParameter <IDictionary> [<CommonParameters>]