---
title: Retrieves all available metrics from Waydev.
slug: api-docs.waydev.co
docTags: 
createdAt: 2025-01-28T10:28:11.768Z
---

{
  "id": "xRFsgHgMAvqsA1JLW1FgM",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.waydev.co/v2/metrics",
    "name": "Retrieves all available metrics from Waydev.",
    "description": "This route returns all the available metrics for your account.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "Your PAT generated in Waydev"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "example": "[{\"id\":\"impact\",\"name\":\"Impact\",\"unit\":\"\",\"description\":\"<p><em>Impact</em> is a metric which shows you how much \\\"cognitive load\\\" did the contributor carry when developing these changes.</p>\"},{\"id\":\"code_churn\",\"name\":\"Code Churn\",\"unit\":\"lines\",\"description\":\"<p><em>Code Churn</em> represents the number of lines that were modified and then modified again or deleted.</p>\"},{\"id\":\"active_days\",\"name\":\"Active Days\",\"unit\":\"days\",\"description\":\"<p>Number of days the developer made commits during the selected period.</p>\"},{\"id\":\"commits_per_day\",\"name\":\"Commits per Day\",\"unit\":\"commits\",\"description\":\"<p>Average number of commits made per active day during the selected period.</p>\"},{\"id\":\"efficiency\",\"name\":\"Efficiency\",\"unit\":\"%\",\"description\":\"<p>Percentage of code that remains unchanged, indicating the stability and maintainability of contributions.</p>\"}]",
            "description": "Successful operation",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "unit",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "example": ""
              }
            ],
            "itemType": "object",
            "customType": "object[]",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Unauthorized",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "example": "Unauthorized"
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "JGxL4YsWjxkmpU9iLAviq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.waydev.co/v2/metrics \\\n     --header 'accept: application/json' \\\n     --header 'authorization: string'"
        },
        {
          "id": "OpIX-r2Cetf0s4JYm3wqP",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"authorization\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.waydev.co/v2/metrics\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "wJiKMN-QJLikBsr_YSeoM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.waydev.co/v2/metrics\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"authorization\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "tBH_Wk67lgPlMFXp_46Lg",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.waydev.co/v2/metrics\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'authorization': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "JGxL4YsWjxkmpU9iLAviq"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful operation\n[\n  {\n    \"id\": \"\",\n    \"name\": \"\",\n    \"unit\": \"\",\n    \"description\": \"\"\n  }\n]"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"Unauthorized\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}