Delete

  • DELETE
  • /workspaces
  • /:domain
  • /projects
  • /:project_name
  • /repository
  • /contents
  • /:path

Removes a file from the repository.

Request

REQUIRED SCOPES
WORKSPACE, REPOSITORY_WRITE
URL PARAMETERS
domainrequired string
The workspace domain.
pathrequired string
The file or directory location in the repository.
project_namerequired string
The name ID of the project.
POST PARAMETERS
messagerequired string
The log message of the commit.
branchstring
The target branch for the commit operation.

Last modified on Oct 3, 2024

Example:

curl -X DELETE "https://api.buddy.works/workspaces/:domain/projects/:project_name/repository/contents/:path" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "branch": "development",
  "message": "delete test.txt"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/a276b914f11f7dfeb88e46375b0b1e51b8c1578c", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/a276b914f11f7dfeb88e46375b0b1e51b8c1578c", "revision": "a276b914f11f7dfeb88e46375b0b1e51b8c1578c", "author_date": "2016-03-02T12:31:51Z", "commit_date": "2016-03-02T12:31:51Z", "message": "delete test.txt", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999