Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>ARM.TemplateName</id>
<version>1.0.0</version>
<title />
<authors>THIS IS YOU</authors>
<owners />
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Something something ARM.</description>
name: $(majorMinorVersion).$(rev:r)
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
majorMinorVersion: '1.0'
@MirKml
MirKml / azure-devopsAPI-curl.md
Last active June 11, 2024 12:37
Azure devops API curl queries
  1. Gets PAT - personal access token - from azure devops profile. See more on this page.
    You can use username:password from 'Alternate credentials', which is also in your profile.

  2. Use curl with -s - silent, doesn't print statistics. Use jq tool for pritty print json content.

> curl -s -u username:PAT -H "Content-Type: application/json" https://dev.azure.com/<organization>/_apis/projects?api-version=2.0 | jq

You can use authorization header directly from the bash tasks from some build/release pipeline with System.AccessToken pipeline variable

> curl -H "Authorization: Bearer $(System.AccessToken)" -H "Content-Type: application/json" \