List Scores for Teams

curl --header "Authorization: bearer {your_personal_access_token}" https://api.codeowners.com/api/v1/owners/{org}/{repository}/teamScores/{path}?teamIds[]={teamId}&teamIds[]={teamId2}

The endpoint will return a list of team scores for the specified path. If no path is specified it returns scores for the root of the repository.

It will only return scores for the teams specified. For each team that is specified, it will return the summary of that team member's scores for the path specified.

If you want to return the individual contributor scores for a specific path, see the documentation for the Contributor Score endpoint.

Headers:

Authorization: string; Required;

Append the bearer followed with your personal-access-token

Path parameters:

org : string; Required;

The organization who owns the repository.

repository: string; Required;

The name of the repository.

path: string; Optional;

Relative path of a file or a directory from the root of your repository

Response schema:

{
	"type": array,
    "items": {
    	"type": "Score",
        "properties": {
        	"path": {
            	"type": string,
                "description": "The path of the file or directory"
            },
            "teams": {
            	"type": array,
                "items": {
                	"type": "ScoreItem",
                    "properties": {
                    	"id": {
                        	"type": integer,
                            "description": "Id of the team"
                        },
                        "score": {
                        	"type": float,
                            "description": "The score for the path, the summary of the score for that team's contributors for the specific path."
                        }
                    }
                }
            }
        }
    }
}

Example response:

[
	{
		"path": "/src/index.ts",
		"teams": [
			{
				"id": 1,
				"score": 0.23
			},
			{
				"id": 2,
				"score": 0.12
			},
			{
				"id": 3,
				"score": 0.02
			}
		]
	},
	{
		"path": "/src/components/",
		"teams": [
			{
				"id": 1,
				"score": 0.34
			},
			{
				"id": 2,
				"score": 0.02
			},
		]
	},
]