---
title: "Resolve repository by URL"
method: POST
path: "/api/v1/repositories/resolve-by-url"
tags: ["Repositories"]
---

# Resolve repository by URL

`POST /api/v1/repositories/resolve-by-url`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v1/repositories/resolve-by-url`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Given a repository URL and VCS, returns the matching repository and provider object IDs

## Request body

- ResolveRepositoryByUrlInput
  - `organizationId` string
  - `repositoryUrl` string, required
  - `vcs` 'github' | 'gitlab' | 'bitbucket' | 'gerrit' | 'generic' | 'cvs', required

## Response `200`

Repository resolved

- ResolveRepositoryByUrlResponse
  - `repositoryId` string, required
  - `vcsObjectId` string, required
  - `externalId` string
  - `vcs` 'github' | 'gitlab' | 'bitbucket' | 'gerrit' | 'generic' | 'cvs', required
  - `repositoryUrl` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api-2.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api-2/revisions/ea6ae4b68cd3?raw)
