Skip to content

sync_shared_model

Re-sync an accepted model share with the latest source content. Fetches the current source model and overwrites the accepted copy in the target repo with an updated provenance header.

Requires Owner or Editor access to the target project. Supply expected_sha to guard against overwriting concurrent edits.

NameTypeRequiredDefaultDescription
request_idstrYesUUID of an accepted share request
expected_shastrNo''Current Gitea SHA of the target file — supply to prevent overwriting concurrent edits
  • request_id (string)
  • target_project (string)
  • target_model (string)
  • target_path (string)
  • source_commit_sha (string) — source file SHA at sync time
  • target_commit_sha (string) — commit SHA written to target repo
  • synced_at (string) — ISO 8601 timestamp
{
"name": "sync_shared_model",
"arguments": {
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
}
}
{
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"target_project": "shared-models",
"target_model": "acme_revenue_forecast",
"target_path": "model/acme_revenue_forecast.py",
"source_commit_sha": "newsha123abc",
"target_commit_sha": "targetsha456def",
"synced_at": "2026-05-09T14:00:00+00:00"
}
  • Module: Sharing
  • Requires authentication via API token or Auth0 JWT.
  • Only works on accepted requests; rejected or revoked requests return an error.