Reference
API Documentation
Repository Endpoints

Repository API Endpoints Documentation

Endpoints

1. Get All Repositories

Endpoint: GET /repos

Description: Retrieves a paginated list of all repositories with optional filtering by dependencies.

Query Parameters:

ParameterTypeRequiredDefaultDescription
pageintegerNo1Page number for pagination
per_pageintegerNo30Number of items per page (max: 100)
dependency_namesstringNo-Comma-separated list of dependency names to filter by

Example Request:

GET /repos?page=1&per_page=50&dependency_names=react,typescript,dependency_files=package.json

Response:

{
  "data": [
    {
      "internal_id": 1,
      "github_rest_id": 123456,
      "github_graphql_id": "MDEwOlJlcG9zaXRvcnkxMjM0NTY=",
      "url": "https://github.com/octocat/Hello-World",
      "name": "Hello-World",
      "full_name": "octocat/Hello-World",
      "private": false,
      "owner_login": "octocat",
      "owner_avatar_url": "https://avatars.githubusercontent.com/u/123456?v=4",
      "description": "My first repository on GitHub!",
      "homepage": "https://github.com",
      "fork": false,
      "forks_count": 10,
      "archived": false,
      "disabled": false,
      "license": "MIT",
      "language": "JavaScript",
      "stargazers_count": 100,
      "watchers_count": 100,
      "open_issues_count": 5,
      "has_issues": true,
      "has_discussions": false,
      "has_projects": false,
      "created_at": 1642233600,
      "updated_at": 1642320000,
      "pushed_at": 1642320000,
      "visibility": "public",
      "size": 1024,
      "default_branch": "main",
      "dependencies": []
    }
  ],
  "meta": {
    "request_id": "req-123",
    "timestamp": 1642233600,
    "execution_time": 45
  }
}

Pagination: This endpoint uses GitHub-style pagination with Link headers for navigation.


2. Get Repository by Owner and Name

Endpoint: GET /repos/{owner}/{name}

Description: Retrieves detailed information about a specific repository by its owner and name.

Path Parameters:

ParameterTypeRequiredDescription
ownerstringYesRepository owner username
namestringYesRepository name

Example Request:

GET /repos/octocat/Hello-World

Response:

{
  "internal_id": 1,
  "github_rest_id": 123456,
  "github_graphql_id": "MDEwOlJlcG9zaXRvcnkxMjM0NTY=",
  "url": "https://github.com/octocat/Hello-World",
  "name": "Hello-World",
  "full_name": "octocat/Hello-World",
  "private": false,
  "owner_login": "octocat",
  "owner_avatar_url": "https://avatars.githubusercontent.com/u/123456?v=4",
  "description": "My first repository on GitHub!",
  "homepage": "https://github.com",
  "fork": false,
  "forks_count": 10,
  "archived": false,
  "disabled": false,
  "license": "MIT",
  "language": "JavaScript",
  "stargazers_count": 100,
  "watchers_count": 100,
  "open_issues_count": 5,
  "has_issues": true,
  "has_discussions": false,
  "has_projects": false,
  "created_at": 1642233600,
  "updated_at": 1642320000,
  "pushed_at": 1642320000,
  "visibility": "public",
  "size": 1024,
  "default_branch": "main"
}

Error Responses:

  • 400 Bad Request - Missing or invalid owner/name parameters
  • 404 Not Found - Repository not found

Common Response Fields

Meta Information

All endpoints return a meta object with the following fields:

FieldTypeDescription
request_idstringUnique identifier for the request
timestampintegerUnix timestamp of the response
execution_timeintegerRequest execution time in milliseconds

Repository Object

Repository objects contain the following fields:

FieldTypeDescription
internal_idintegerInternal repository ID
github_rest_idintegerGitHub REST API repository ID
github_graphql_idstringGitHub GraphQL API repository ID
urlstringRepository URL
namestringRepository name
full_namestringFull repository name (owner/name)
privatebooleanWhether the repository is private (nullable)
owner_loginstringRepository owner username
owner_avatar_urlstringOwner's avatar URL (nullable)
descriptionstringRepository description (nullable)
homepagestringRepository homepage URL (nullable)
forkbooleanWhether the repository is a fork (nullable)
forks_countintegerNumber of forks (nullable)
archivedbooleanWhether the repository is archived (nullable)
disabledbooleanWhether the repository is disabled (nullable)
licensestringRepository license (nullable)
languagestringPrimary programming language (nullable)
stargazers_countintegerNumber of stars (nullable)
watchers_countintegerNumber of watchers (nullable)
open_issues_countintegerNumber of open issues (nullable)
has_issuesbooleanWhether issues are enabled (nullable)
has_discussionsbooleanWhether discussions are enabled (nullable)
has_projectsbooleanWhether projects are enabled (nullable)
created_atintegerUnix timestamp of creation (nullable)
updated_atintegerUnix timestamp of last update (nullable)
pushed_atintegerUnix timestamp of last push (nullable)
visibilitystringRepository visibility (nullable)
sizeintegerRepository size in KB (nullable)
default_branchstringDefault branch name (nullable)
dependenciesarrayArray of repository dependencies (nullable)

Commit Object

Commit objects contain the following fields:

FieldTypeDescription
commit_hashstringGit commit hash
author_emailstringAuthor's email address
author_dateintegerUnix timestamp of author date (nullable)
committer_emailstringCommitter's email address
committer_dateintegerUnix timestamp of committer date (nullable)
messagestringCommit message
repo_urlstringRepository URL

Dependency Object

Dependency objects contain the following fields:

FieldTypeDescription
dependency_namestringName of the dependency
dependency_filestringFile where the dependency is declared

Repository Dependency Object

Repository dependency objects contain the following fields:

FieldTypeDescription
urlstringRepository URL
first_use_dateintegerUnix timestamp of first use (nullable)
last_use_dateintegerUnix timestamp of last use (nullable)
updated_atintegerUnix timestamp of last update (nullable)
statusstringDependency status (nullable)
dependencyobjectDependency information object

Pagination

Page-based Pagination

Used by /repos and /repos/{owner}/{name}/commits endpoints:

  • page - Page number (starts at 1)
  • per_page - Items per page (max 100)

Pagination information is included in the response:

{
  "pagination": {
    "page": 1,
    "per_page": 30,
    "next_page": 2,
    "prev_page": 0,
    "has_more": true
  }
}

Page-based Pagination

Used by all endpoints including /repos/{owner}/{name}/dependencies:

  • page - Page number (starts at 1)
  • per_page - Items per page (max 100)

Pagination information is included in the response:

{
  "pagination": {
    "page": 1,
    "per_page": 30,
    "next_page": 2,
    "prev_page": 0,
    "has_more": true
  }
}

Link Headers

Page-based pagination also includes GitHub-style Link headers:

Link: <https://drm.openq.dev/public-api/repos?page=1&per_page=30>; rel="first",
      <https://drm.openq.dev/public-api/repos?page=2&per_page=30>; rel="next",
      <https://drm.openq.dev/public-api/repos?page=10&per_page=30>; rel="last"

Error Handling

All endpoints return appropriate HTTP status codes:

  • 200 OK - Request successful
  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Missing or invalid authentication
  • 404 Not Found - Resource not found
  • 500 Internal Server Error - Server error

Error responses follow this format:

{
  "error": "Error message describing what went wrong"
}
OpenQ Logo
The CRM for developer relations to connect community, product and customer data.
Company
About
Careers
Made by dev rels for dev rels
in Germany, US, Canada, Austria & Spain
© 2025 OpenQ Labs GmbH. All right reserved.