---
title: retrieve dashboard stats
slug: retrieve-dashboard-stats
docTags: 
createdAt: 2025-01-28T10:28:11.769Z
---

{
  "id": "63DVyQAv8oPnE5SL-SNgW",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.waydev.co/v2/stats/dashboard",
    "name": "retrieve dashboard stats",
    "description": "<p>By passing in the appropriate options, you can search for\navailable stats for your project account</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "Your PAT generated in Waydev"
        }
      ],
      "queryParameters": [
        {
          "kind": "required",
          "name": "teams_id",
          "type": "string",
          "description": "json encoded list of selected teams ids"
        },
        {
          "kind": "required",
          "name": "repositories",
          "type": "string",
          "description": "json encoded list of selected repositories ids"
        },
        {
          "kind": "optional",
          "name": "end_date",
          "type": "string",
          "description": "end date for requested stats period"
        },
        {
          "kind": "optional",
          "name": "start_date",
          "type": "string",
          "description": "start date for requested stats period"
        },
        {
          "kind": "optional",
          "name": "period",
          "type": "integer",
          "description": "<p>number of past weeks (from end_date) (if start_date is used, this will be ignored)</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "search results matching criteria",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "search results matching criteria",
            "customType": "DashboardItem",
            "schema": [
              {
                "name": "main",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/definitions/MainStatsItem",
                "customType": "MainStatsItem",
                "schema": [
                  {
                    "name": "impact",
                    "kind": "optional",
                    "type": "string",
                    "example": "157.13"
                  },
                  {
                    "name": "efficiency",
                    "kind": "optional",
                    "type": "integer",
                    "example": 96
                  },
                  {
                    "name": "active_days",
                    "kind": "optional",
                    "type": "integer",
                    "example": 4
                  },
                  {
                    "name": "commits_per_day",
                    "kind": "optional",
                    "type": "string",
                    "example": "3.00"
                  },
                  {
                    "name": "code_new",
                    "kind": "optional",
                    "type": "integer",
                    "example": 61
                  },
                  {
                    "name": "code_refactor",
                    "kind": "optional",
                    "type": "integer",
                    "example": 35
                  },
                  {
                    "name": "code_help",
                    "kind": "optional",
                    "type": "integer",
                    "example": 1
                  },
                  {
                    "name": "code_churn",
                    "kind": "optional",
                    "type": "integer",
                    "example": 3
                  },
                  {
                    "name": "percents",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/definitions/MainStatsPercentsItem",
                    "customType": "MainStatsPercentsItem",
                    "schema": [
                      {
                        "name": "impact",
                        "kind": "optional",
                        "type": "integer",
                        "example": 50
                      },
                      {
                        "name": "active_days",
                        "kind": "optional",
                        "type": "integer",
                        "example": -15
                      },
                      {
                        "name": "commits_per_day",
                        "kind": "optional",
                        "type": "integer",
                        "example": 25
                      },
                      {
                        "name": "efficiency",
                        "kind": "optional",
                        "type": "integer",
                        "example": 73
                      }
                    ]
                  }
                ]
              },
              {
                "name": "developers",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/definitions/DeveloperStatsItem",
                "customType": "DeveloperStatsItem[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "example": 3542
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "example": "John Doe"
                  },
                  {
                    "name": "username",
                    "kind": "optional",
                    "type": "string",
                    "example": "johndoe64"
                  },
                  {
                    "name": "avatar",
                    "kind": "optional",
                    "type": "string",
                    "example": "https://avatars3.githubusercontent.com/u/2746712?v=4"
                  },
                  {
                    "name": "impact",
                    "kind": "optional",
                    "type": "string",
                    "example": "157.13"
                  },
                  {
                    "name": "efficiency",
                    "kind": "optional",
                    "type": "integer",
                    "example": 96
                  },
                  {
                    "name": "active_days",
                    "kind": "optional",
                    "type": "integer",
                    "example": 4
                  },
                  {
                    "name": "commits_per_day",
                    "kind": "optional",
                    "type": "string",
                    "example": "3.00"
                  },
                  {
                    "name": "code_new",
                    "kind": "optional",
                    "type": "integer",
                    "example": 61
                  },
                  {
                    "name": "code_refactor",
                    "kind": "optional",
                    "type": "integer",
                    "example": 35
                  },
                  {
                    "name": "code_help",
                    "kind": "optional",
                    "type": "integer",
                    "example": 1
                  },
                  {
                    "name": "code_churn",
                    "kind": "optional",
                    "type": "integer",
                    "example": 3
                  },
                  {
                    "name": "info",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/definitions/DeveloperInfoItem",
                    "customType": "DeveloperInfoItem[]",
                    "schema": [
                      {
                        "name": "display_name",
                        "kind": "optional",
                        "type": "string",
                        "example": "Andrew Bush"
                      },
                      {
                        "name": "display_avatar",
                        "kind": "optional",
                        "type": "string",
                        "example": "https://avatars3.githubusercontent.com/u/2746712?v=4"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "is_processing",
                "kind": "optional",
                "type": "boolean",
                "example": false
              },
              {
                "name": "paid_licences",
                "kind": "optional",
                "type": "integer",
                "example": 1
              },
              {
                "name": "status_code",
                "kind": "optional",
                "type": "integer",
                "example": 200
              }
            ],
            "modelRef": "#/definitions/DashboardItem",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "bad input parameter",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "yPVQXGVTisb4Pomh5Yov1",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.waydev.co/v2/stats/dashboard?teams_id=string&repositories=string' \\\n     --header 'accept: application/json' \\\n     --header 'authorization: string'"
        },
        {
          "id": "letqPkjFDdg6e2TMrnp78",
          "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/stats/dashboard?teams_id=string&repositories=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lkn_5QVoevusdSBBlqgDs",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.waydev.co/v2/stats/dashboard?teams_id=string&repositories=string\")\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": "yH4Ff4G2R73iAh_DfDISx",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.waydev.co/v2/stats/dashboard?teams_id=string&repositories=string\"\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": "yPVQXGVTisb4Pomh5Yov1"
    },
    "results": {
      "languages": [
        {
          "id": "2zrYD8p71Fy82CUx1-KXO",
          "language": "200",
          "code": "// search results matching criteria\n{\n  \"main\": {\n    \"impact\": \"157.13\",\n    \"efficiency\": 96,\n    \"active_days\": 4,\n    \"commits_per_day\": \"3.00\",\n    \"code_new\": 61,\n    \"code_refactor\": 35,\n    \"code_help\": 1,\n    \"code_churn\": 3,\n    \"percents\": {\n      \"impact\": 50,\n      \"active_days\": -15,\n      \"commits_per_day\": 25,\n      \"efficiency\": 73\n    }\n  },\n  \"developers\": [\n    {\n      \"id\": 3542,\n      \"name\": \"John Doe\",\n      \"username\": \"johndoe64\",\n      \"avatar\": \"https://avatars3.githubusercontent.com/u/2746712?v=4\",\n      \"impact\": \"157.13\",\n      \"efficiency\": 96,\n      \"active_days\": 4,\n      \"commits_per_day\": \"3.00\",\n      \"code_new\": 61,\n      \"code_refactor\": 35,\n      \"code_help\": 1,\n      \"code_churn\": 3,\n      \"info\": [\n        {\n          \"display_name\": \"Andrew Bush\",\n          \"display_avatar\": \"https://avatars3.githubusercontent.com/u/2746712?v=4\"\n        }\n      ]\n    }\n  ],\n  \"is_processing\": false,\n  \"paid_licences\": 1,\n  \"status_code\": 200\n}"
        },
        {
          "id": "SkGbISjOcOhI6h8CVEXB5",
          "language": "401",
          "code": "// bad input parameter\n"
        }
      ],
      "selectedLanguageId": "2zrYD8p71Fy82CUx1-KXO"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}