Coderepositories
GET/repositories/{repo_id}/profile
Get a repository's profile
get_repo_profile
repo:read
A token needs therepo:readscope: View repositories and metadataGranted bymcp_agent,mcp_agent_write,read_api,read_repository,write_api,write_repository.Every operation this scope unlocks
What a repository carries — a README, a licence and which one, a changelog, a contributing guide, a code of conduct, a security policy, code owners, a service catalog — and how it is set up: its pipelines, whether its default branch is protected, its wiki and its latest release. One read for a project's overview, and for what to suggest adding next.
Parameters
Path
- repo_idRepositoryId (string · uuid)Repository ID
Query
- refstringoptionalBranch, tag, or commit SHA the files are read at. Default: HEAD
Responses
200The repository's profile at the refapplication/json
- commit_shaCommitHash (string)The commit it resolved to.
filesProfileFiles
- The ProfileFiles schema
catalogProfileFile or nulloptional
- The ProfileFile schema
- pathstring
changelogProfileFile or nulloptional
- The ProfileFile schema
- pathstring
code_of_conductProfileFile or nulloptional
- The ProfileFile schema
- pathstring
codeownersProfileFile or nulloptional
- The ProfileFile schema
- pathstring
contributingProfileFile or nulloptional
- The ProfileFile schema
- pathstring
licenseProfileLicense or nulloptional
- The ProfileLicense schema
- pathstring
- namestring or nulloptional
- spdx_idstring or nulloptionalThe licence's SPDX identifier, when the text is one of the licences the platform knows. Absent for a licence it does not recognise — never a guess at the nearest.
readmeProfileFile or nulloptional
- The ProfileFile schema
- pathstring
securityProfileFile or nulloptional
- The ProfileFile schema
- pathstring
- refstringThe ref the files were read at, as asked.
setupProfileSetup
- The ProfileSetup schema
- default_branch_protectedbooleanA branch rule protects the default branch.
- pipeline_countinteger · int320–∞Its published pipelines, counted up to 100.
wikiProfileWiki
- The ProfileWiki schema
- enabledboolean
- page_countinteger · int320–∞
latest_releaseProfileRelease or nulloptional
- The ProfileRelease schema
- tag_nameTagName (string)
200 exampleSynthesized example
{
"commit_sha": "ac2227a69b1289e51a341a2a9324408fe23a3b1f",
"files": {
"catalog": {
"path": "path-83ad"
},
"changelog": {
"path": "path-62b7"
},
"code_of_conduct": {
"path": "path-9823"
},
"codeowners": {
"path": "path-93fd"
},
"contributing": {
"path": "path-3baa"
},
"license": {
"path": "path-6244",
"name": "payments-api",
"spdx_id": "ac79c82a-3610-4198-9625-4ef24769e63b"
},
"readme": {
"path": "path-5f53"
},
"security": {
"path": "path-0c9f"
}
},
"ref": "ref-e5e0",
"setup": {
"default_branch_protected": false,
"pipeline_count": 2,
"wiki": {
"enabled": true,
"page_count": 6
},
"latest_release": {
"tag_name": "payments-api"
}
}
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
- BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-bb43",
"message": "Draw the region map from operation density"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
- UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-bd07",
"message": "Pin a page's payload to the build that rendered it"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames it - PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-6455",
"message": "Stream pipeline status into the run header"
}
}
404Repository or ref not foundapplication/json
Error codes
- NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-59e9",
"message": "Label every synthesized example"
}
}
409The repository is empty: nothing has been pushed to it yetapplication/json
Error codes
- CONFLICTThe request conflicts with the resource's current state;
reasonsays how - REPOSITORY_EMPTYThe repository has no branches or tags yet; there is nothing to read until something is pushed to it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
409 exampleSynthesized example
{
"error": {
"code": "code-5102",
"message": "Draw the region map from operation density"
}
}
CLI
gitmoap repos get-profile
- --repo-ididRepository ID (id or owner/repo path)
- --refstringoptionalBranch, tag, or commit SHA the files are read at. Default: HEAD