Commit file changes
Apply one or more file changes to a branch and create one commit. Repository write access is required.
POST
/v1/models/{workspace}/{model}/commitsAuthorization
Authorizationstringrequired
Send a Modaic bearer token in the Authorization header.
Path Parameters
workspacestringrequired
User or organization workspace slug.
modelstringrequired
Model repository slug.
Body
branchstringrequired
Branch to update.
messagestringrequired
Commit message, up to 500 characters.
expectedHeadShastringrequired
Branch head last read by the caller.
changesFileChange[]required
At least one change. {"operation":"upsert","path":"...","contents":"..."}
creates or replaces a file. {"operation":"delete","path":"..."} removes
one. Rename by deleting the old path and upserting the new path in the same request.
Response
commitShastringrequired
branchstringrequired
previousShastringrequired
Was this page helpful?