When we need to create, retrieve, update or delete access to the Azure DevOps services's resources, we can use Azure DevOps REST API.
Find more Azure DevOps REST services in https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.1
Process REST API
Get Process Id in your organization
Find more details in https://docs.microsoft.com/en-us/rest/api/azure/devops/core/processes/list?view=azure-devops-rest-7.1
ORGANIZATION=$1
PROCESS_NAME=$2
PAT=$3
curl --silent --user :$PAT \
--request GET "https://dev.azure.com/$ORGANIZATION/_apis/process/processes?api-version=6.0" | jq -r '.value[] | select(.name=="'$PROCESS_NAME'") | .id'
$ . ./getProcessId.sh kenanhancer Agile blablabla
adcc42ab-9882-485e-a3ed-7678f01f66bc
Get Process in your organization
Find more details in https://docs.microsoft.com/en-us/rest/api/azure/devops/core/processes/get?view=azure-devops-rest-7.1
echo -n "Organization: " && read ORGANIZATION
echo -n "Process Name: " && read PROCESS_NAME
echo -n "PAT: " && read PAT
PROCESS_ID=$(. ./getProcessId.sh $ORGANIZATION $PROCESS_NAME $PAT)
curl --silent --user :$PAT \
--request GET "https://dev.azure.com/$ORGANIZATION/_apis/process/processes/$PROCESS_ID?api-version=6.0" | jq -r .
$ . ./getProcess.sh
Organization: kenanhancer
Process Name: Agile
PAT: blablabla
{
"id": "adcc42ab-9882-485e-a3ed-7678f01f66bc",
"description": "This template is flexible and will work great for most teams using Agile planning methods, including those practicing Scrum.",
"isDefault": true,
"_links": {
"self": {
"href": "https://dev.azure.com/kenanhancer/_apis/process/processes/adcc42ab-9882-485e-a3ed-7678f01f66bc"
}
},
"type": "system",
"url": "https://dev.azure.com/kenanhancer/_apis/process/processes/adcc42ab-9882-485e-a3ed-7678f01f66bc",
"name": "Agile"
}
Continue reading