---
title: "refresh snapshot"
method: POST
path: "/branch/{workspace_id}/snapshot/{snapshot_branch_name}"
tags: ["Branch"]
---

# refresh snapshot

`POST /branch/{workspace_id}/snapshot/{snapshot_branch_name}`

Refresh a snapshot branch from its source

## Path parameters

- `workspace_id` string, required
- `snapshot_branch_name` string, required

## Response `200`

The updated snapshot branch

- Branch — A test branch
  - `id` string — Unique ID for this branch
  - `branch_type` 'feature' | 'snapshot' — The type of branch
  - `name` string — The name of the branch. Must be unique within workspace.
  - `status` 'merged' | 'open' | 'snapshot' — The current status of the branch
  - `application_id` string — The ID of the application associated with this branch
  - `environment_id` string — Optional id of environment this branch is associated with, if any
  - `source_control` SourceControl
    - `revision` string — the primary source revision associated with this object
    - `revisions` string[] — all source revision ids associated with this object
    - `commit_username` string — the username of the user who committed the revision associated with this object
    - `branch_name` string — the branch associated with this object
    - `branches` SourceControlBranch[] — Related branches
      - `name` string, required — repository unique branch name
      - `html_url` string, required — HTML page url to view branch tree
    - `pull_request` SourceControlPullRequest — the pull request associated with this object
      - `id` string — vendor unique pull request identifier (immutable)
      - `number` integer — the number associated with the pull request (repository unique)
      - `title` string — the title of the pull request
      - `html_url` string — HTML page url to view pull request object
    - `pull_requests` SourceControlPullRequest[] — Related pull requests
      - `id` string — vendor unique pull request identifier (immutable)
      - `number` integer — the number associated with the pull request (repository unique)
      - `title` string — the title of the pull request
      - `html_url` string — HTML page url to view pull request object
    - `authors` SourceControlAuthor[] — Related authors. Should be at least one
      - `id` string, required — vendor unique author id (invariant)
      - `user_name` string, required — author username name (mutable)
      - `name` string — author full name (mutable)
      - `email` string — author email
      - `html_url` string, required — HTML page url to view author
      - `avatar_url` string, required — author avatar image URL
      - `user_type` string — repository name unique within owner scope
    - `repository_url` string — the url of the repository associated with this object
    - `repository_name` string — the name of the repository associated with this object
    - `repository` SourceControlRepository — the SCM repository associated with this object
      - `id` string, required — vendor unique repository id (immutable)
      - `name` string, required — repository name unique within owner scope
      - `full_name` string — vendor unique name to identify this repo across all vendor's repos
      - `owner_name` string, required — repository name unique within owner scope
      - `owner` SourceControlRepositoryOwner — the SCM repository associated with this object
        - `id` string, required — vendor unique repository id (immutable)
        - `name` string, required — repository name unique within owner scope
        - `owner_type` string, required — repository name unique within owner scope
        - `html_url` string, required — HTML page url to view branch tree
        - `avatar_url` string — owner avatar image URL
      - `html_url` string, required — HTML page url to view branch tree
      - `is_public` boolean — true if repository publicly visible
      - `checkout_url` string — SCM remote checkout path
  - `entities` BranchedEntity[] — List of branched entities and the initial version they were branched off of
    - `id` string, required — The unversioned id
    - `type` 'test' | 'flow', required — The type of the branched entitiy
    - `versions` integer[], required — The list of version ids saved to branch
    - `branched_from` integer — DEPRECATED - The version id branched from
  - `journeys` VersionedTestId[] — (deprecated use entities instead) List of branched journeys and the initial version they were branched off of
    - `journey_id` string — The unversioned test id
    - `version` integer — The test version
  - `flows` VersionedFlowId[] — (deprecated use entities instead) List of branched flows and the initial version they were branched off of
    - `flow_id` string — The unversioned flow id
    - `version` integer — The flow version
  - `branched_from` string — The branch this branch was created from
  - `merge_info` BranchMergeInfo — Information about a merged branch
    - `merged_time` integer — Time at which the branch was merged
    - `merged_by_id` string — The ID of the user who merged this branch
    - `merged_to` string — The branch this was merged into
    - `entities` MergedEntity[] — List of merged entities and the versions merged
      - `id` string, required — The unversioned id
      - `type` 'test' | 'flow', required — The type of the merged entity
      - `source_version` integer, required — The entity version on the source branch prior to the merge
      - `target_version` integer — The entity version on the target branch prior to the merge, if applicable
      - `version` integer, required — The merged entity version on the target branch after the merge
  - `workspace_id` string — Workspace this branch exists in
  - `created_time` integer — Time at which the deployment was created
  - `created_by_id` string — The ID of the user who created this deployment

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Unknown error
- `default` — Unknown error

---

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