Hi,
Using the GitLab rest api documentation available, i am trying to update the contents of an existing file in repository.
Link: Repository files API | GitLab
However, if the contents are quite large, the api is executed without any error but the changes are not getting reflected in the file in GitLab repository.
Is there any limit on the size of the content that we need to pass in the URL of the API?
I also would like to update and existing large text file in the repository, but the following curl command uses “content”: “some content”. Is it possible to specify a file-path to the file to be updated in the repo?
https://docs.gitlab.com/ee/api/repository_files.html#update-existing-file-in-repository
curl --request PUT --header ‘PRIVATE-TOKEN: <your_access_token>’ --header “Content-Type: application/json”
–data ‘{“branch”: “master”, “author_email”: “author@example.com”, “author_name”: “Firstname Lastname”,
“content”: “some content”, “commit_message”: “update file”}’
“https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject.rb”