GET /snippets/{workspace}/{encoded_id}/{revision}/patch

Returns the patch of the specified commit against its first parent.

Note that this resource is different in functionality from the diff resource.

The differences between a diff and a patch are:

Note that the character encoding of the contents of the patch is unspecified as Git does not track this, making it hard for Bitbucket to reliably determine this.

Servers

Path parameters

Name Type Required Description
revision String Yes

A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like staging..production.

encoded_id String Yes

The snippet id.

workspace String Yes

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.