> ## Documentation Index
> Fetch the complete documentation index at: https://docs.riftmap.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Resolve a clone URL or org/repo slug to a repository (pass exactly one of `url` or `full_path`).

> Resolve an agent-supplied identifier to a Riftmap repository row.

Designed for AI coding agents and CI integrations: an agent in
``github.com/myorg/repo`` can ask Riftmap for the matching repository
without enumerating the workspace. **Pass exactly one of ``url`` or
``full_path``** — passing both, neither, or any other parameter
(e.g. ``clone_url=``, ``name=``, ``repo=``) returns 400. The parameter
is named ``url`` (not ``clone_url``) even though it accepts what most
platforms call a "clone URL".

URL matching first attempts a normalised ``clone_url`` match, then falls
back to the ``org/repo`` segment of the URL against ``full_path``. Returns
409 if more than one repo matches; 404 if none.



## OpenAPI

````yaml /openapi.json get /api/v1/repositories/lookup
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.7.5
servers: []
security: []
paths:
  /api/v1/repositories/lookup:
    get:
      tags:
        - repositories
      summary: >-
        Resolve a clone URL or org/repo slug to a repository (pass exactly one
        of `url` or `full_path`).
      description: >-
        Resolve an agent-supplied identifier to a Riftmap repository row.


        Designed for AI coding agents and CI integrations: an agent in

        ``github.com/myorg/repo`` can ask Riftmap for the matching repository

        without enumerating the workspace. **Pass exactly one of ``url`` or

        ``full_path``** — passing both, neither, or any other parameter

        (e.g. ``clone_url=``, ``name=``, ``repo=``) returns 400. The parameter

        is named ``url`` (not ``clone_url``) even though it accepts what most

        platforms call a "clone URL".


        URL matching first attempts a normalised ``clone_url`` match, then falls

        back to the ``org/repo`` segment of the URL against ``full_path``.
        Returns

        409 if more than one repo matches; 404 if none.
      operationId: lookup_repository_api_v1_repositories_lookup_get
      parameters:
        - description: >-
            Git remote URL (https or ssh form, with or without `.git` suffix).
            Example: `https://github.com/myorg/repo`. **The parameter is named
            `url`, not `clone_url`** — a common agent guess that returns 400.
            Mutually exclusive with `full_path`.
          in: query
          name: url
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Git remote URL (https or ssh form, with or without `.git` suffix).
              Example: `https://github.com/myorg/repo`. **The parameter is named
              `url`, not `clone_url`** — a common agent guess that returns 400.
              Mutually exclusive with `full_path`.
            title: Url
        - description: >-
            Repository full path within its host. Example: `myorg/repo`.
            Case-insensitive. Mutually exclusive with `url`.
          in: query
          name: full_path
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Repository full path within its host. Example: `myorg/repo`.
              Case-insensitive. Mutually exclusive with `url`.
            title: Full Path
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    RepositoryResponse:
      description: Basic repository record.
      properties:
        archived:
          title: Archived
          type: boolean
        clone_url:
          title: Clone Url
          type: string
        connected_org_id:
          format: uuid
          title: Connected Org Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        default_branch:
          title: Default Branch
          type: string
        full_path:
          title: Full Path
          type: string
        id:
          format: uuid
          title: Id
          type: string
        last_activity_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Activity At
        last_commit_sha:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Commit Sha
        last_scanned_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Scanned At
        name:
          title: Name
          type: string
        platform_id:
          title: Platform Id
          type: string
      required:
        - id
        - connected_org_id
        - platform_id
        - name
        - full_path
        - clone_url
        - default_branch
        - last_scanned_at
        - last_commit_sha
        - last_activity_at
        - archived
        - created_at
      title: RepositoryResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````