---
title: "Get a previous revision of a snippet"
method: GET
path: "/snippets/{workspace}/{encoded_id}/{node_id}"
tags: ["Snippets"]
---

# Get a previous revision of a snippet

`GET /snippets/{workspace}/{encoded_id}/{node_id}`

Identical to `GET /snippets/encoded_id`, except that this endpoint
can be used to retrieve the contents of the snippet as it was at an
older revision, while `/snippets/encoded_id` always returns the
snippet's current revision.

Note that only the snippet's file contents are versioned, not its
meta data properties like the title.

Other than that, the two endpoints are identical in behavior.

## Response `200`

The snippet object.

- Snippet — A snippet object.
  - `type` string, required
  - `id` integer
  - `title` string
  - `scm` 'git' — The DVCS used to store the snippet.
  - `created_on` string, date-time
  - `updated_on` string, date-time
  - `owner` Account — An account object.
    - `type` string, required
    - `links` AccountLinks — Links related to an Account.
      - `avatar` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
    - `created_on` string, date-time
    - `display_name` string
    - `uuid` string
  - `creator` Account — An account object.
    - `type` string, required
    - `links` AccountLinks — Links related to an Account.
      - `avatar` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
    - `created_on` string, date-time
    - `display_name` string
    - `uuid` string
  - `is_private` boolean

## Other responses

- `401` — If the snippet is private and the request was not authenticated.
- `403` — If authenticated user does not have access to the private snippet.
- `404` — If the snippet, or the revision does not exist.

---

[API](https://skmtc.net/bitbucket/apis/bitbucket-api.md) · [All operations](https://skmtc.net/bitbucket/apis/bitbucket-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitbucket/bitbucket-api/versions/4ec8bd2515c5/schema)
