branches
post/repositories/{repository}/branches/{branch}/revert

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/repositories/{repository}/branches/{branch}/revert
  • Auth
    • HTTP bearer
    • or HTTP basic
    • or API key in cookie internal_auth_session

Request body

refstring required

the commit to revert, given by a ref

parent_numberinteger required

when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert.

forceboolean
allow_emptyboolean

allow empty commit (revert without changes)

Response

revert successful

Changes

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status