Determining values for Ids in REST calls


As seen above, the REST call bodies require the use of internal ids for pipeline and projects. Maybe the simplest way to find out these ids, is by using other REST calls. The responses of these calls will contain the required information.

Important

For all these calls you will require the authorization header for your Azure DevOps PAT.

Following the instructions, for the example build pipeline in use here, using the name parameter to filter by name of the pipeline, the REST call will be a GET call:

https://dev.azure.com/ralphnuesse/ralphnuesse/_apis/build/definitions?api-version=5.1&name=ralphnuessecpwr.mainframe_ispw

The result will look similar to the following. The important information can be found at the highlighted rows:

AzureDevOps_27.png

Following the instructions, for the example release pipeline in use here, using the search-text parameter to filter by name of the pipeline, the REST call will be a GET call:

https://vsrm.dev.azure.com/ralphnuesse/ralphnuesse/_apis/release/definitions?api-version=5.1&searchText=Mainframe

The result will look similar to the following. The important information can be found at the highlighted rows:

AzureDevOps_28.png


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*