跳到主要内容

Delete File

DELETE 

/api/v5/repos/:owner/:repo/contents/:path

Request​

Path Parameters

    owner stringrequired

    Repository space address (organization or individual's address path)

    repo stringrequired

    Repository path (path)

    path stringrequired

    The path of the file.

Query Parameters

    access_token stringrequired

    User authorization code

Body

    shastringrequired

    The Blob SHA of the file

    branchstring

    Branch name. Defaults to the repository's default branch.

    messagestringrequired

    commit message

Responses​

Successful Response

Response Headers
    Schema
      commit object
      shastring
      author object
      namestring
      emailstring
      datestring
      committer object
      namestring
      emailstring
      datestring
      messagestring
      treestring
      parentsstring[]