---
updatedAt: 2025-11-11T01:59:46.000Z
agentTools:
  projectIndex: https://docs.codecov.com/llms.txt
---

# Repository detail

Returns a single repository by name

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Codecov API",
    "version": "2.0.0",
    "description": "Public Codecov API"
  },
  "paths": {
    "/{service}/{owner_username}/repos/{repo_name}/": {
      "get": {
        "operationId": "repos_retrieve",
        "description": "Returns a single repository by name",
        "summary": "Repository detail",
        "parameters": [
          {
            "in": "path",
            "name": "owner_username",
            "schema": {
              "type": "string"
            },
            "description": "username from service provider",
            "required": true
          },
          {
            "in": "path",
            "name": "repo_name",
            "schema": {
              "type": "string"
            },
            "description": "repository name",
            "required": true
          },
          {
            "in": "path",
            "name": "service",
            "schema": {
              "type": "string",
              "enum": [
                "bitbucket",
                "bitbucket_server",
                "github",
                "github_enterprise",
                "gitlab",
                "gitlab_enterprise"
              ]
            },
            "description": "Git hosting service provider",
            "required": true
          }
        ],
        "tags": [
          "Repos"
        ],
        "security": [
          {
            "tokenAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Repo"
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CommitTotals": {
        "type": "object",
        "properties": {
          "files": {
            "type": "integer"
          },
          "lines": {
            "type": "integer"
          },
          "hits": {
            "type": "integer"
          },
          "misses": {
            "type": "integer"
          },
          "partials": {
            "type": "integer"
          },
          "coverage": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "branches": {
            "type": "integer"
          },
          "methods": {
            "type": "integer"
          },
          "sessions": {
            "type": "integer"
          },
          "complexity": {
            "type": "number",
            "format": "double"
          },
          "complexity_total": {
            "type": "number",
            "format": "double"
          },
          "complexity_ratio": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "diff": {
            "type": "integer",
            "readOnly": true,
            "title": "Deprecated: this will always return 0.  Please use comparison endpoint for diff totals instead."
          }
        },
        "required": [
          "branches",
          "complexity",
          "complexity_ratio",
          "complexity_total",
          "coverage",
          "diff",
          "files",
          "hits",
          "lines",
          "methods",
          "misses",
          "partials",
          "sessions"
        ]
      },
      "Owner": {
        "type": "object",
        "properties": {
          "service": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ServiceEnum"
              }
            ],
            "readOnly": true
          },
          "username": {
            "type": "string",
            "readOnly": true,
            "nullable": true
          },
          "name": {
            "type": "string",
            "readOnly": true,
            "nullable": true
          }
        },
        "required": [
          "name",
          "service",
          "username"
        ]
      },
      "Repo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "title": "repository name"
          },
          "private": {
            "type": "boolean",
            "title": "indicates private vs. public repository"
          },
          "updatestamp": {
            "type": "string",
            "format": "date-time",
            "title": "last updated timestamp"
          },
          "author": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Owner"
              }
            ],
            "title": "repository owner"
          },
          "language": {
            "type": "string",
            "title": "primary programming language used"
          },
          "branch": {
            "type": "string",
            "title": "default branch name"
          },
          "active": {
            "type": "boolean",
            "title": "indicates whether the repository has received a coverage upload"
          },
          "activated": {
            "type": "boolean",
            "title": "indicates whether the repository has been manually deactivated"
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitTotals"
              }
            ],
            "title": "recent commit totals on the default branch"
          }
        },
        "required": [
          "activated",
          "active",
          "author",
          "branch",
          "language",
          "name",
          "private",
          "totals",
          "updatestamp"
        ]
      },
      "ServiceEnum": {
        "enum": [
          "github",
          "gitlab",
          "bitbucket",
          "github_enterprise",
          "gitlab_enterprise",
          "bitbucket_server"
        ],
        "type": "string",
        "description": "* `github` - Github\n* `gitlab` - Gitlab\n* `bitbucket` - Bitbucket\n* `github_enterprise` - Github Enterprise\n* `gitlab_enterprise` - Gitlab Enterprise\n* `bitbucket_server` - Bitbucket Server"
      }
    },
    "securitySchemes": {
      "tokenAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.codecov.io/api/v2/"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```