Templates · Developer tools

GitHub REST API collection template

Repositories, issues, pull requests, commits and Actions runs with the GitHub REST API.

What's inside

Everyday GitHub REST API calls: who am I, my repositories, issues and pull requests of a repository, recent commits and GitHub Actions runs, plus search. Set owner and repo to point every request at your repository.

13 requests in 4 folders · Base URL https://api.github.com · Bearer token

Set it up

  1. Open GitHub REST API in Requestarium (or in the app: Import, Start from a template) and import it. You get the collection and a "GitHub REST API" environment.
  2. Create a fine-grained personal access token at github.com/settings/tokens with read access to the repository (and Issues write access to create issues).
  3. Fill in the environment, pick it in the environment menu and send the first request.

Environment variables

VariableWhat it is
githubTokensecretPersonal access token.
ownerUser or organization that owns the repository.
repoRepository name.
issueNumberFilled by "Create an issue".

Requests

Users

  • GET
    Get the authenticated user /user

    The account the token belongs to; a quick way to check the token.

  • GET
    List my repositories /user/repos

    Repositories you can access, recently updated first.

  • GET
    Rate limit /rate_limit

    How many requests you have left this hour.

Repositories

  • GET
    Get a repository /repos/{{owner}}/{{repo}}

    Stars, default branch, visibility and more.

  • GET
    List commits /repos/{{owner}}/{{repo}}/commits

    The latest commits on the default branch.

  • GET
    List branches /repos/{{owner}}/{{repo}}/branches

    Branches of the repository.

  • GET
    Search repositories /search/repositories

    GitHub search syntax in q.

Issues and pull requests

  • GET
    List open issues /repos/{{owner}}/{{repo}}/issues

    Open issues (pull requests are listed too).

  • POST
    Create an issue /repos/{{owner}}/{{repo}}/issues

    Opens an issue and saves its number as issueNumber.

  • POST
    Comment on an issue /repos/{{owner}}/{{repo}}/issues/{{issueNumber}}/comments

    Adds a comment to the issue.

  • GET
    List open pull requests /repos/{{owner}}/{{repo}}/pulls

    Open pull requests.

Actions

  • GET
    List workflow runs /repos/{{owner}}/{{repo}}/actions/runs

    Recent GitHub Actions runs and their status.

  • GET
    List workflows /repos/{{owner}}/{{repo}}/actions/workflows

    Workflows defined in the repository.