summaryrefslogtreecommitdiff
path: root/doc/api/project_badges.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/project_badges.md')
-rw-r--r--doc/api/project_badges.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/project_badges.md b/doc/api/project_badges.md
index 0cf22808036..df3a0b9f5af 100644
--- a/doc/api/project_badges.md
+++ b/doc/api/project_badges.md
@@ -25,7 +25,7 @@ GET /projects/:id/badges
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `name` | string | no | Name of the badges to return (case-sensitive). |
-```bash
+```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges
```
@@ -67,7 +67,7 @@ GET /projects/:id/badges/:badge_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `badge_id` | integer | yes | The badge ID |
-```bash
+```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id
```
@@ -98,7 +98,7 @@ POST /projects/:id/badges
| `link_url` | string | yes | URL of the badge link |
| `image_url` | string | yes | URL of the badge image |
-```bash
+```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "link_url=https://gitlab.com/gitlab-org/gitlab-foss/commits/master&image_url=https://shields.io/my/badge1&position=0" https://gitlab.example.com/api/v4/projects/:id/badges
```
@@ -130,7 +130,7 @@ PUT /projects/:id/badges/:badge_id
| `link_url` | string | no | URL of the badge link |
| `image_url` | string | no | URL of the badge image |
-```bash
+```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id
```
@@ -160,7 +160,7 @@ DELETE /projects/:id/badges/:badge_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `badge_id` | integer | yes | The badge ID |
-```bash
+```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id
```
@@ -178,7 +178,7 @@ GET /projects/:id/badges/render
| `link_url` | string | yes | URL of the badge link|
| `image_url` | string | yes | URL of the badge image |
-```bash
+```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/render?link_url=http%3A%2F%2Fexample.com%2Fci_status.svg%3Fproject%3D%25%7Bproject_path%7D%26ref%3D%25%7Bdefault_branch%7D&image_url=https%3A%2F%2Fshields.io%2Fmy%2Fbadge
```