To obtain your own badge, you will first need to enable badges for your
project:

Then, click “Show url…” to reveal the URL of the default badge. In that
URL, you will need to extract three pieces of information:
TEAM_NAME, PROJECT_ID and
BUILD_DEFINITION_ID.

Your badge will then have the form
https://img.shields.io/vso/build/TEAM_NAME/PROJECT_ID/BUILD_DEFINITION_ID.

The badge is of the form https://img.shields.io/website[OPTIONS]/PROTOCOL/URLREST.svg,
the simplest case being https://img.shields.io/website/http/example.com.svg.
More options are described below.

The whole URL is obtained by concatenating the PROTOCOL (http or https, for example)
with the URLREST (separating them with ://).

The existence of a specific path on the server can be checked by appending a path after the domain name, e.g.
https://img.shields.io/website/http/www.website.com/path/to/page.html.svg.

The URLREST should be URLEncoded:

[OPTIONS] can be:

Nothing:
…/website/…

Online and offline text:
…/website-up-down/…

Online and offline text, then online and offline colors:
…/website-up-down-green-orange/…

Dashes --

→

- Dash

Underscores __

→

_ Underscore

Slashes //

→

/ Slash

_ or Space

→

Space

If your GitHub badge errors, it might be because you hit GitHub's rate
limits.
You can increase Shields.io's rate limit by
going to this page
to add Shields as a GitHub application on your GitHub account.

To get the Sprint ID, go to your Backlog view in your project, right click on your sprint name and get the value of data-sprint-id.