Skip to content

accept_model_share_request

Accept a pending model share request. The source model is fetched and written into a project in the current (target) tenant with a provenance header. Requires Owner or Editor access to the destination project.

Supply expected_sha (the current Gitea file SHA) to confirm overwriting an existing file — this prevents silent overwrites of concurrent edits.

NameTypeRequiredDefaultDescription
request_idstrYesUUID of the pending share request
target_project_namestrYesProject in the current tenant to receive the model
target_model_namestrNo''Name in the target project. Defaults to the suggested name from the request
expected_shastrNo''Current Gitea file SHA — required to overwrite an existing file
  • request_id (string)
  • status (string) — always "accepted" on success
  • target_project (string)
  • target_model (string)
  • target_path (string)
  • source_commit_sha (string) — source file SHA at accept time
  • target_commit_sha (string) — commit SHA written to target repo
  • accepted_at (string) — ISO 8601 timestamp
{
"name": "accept_model_share_request",
"arguments": {
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"target_project_name": "shared-models",
"target_model_name": "acme_revenue_forecast"
}
}
{
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"status": "accepted",
"target_project": "shared-models",
"target_model": "acme_revenue_forecast",
"target_path": "model/acme_revenue_forecast.py",
"source_commit_sha": "abc123def456",
"target_commit_sha": "deadbeef1234",
"accepted_at": "2026-05-09T11:00:00+00:00"
}
  • Module: Sharing
  • Requires authentication via API token or Auth0 JWT.
  • Caller must be authenticated as a member of the target tenant with Owner or Editor access to target_project_name.
  • To keep the model current, call sync_shared_model with the request_id.