# Badges for Flags

**URL:** <https://community.codecov.com/t/badges-for-flags/270>\
**Category:** Support\
**Created:** [June 16, 2019, 11:03pm UTC](https://community.codecov.com/t/badges-for-flags/270 "2019-06-16T23:03:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjancsar](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@cjancsar](https://community.codecov.com/u/cjancsar)\
**Post date:** [June 16, 2019, 11:03pm UTC](https://community.codecov.com/t/badges-for-flags/270/1 "2019-06-16T23:03:28Z")

</div>

### Description

How do you create a badge for an individual badge?

### Repository

private

Simple question. Docs just say: “Badges and graphs may express specific flags only. More details on this will come soon.” ([Flags](https://docs.codecov.io/docs/flags#section-flag-badges-and-graphs)). Does that mean the docs will come soon, or the ability to create badges for flags (feature) will come soon?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [June 16, 2019, 11:06pm UTC](https://community.codecov.com/t/badges-for-flags/270/2 "2019-06-16T23:06:27Z")

</div>

Hi @cjancsar, thanks for your question! Unfortunately, it means that the feature will be coming soon. I don’t yet have a timeline for you, but I’ll be sure to bring this up with the product team.

---

<div class="post-metadata">

**Author:** ![daltonmatos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/daltonmatos/32/190_2.png) [@daltonmatos](https://community.codecov.com/u/daltonmatos)\
**Post date:** [July 9, 2019, 12:37pm UTC](https://community.codecov.com/t/badges-for-flags/270/3 "2019-07-09T12:37:21Z")

</div>

Hello @cjancsar,

using the querystrign `?flag=<flag-name>` works. This returns a badge with the numbers from only the mentioned flag.

I’m currently using like this: `https://codecov.io/gh/<org>/<project>/branch/<branch>/graph/badge.svg?flag=<flag-name>`

As an example: [https://github.com/B2W-BIT/asgard-api](https://github.com/B2W-BIT/asgard-api)

---

<div class="post-metadata">

**Author:** ![magicdawn](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/magicdawn/32/482_2.png) [@magicdawn](https://community.codecov.com/u/magicdawn)\
**Post date:** [January 19, 2020, 2:33am UTC](https://community.codecov.com/t/badges-for-flags/270/4 "2020-01-19T02:33:50Z")

</div>

Add this solution to the document?

People need to search for this solution.

---

<div class="post-metadata">

**Author:** ![VijayanB](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/vijayanb/32/1458_2.png) [@VijayanB](https://community.codecov.com/u/VijayanB)\
**Post date:** [August 6, 2020, 1:43am UTC](https://community.codecov.com/t/badges-for-flags/270/5 "2020-08-06T01:43:15Z")

</div>

I don’t think it solves the problem. It shows unknown and also in the repo you mentioned as an example.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [August 6, 2020, 3:34pm UTC](https://community.codecov.com/t/badges-for-flags/270/6 "2020-08-06T15:34:03Z")

</div>

@VijayanB, I’m not sure what you mean

Demo flag  
[https://codecov.io/gh/thomasrockhu/cf-flags-demo/branch/master/graph/badge.svg?flag=demo&precision=2](https://codecov.io/gh/thomasrockhu/cf-flags-demo/branch/master/graph/badge.svg?flag=demo&precision=2)

Index flag  
[https://codecov.io/gh/thomasrockhu/cf-flags-demo/branch/master/graph/badge.svg?flag=index&precision=2](https://codecov.io/gh/thomasrockhu/cf-flags-demo/branch/master/graph/badge.svg?flag=index&precision=2)

No flag  
[https://codecov.io/gh/thomasrockhu/cf-flags-demo/branch/master/graph/badge.svg?precision=2](https://codecov.io/gh/thomasrockhu/cf-flags-demo/branch/master/graph/badge.svg?precision=2)

---

<div class="post-metadata">

**Author:** ![VijayanB](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/vijayanb/32/1458_2.png) [@VijayanB](https://community.codecov.com/u/VijayanB)\
**Post date:** [August 6, 2020, 5:20pm UTC](https://community.codecov.com/t/badges-for-flags/270/7 "2020-08-06T17:20:16Z")

</div>

@tom I stand corrected. I was referring to different branch which never uploaded coverage report and got unknown as coverage. After merging the branch and once upload happened from that branch, i see the values. Thanks,
