Genbase
ApiRepository

Update file

PUT
/repository/{repo_name}/file

Authorization

AuthorizationRequiredBearer <token>

JWT Token for authenticated users (obtained via /auth/jwt/login).

In: header

Request Body

application/jsonRequired
contentRequiredstring

Path Parameters

repo_nameRequiredstring

Repository name (usually the module_id)

Query Parameters

file_pathRequiredstring

Relative path to the file within the repository

curl -X PUT "http://localhost:8000/repository/string/file?file_path=string" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "string"
  }'

Successful Response - Update Status

{
  "status": "string",
  "message": "string",
  "file_path": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}