Docs
Repositories

List repositories

Lists repositories across all connected git provider installations for the organization. Use include=protection to check branch protection status. refresh=true requires installation_id.

GET
/v1/repositories

Authorization

BearerAuth
AuthorizationBearer <token>

API key (csk_live_…)

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value <= 10000
limit?integer

Items per page

Default20
Range1 <= value <= 100
provider?string

Filter by git provider

Value in"github" | "gitlab"
installation_id?string

Filter by installation ID

search?string

Case-insensitive substring match on repo name

Lengthlength <= 200
include?string

Include additional data (e.g. "protection" for branch protection status)

Value in"protection"
refresh?string

Force refresh from provider (requires installation_id)

Response Body

application/json

application/json

application/json

curl -X GET "https://api.cospec.io/v1/repositories"
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "fullName": "string",
      "provider": "github",
      "installationId": "string",
      "baseUrl": "string",
      "private": true,
      "defaultBranch": "string",
      "cloneUrl": "string",
      "protection": {
        "defaultBranchProtected": true
      }
    }
  ],
  "pagination": {
    "page": 0,
    "limit": 0,
    "total": 0,
    "totalPages": 0
  },
  "meta": {
    "refreshed": true,
    "lastRefreshedAt": "string"
  }
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "requestId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "requestId": "string"
}