Skip to content

sync_shared_model

Re-sync an accepted model share with the latest source content. Caller must have Owner or Editor access to the target model in the acting workspace (your current one, or workspace_id if passed — must be the request’s target tenant; OAuth/JWT sessions only). If the target file already exists, expected_sha (the current Gitea blob SHA) is required to confirm the overwrite; omitting it returns a conflict error with the current SHA and a recovery hint.

NameTypeRequiredDefaultDescription
request_idAnnotated[str, Field(description='UUID of the model share request.')]Yes
expected_shaAnnotated[str, Field(description='Current Gitea blob SHA of the target file. Required when the target already exists — omitting it returns a conflict error with the current SHA and a recovery hint.')]No''
target_workspace_id`Annotated[strNone, Field(description=“Optional UUID of a workspace other than your current one to sync into. Omit to use your current workspace. Must match the request’s target tenant. Cross-workspace targeting requires an active membership in that workspace and is only available to OAuth/JWT sessions — API tokens stay scoped to their issuing workspace. The response echoes target_workspace_id so you can reuse it on follow-up calls.”)]`NoNone

Returns a structured object. Top-level fields:

  • request_id (string)
  • target_model (string)
  • target_script (string)
  • target_path (string)
  • source_commit_sha (string)
  • target_commit_sha (string)
  • synced_at (string)

See the response example below for the full payload shape.

{
"name": "sync_shared_model",
"arguments": {
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"expected_sha": "0123456789abcdef0123456789abcdef01234567"
}
}
{
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"target_model": "forecasts",
"target_script": "acme_revenue_forecast",
"target_path": "model/acme_revenue_forecast.py",
"source_commit_sha": "abc1234def5678901234567890abcdef12345678",
"target_commit_sha": "0123456789abcdef0123456789abcdef01234567",
"synced_at": "2026-04-28T10:00:00+00:00"
}
  • Module: Sharing
  • Requires authentication via API token or Auth0 JWT.