---
title: "Get Binding For Remote"
method: GET
path: "/datamate-project-bindings/by-remote"
tags: ["DatamateProjectBindings"]
---

# Get Binding For Remote

`GET /datamate-project-bindings/by-remote`

Look up whether this tenant already has a workspace linked to ``repo_remote``.

Server-authoritative pre-check for the CLI's post-scan prompt: a 200
return says "there's a binding, render the already-linked dialog"; a 404
says "unbound, render the create/link offer". The CLI never treats its
own local cache as authoritative when this endpoint is reachable.

Consensus review M1: a workspace that the caller can neither own nor see
(private + not their datamate) 404s as if the remote were unbound so the
endpoint does not double as a workspace-metadata oracle.

## Query parameters

- `repo_remote` string, required — Project git remote URL

## Response `200`

Successful Response

- GetBindingResponse — Response for GET /datamate-project-bindings/by-remote.
  - `binding` BindingModel, required — Wire shape returned to the CLI for a single binding row. Either ``repo_remote`` or ``project_path`` is present (at least one; the row's CHECK constraint enforces this). Projects with a git remote use ``repo_remote``; projects without one (materialized sample scaffolds, fresh scratch dirs) use ``project_path`` as the fallback identifier.
    - `id` integer, required
    - `datamate_id` integer, required
    - `datamate_name` string, required
    - `repo_remote` string, nullable
    - `project_path` string, nullable
    - `created_at` string, date-time, nullable
  - `datamate` DatamateRef, required — Minimal datamate reference embedded in binding responses.
    - `id` integer, required
    - `name` string, required

## Other responses

- `400` — Invalid request
- `404` — No workspace linked to this remote
- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/revisions/b9cc757ca795/schema)
