Codelanguages
GET/catalog/services/{service_id}/languages
The language breakdown for the paths one catalog service owns
get_service_languages
catalog:read
A token needs thecatalog:readscope: Read the service catalog: services, their bindings, their owners and their overviewsGranted byread_api,write_api.Every operation this scope unlocksFiltered across resources
x-gitmoap-isolation: {"kind":"cross_resource_filtered"}
The languages of the code a service is made of, summed across the paths it claims in each repository, with the repositories that contributed. A repository you cannot read contributes nothing and is not named, so two callers can see different totals for one service.
Parameters
Path
- service_idServiceId (string · uuid)Service ID
Responses
200Language breakdown returnedapplication/json
excludedExcludedBytesWhat was left out, and why.
- The ExcludedBytes schema
- documentationinteger · int64Docs, licences, changelogs.
- generatedinteger · int64Lock files, minified bundles, source maps.
- unclassifiedinteger · int64Binaries, symlinks, submodules, data and prose languages, and anything the vocabulary could not settle.
- vendoredinteger · int64Third-party code the repository carries but did not write.
itemsarray of LanguageSliceLanguages, by bytes descending then name ascending.
- The LanguageSlice schema
- bytesinteger · int64Bytes attributed to this language. Authoritative;
shareis a convenience. - filesinteger · int64How many files contributed.
- languagestringThe language's name, as the vocabulary spells it.
- sharenumber · doublePercentage of
total_bytes, to two places. - typestring
programmingormarkup— the only two kinds that reach a breakdown. - colorstring or nulloptionalThe CSS colour upstream renders this language with, when it defines one.
sourcesarray of LanguageSourceOne entry per repository contributing to the totals that you can read, so two people can see different totals for the same service. An empty list means the service has no code you can see.
- The LanguageSource schema
- repository_idRepositoryId (string · uuid)The repository whose paths this service binds.
- truncatedbooleanWhether that repository's index is truncated.
- indexed_atstring or nulloptionalWhen that index was written.
- indexed_shastring or nulloptionalThe commit its index describes.
- total_bytesinteger · int64Total counted bytes across every contributing repository.
- total_filesinteger · int64Total counted files.
200 exampleSynthesized example
{
"excluded": {
"documentation": 20,
"generated": 62,
"unclassified": 89,
"vendored": 47
},
"items": [
{
"bytes": 26,
"files": 73,
"language": "language-7fa0",
"share": 46,
"type": "type-205b"
}
],
"sources": [
{
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"truncated": false
}
],
"total_bytes": 1,
"total_files": 1
}
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-5a4b",
"message": "Inline scalar newtypes but keep their brand"
}
}
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-325e",
"message": "Pin a page's payload to the build that rendered it"
}
}
403Forbiddenapplication/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-cc73",
"message": "Stream pipeline status into the run header"
}
}
404Service 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-4362",
"message": "Stream pipeline status into the run header"
}
}
CLI
gitmoap languages get-service-languages
- --service-ididService ID