--- sidebar_position: 3 --- import { Tabs, Callout } from 'nextra/components' # Badges ## Get SVG Badge <Callout type="info"> `GET /api/v1/repositories/{repositoryUrl}/badges/{badgeID}` </Callout> This endpoint returns the **SVG badge** for the given repository URL and badge ID. This endpoint gets parameterized with the repository URL and the badge ID. The repository URL is the URL of the repository that should be or was already scanned. **The URL must be URL encoded** (`https://gitlab.opencode.de/zendis-repo-scanner` → `https%3A%2F%2Fgitlab.opencode.de%2Fzendis-repo-scanner`). The badge ID is the title of the badge that should be returned. The available badges and therefore the badge IDs are defined in the [.badge-api.yaml](/concepts/configuration). ### Example Request <Tabs items={['GO', 'JavaScript', 'curl']}> <Tabs.Tab> ```go filename="main.go" copy package main import ( "fmt" "io" "net/http" ) func main() { url := "https://scanner.zend.is/api/v1/repositories/https%3A%2F%2Fgitlab.opencode.de%2Fzendis-repo-scanner/badges/MAINTAINED" resp, err := http.Get(url) if err != nil { fmt.Println("Error:", err) return } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` </Tabs.Tab> <Tabs.Tab> ```js filename="main.js" copy const fetch = require('node-fetch'); const url = 'https://scanner.zend.is/api/v1/repositories/https%3A%2F%2Fgitlab.opencode.de%2Fzendis-repo-scanner/badges/MAINTAINED'; fetch(url) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` </Tabs.Tab> <Tabs.Tab> ```bash filename="cli" copy curl -X GET "https://scanner.zend.is/api/v1/repositories/https%3A%2F%2Fgitlab.opencode.de%2Fzendis-repo-scanner/badges/MAINTAINED" ``` </Tabs.Tab> </Tabs>