Inspect

Create repository

Create a repository in Inspect from a GitHub repository URL. Requires repository add permission; API keys restricted to specific repositories cannot create repositories. Returns 404 when the Inspect GitHub App cannot access the repository.

Base URL
POST
/api/v2/repositories

Create a repository in Inspect from a GitHub repository URL. Requires repository add permission; API keys restricted to specific repositories cannot create repositories. Returns 404 when the Inspect GitHub App cannot access the repository.

Authorization

bearerAuth repositories:write
headerAuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

Scope: repositories:write

Request Body

application/json
  1. body
url*Repositories.RepositoryUrl

GitHub repository URL, for example https://github.com/acme/widgets. The Inspect GitHub App must have access to the repository.

Formaturi
Length1 <= length

Response Body

Created repository

application/json
  1. response
data*

A repository configured in Inspect.

Example Request
curl -X POST 'https://app.inspect.com/api/v2/repositories' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://github.com/acme/web"}'
Example Response
{  "data": {    "id": "web",    "name": "web",    "description": "Acme customer dashboard and marketing site",    "organization": "acme",    "remote": "github",    "github_host": "github",    "base_branch": "main",    "auto_match_enabled": true,    "ci_auto_fix_ignored_checks": [      "codecov/patch"    ],    "merge_queue": {      "provider": "github"    },    "automatic_reviews": "on"  }}