Getting started
List GitHub repositories
List repositories available through the acting user's GitHub installations.
GET
/api/customer/v1/source/repositoriesQuery parameters
| Name | Type | Required | Limits |
|---|---|---|---|
projectId | string | No | At least 1 character(s) |
Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request GET "$HCODE_BASE_URL/api/customer/v1/source/repositories" \ --header "Authorization: Bearer $HCODE_API_KEY"
Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"connected": {
"type": "boolean"
},
"installations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"accountLogin": {
"type": "string"
}
},
"required": [],
"additionalProperties": true
}
},
"repos": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"fullName": {
"type": "string"
},
"private": {
"type": "boolean"
},
"defaultBranch": {
"type": "string"
},
"installationId": {
"type": "integer"
},
"accountLogin": {
"type": "string"
}
},
"required": [],
"additionalProperties": true
}
},
"installUrl": {
"type": "string"
}
},
"required": [
"connected",
"installations",
"repos"
],
"additionalProperties": true
}See errors and retries for failure responses.