---
title: "Branch"
description: "Create and manage branches in your repository to organize and collaborate on content projects effectively. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/reference/types/branch"
---

# <a id="top"></a>Branch

An Object

1.  [Platform](/documentation/gitana/4.0/reference/types/platform.md)
2.  [Repository](/documentation/gitana/4.0/reference/types/repository.md)
3.  [Branch](/documentation/gitana/4.0/reference/types/branch.md)

##### Table of Contents

- [Overview](#top "Overview")
- [Parent](#parent "Parent")
- [Properties](#properties "Properties")
- [Methods](#methods "Methods")
- [Schema](#schema "Schema")

A branch is a workspace for your content. Each repository supports one or more branches. You basically create all of your content items in a branch. This includes articles, blog posts, new items, documents, Office files, PDFs, etc. You name it. They go into a branch.

You can have as many branches as you want. Each branch is a completely isolated workspace. Thus, you can create your own branch for your own projects. You can work on those projects and when you're happy with it, you can share it with the rest of the team.  
  
Or, you can create a branch and invite a bunch of people to work with you. They're your own workspaces. You can play with them however you want.

## Changesets and Branches

You can think of a branch in the same way as you might think of the tree of a branch. Like that old Maple tree in the backyard when you were a kid. Remember that tree? You used to climb it. Then one day, you fell out of it and now, pretty much, that's all you hear about when you go home for family reunions.  
  
Anyway, yeah, so a branch is like a tree branch. Each tree branch stems from a previous branch. And branches are made up of changesets.  
  
A changeset is a bit like a layer from a transparency. When you write content into a branch, it goes onto a new changeset. Every time you make a change, like when you update something or delete something, it also goes onto a new changeset. And so, in this way, branches grow in length.  
  
Branches also maintain a "tip" view which is the sum total of all changes, creates, updates and deletes that you make while working with the branch. Thus, at all times, the full "changeset history" of everything you've done is maintained but so is a "tip" view that gives you a real-time view of what is effectively a top-most version of all your content.

> **Note:** Drop in one of our language drivers to accelerate your development.  
> Here are links to some of our popular [Cookbooks](/documentation/gitana/4.0/developers/cookbooks/overview.md) to help you get started!
> 
> - [C#](/documentation/gitana/4.0/developers/cookbooks/csharp.md)
> - [Go](/documentation/gitana/4.0/developers/cookbooks/go.md)
> - [Java](/documentation/gitana/4.0/developers/cookbooks/java.md)
> - [JavaScript](/documentation/gitana/4.0/developers/cookbooks/javascript2.md)
> - [PHP](/documentation/gitana/4.0/developers/cookbooks/php.md)
> - [Python](/documentation/gitana/4.0/developers/cookbooks/python.md)
> - [Ruby](/documentation/gitana/4.0/developers/cookbooks/ruby.md)

## <a id="parent"></a>Parent

This Branch is contained within a [Repository](/documentation/gitana/4.0/reference/types/repository.md).

## <a id="properties"></a>Properties

The following properties are available:

| Property | Type | Default | Read-Only | Description |
| --- | --- | --- | --- | --- |
| \_doc | string |  | No | The primary ID |
| \_system | object |  | No | Metadata maintained by the system |

## <a id="methods"></a>Methods

The following methods are available:

- [Add Team Member](#post-repositories-repositoryid-branches-branchid-teams-teamkey-members-add "Add Team Member")
- [Archive Branch](#post-repositories-repositoryid-branches-branchid-archive "Archive Branch")
- [Chain Branches](#get-repositories-repositoryid-branches-chain "Chain Branches")
- [Changeset Diffs](#post-repositories-repositoryid-branches-branchid-diffs-changeset "Changeset Diffs")
- [Check Membership](#post-repositories-repositoryid-branches-branchid-teams-teamkey-members-check "Check Membership")
- [Check Permission](#post-repositories-repositoryid-branches-branchid-permissions-permissionid-check "Check Permission")
- [Check Single Authority](#post-repositories-repositoryid-branches-branchid-authorities-authorityid-check "Check Single Authority")
- [Check multiple Authorities](#post-repositories-repositoryid-branches-authorities-check "Check multiple Authorities")
- [Check multiple Permissions](#post-repositories-repositoryid-branches-permissions-check "Check multiple Permissions")
- [Copyfrom Branche](#post-repositories-repositoryid-branches-branchid-copyfrom "Copyfrom Branche")
- [Count Node](#post-repositories-repositoryid-branches-branchid-diffs-node-count "Count Node")
- [Count Nodeproperty](#post-repositories-repositoryid-branches-branchid-diffs-nodeproperty-count "Count Nodeproperty")
- [Create Branch](#post-repositories-repositoryid-branches "Create Branch")
- [Create Indexe](#post-repositories-repositoryid-branches-branchid-indexes "Create Indexe")
- [Create Snapshot](#post-repositories-repositoryid-snapshots "Create Snapshot")
- [Create a Team](#post-repositories-repositoryid-branches-branchid-teams "Create a Team")
- [Delete Branch](#post-repositories-repositoryid-branches-branchid-delete "Delete Branch")
- [Delete Branch](#delete-repositories-repositoryid-branches-branchid "Delete Branch")
- [Delete Indexe](#post-repositories-repositoryid-branches-branchid-indexes-name-delete "Delete Indexe")
- [Delete Indexe](#delete-repositories-repositoryid-branches-branchid-indexes-name "Delete Indexe")
- [Delete Snapshot](#post-repositories-repositoryid-snapshots-snapshotid-delete "Delete Snapshot")
- [Delete Snapshot](#delete-repositories-repositoryid-snapshots-snapshotid "Delete Snapshot")
- [Deletes a Team](#delete-repositories-repositoryid-branches-branchid-teams-teamkey "Deletes a Team")
- [Export Branch](#post-repositories-repositoryid-branches-branchid-export "Export Branch")
- [Export Changes](#get-repositories-repositoryid-branches-branchid-changes-export "Export Changes")
- [Export Diff](#get-repositories-repositoryid-branches-branchid-diff-export "Export Diff")
- [Find Branch Changes](#post-repositories-repositoryid-branches-branchid-changes-start "Find Branch Changes")
- [Generate Qnames](#post-repositories-repositoryid-branches-branchid-qnames-generate "Generate Qnames")
- [Get Team](#get-repositories-repositoryid-branches-branchid-teams-teamkey "Get Team")
- [Grant Authority](#post-repositories-repositoryid-branches-branchid-authorities-authorityid-grant "Grant Authority")
- [Grant Authority to Team](#post-repositories-repositoryid-branches-branchid-teams-teamkey-authorities-authorityid-grant "Grant Authority to Team")
- [Import Branch](#post-repositories-repositoryid-branches-branchid-import "Import Branch")
- [Index Search](#get-repositories-repositoryid-branches-branchid-search-index "Index Search")
- [Info Deployments](#get-repositories-repositoryid-branches-branchid-deployments-info "Info Deployments")
- [Invalidate Branch Changes](#post-repositories-repositoryid-branches-branchid-changes-invalidate "Invalidate Branch Changes")
- [List Behaviors](#get-repositories-repositoryid-branches-branchid-behaviors "List Behaviors")
- [List Definitions](#get-repositories-repositoryid-branches-branchid-definitions "List Definitions")
- [List Descendants](#get-repositories-repositoryid-branches-branchid-descendants "List Descendants")
- [List Forks](#get-repositories-repositoryid-branches-branchid-forks "List Forks")
- [List Forms](#get-repositories-repositoryid-branches-branchid-forms "List Forms")
- [List Indexes](#get-repositories-repositoryid-branches-branchid-indexes "List Indexes")
- [List Joins](#get-repositories-repositoryid-branches-branchid-joins "List Joins")
- [List Merge Conflict Branches](#get-repositories-repositoryid-branches-branchid-merges "List Merge Conflict Branches")
- [List Policies](#get-repositories-repositoryid-branches-branchid-policies "List Policies")
- [List Properties](#get-repositories-repositoryid-branches-branchid-properties "List Properties")
- [List Pull Sources](#get-repositories-repositoryid-branches-branchid-pull-sources "List Pull Sources")
- [List Schemas](#get-repositories-repositoryid-branches-branchid-schemas "List Schemas")
- [List Snapshots](#get-repositories-repositoryid-snapshots "List Snapshots")
- [List Team Authorities](#get-repositories-repositoryid-branches-branchid-teams-teamkey-authorities "List Team Authorities")
- [List Teams](#get-repositories-repositoryid-branches-branchid-teams "List Teams")
- [List Tree](#get-repositories-repositoryid-branches-branchid-tree-list "List Tree")
- [List Tree](#get-repositories-repositoryid-branches-tree-list "List Tree")
- [Lists Branch](#get-repositories-repositoryid-branches "Lists Branch")
- [Lists Team Members](#get-repositories-repositoryid-branches-branchid-teams-teamkey-members "Lists Team Members")
- [Merge Branch](#post-repositories-repositoryid-branches-branchid-merge "Merge Branch")
- [Network Branches](#post-repositories-repositoryid-branches-network "Network Branches")
- [Nodediffs History](#get-repositories-repositoryid-branches-branchid-history-nodediffs "Nodediffs History")
- [Queries for Branch](#post-repositories-repositoryid-branches-query "Queries for Branch")
- [Query](#post-repositories-repositoryid-branches-branchid-behaviors-query "Query")
- [Query](#post-repositories-repositoryid-deployments-verification-query "Query")
- [Query](#post-repositories-repositoryid-branches-branchid-definitions-query "Query")
- [Read ACL](#get-repositories-repositoryid-branches-branchid-acl-list "Read ACL")
- [Read ACL for Principal](#get-repositories-repositoryid-branches-branchid-acl "Read ACL for Principal")
- [Read Authorities Report](#post-repositories-repositoryid-branches-branchid-authorities "Read Authorities Report")
- [Read Branch](#get-repositories-repositoryid-branches-branchid "Read Branch")
- [Read Children Definition](#get-repositories-repositoryid-branches-branchid-definitions-qname-children "Read Children Definition")
- [Read Conflicting Branche](#get-repositories-repositoryid-branches-branchid-conflicting "Read Conflicting Branche")
- [Read Definition](#get-repositories-repositoryid-branches-branchid-definitions-qname "Read Definition")
- [Read Document](#get-repositories-repositoryid-branches-branchid-search-index-documents-docid "Read Document")
- [Read Info Branche](#get-repositories-repositoryid-branches-branchid-info "Read Info Branche")
- [Read Qname](#get-repositories-repositoryid-branches-branchid-qnames-qname "Read Qname")
- [Read Schema](#get-repositories-repositoryid-branches-branchid-schemas-qname "Read Schema")
- [Read Snapshot](#get-repositories-repositoryid-snapshots-snapshotid "Read Snapshot")
- [Read Tree Branche](#get-repositories-repositoryid-branches-branchid-tree "Read Tree Branche")
- [Rebase Branch](#post-repositories-repositoryid-branches-branchid-rebase-start "Rebase Branch")
- [Remove Team Member](#post-repositories-repositoryid-branches-branchid-teams-teamkey-members-remove "Remove Team Member")
- [Reset Branch](#post-repositories-repositoryid-branches-branchid-reset-start "Reset Branch")
- [Revert Branch](#post-repositories-repositoryid-branches-branchid-revert-start "Revert Branch")
- [Revert Changes](#post-repositories-repositoryid-branches-branchid-changes-revert "Revert Changes")
- [Revoke Authority](#post-repositories-repositoryid-branches-branchid-authorities-authorityid-revoke "Revoke Authority")
- [Revoke Authority from Team](#post-repositories-repositoryid-branches-branchid-teams-teamkey-authorities-authorityid-revoke "Revoke Authority from Team")
- [Start Cherrypick](#post-repositories-repositoryid-branches-branchid-cherrypick-start "Start Cherrypick")
- [Start Copyfrom](#post-repositories-repositoryid-branches-branchid-copyfrom-start "Start Copyfrom")
- [Start Create](#post-repositories-repositoryid-branches-branchid-view-create-start "Start Create")
- [Start Create](#post-repositories-repositoryid-branches-create-start "Start Create")
- [Start Create](#post-repositories-repositoryid-branches-branchid-path-index-create-start "Start Create")
- [Start Create](#post-repositories-repositoryid-branches-branchid-search-index-create-start "Start Create")
- [Start Create](#post-repositories-repositoryid-branches-branchid-embeddings-index-create-start "Start Create")
- [Start Diff](#post-repositories-repositoryid-branches-branchid-diff-start "Start Diff")
- [Start Drop](#post-repositories-repositoryid-branches-branchid-embeddings-index-drop-start "Start Drop")
- [Start Drop](#post-repositories-repositoryid-branches-branchid-search-index-drop-start "Start Drop")
- [Start History](#post-repositories-repositoryid-branches-branchid-history-start "Start History")
- [Start Merge](#post-repositories-repositoryid-branches-branchid-merge-start "Start Merge")
- [Start Recreatefilenames](#post-repositories-repositoryid-branches-branchid-nodes-recreatefilenames-start "Start Recreatefilenames")
- [Start Repair](#post-repositories-repositoryid-branches-branchid-repair-start "Start Repair")
- [Start Snapshots](#post-repositories-repositoryid-snapshots-start "Start Snapshots")
- [Start Validate](#post-repositories-repositoryid-branches-branchid-search-index-validate-start "Start Validate")
- [Start Validate](#post-repositories-repositoryid-branches-branchid-nodes-validate-start "Start Validate")
- [Start Validate](#post-repositories-repositoryid-branches-branchid-path-index-validate-start "Start Validate")
- [Start Verification](#post-repositories-repositoryid-branches-branchid-deployments-verification-start "Start Verification")
- [Stats Diffs](#post-repositories-repositoryid-branches-branchid-diffs-stats "Stats Diffs")
- [Summarize Access Policy](#get-repositories-repositoryid-branches-branchid-teams-teamkey-access-policies-summary "Summarize Access Policy")
- [Tree Branches](#get-repositories-repositoryid-branches-tree "Tree Branches")
- [Unarchive Branch](#post-repositories-repositoryid-branches-branchid-unarchive "Unarchive Branch")
- [Update Branch](#post-repositories-repositoryid-branches-branchid-update "Update Branch")
- [Update Branch](#put-repositories-repositoryid-branches-branchid "Update Branch")
- [Update a Team](#put-repositories-repositoryid-branches-branchid-teams-teamkey "Update a Team")
- [Validate Definition](#post-repositories-repositoryid-branches-branchid-definitions-qname-validate "Validate Definition")

### <a id="post-repositories-repositoryid-branches-branchid-teams-teamkey-members-add"></a>Add Team Member

Adds a principal as a member of a Team against the given branch

POST /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/members/add

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |
| id | true | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-archive"></a>Archive Branch

Archives this branch, tearing down its runtime tip view to free up MongoDB and ElasticSearch resources. No data is lost.

POST /repositories/{repositoryId}/branches/{branchId}/archive

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

You can't create, read, update, query or search content in an archived branch until you unarchive it.

### <a id="get-repositories-repositoryid-branches-chain"></a>Chain Branches

GET /repositories/{repositoryId}/branches/chain

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |

### <a id="post-repositories-repositoryid-branches-branchid-diffs-changeset"></a>Changeset Diffs

POST /repositories/{repositoryId}/branches/{branchId}/diffs/changeset

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-teams-teamkey-members-check"></a>Check Membership

Checks whether a principal belongs to a Team for the given branch

POST /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/members/check

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |
| id | true | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Belongs",
  "extends": "status",
  "properties": {
    "belongs": {
      "type": "boolean"
    },
    "ok": null
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-permissions-permissionid-check"></a>Check Permission

Checks whether one or more authorities against the specified branch are granted for a given set of users

POST /repositories/{repositoryId}/branches/{branchId}/permissions/{permissionId}/check

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| permissionId | true | string | The ID of the permission |
| id | true | string |  |

#### Response

```json
{
  "$ref": "#/components/schemas/checkPermission"
}
```

### <a id="post-repositories-repositoryid-branches-branchid-authorities-authorityid-check"></a>Check Single Authority

Checks whether a single authority is granted against the specified branch for the given user

POST /repositories/{repositoryId}/branches/{branchId}/authorities/{authorityId}/check

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| authorityId | true | string | The ID or authority key for the authority |
| id | true | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Check",
  "extends": "status",
  "properties": {
    "check": {
      "type": "boolean"
    },
    "ok": null
  }
}
```

### <a id="post-repositories-repositoryid-branches-authorities-check"></a>Check multiple Authorities

Checks whether one or more authorities against the specified branch are granted for a given set of users

POST /repositories/{repositoryId}/branches/authorities/check

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |

#### Response

```json
{
  "type": "object",
  "description": "Check Multiple Authorities Out",
  "properties": {
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "permissionedId": {
            "type": "string"
          },
          "principalId": {
            "type": "string"
          },
          "authorityId": {
            "type": "string"
          },
          "result": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-permissions-check"></a>Check multiple Permissions

Checks whether one or more permissions against the specified branch are granted for a given set of users

POST /repositories/{repositoryId}/branches/permissions/check

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |

#### Response

```json
{
  "type": "object",
  "description": "Check Multiple Permissions Out",
  "properties": {
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "permissionedId": {
            "type": "string"
          },
          "principalId": {
            "type": "string"
          },
          "permissionId": {
            "type": "string"
          },
          "result": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-copyfrom"></a>Copyfrom Branche

POST /repositories/{repositoryId}/branches/{branchId}/copyfrom

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-diffs-node-count"></a>Count Node

POST /repositories/{repositoryId}/branches/{branchId}/diffs/node/count

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-diffs-nodeproperty-count"></a>Count Nodeproperty

POST /repositories/{repositoryId}/branches/{branchId}/diffs/nodeproperty/count

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches"></a>Create Branch

Creates a new Branch

POST /repositories/{repositoryId}/branches

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| changeset | true | string | The ID of the changeset to fork the new branch from |
| branch | false | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-indexes"></a>Create Indexe

POST /repositories/{repositoryId}/branches/{branchId}/indexes

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-snapshots"></a>Create Snapshot

POST /repositories/{repositoryId}/snapshots

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| changeset | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-teams"></a>Create a Team

Creates a Team against the given branch

POST /repositories/{repositoryId}/branches/{branchId}/teams

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "extends": "document",
  "description": "Team",
  "properties": {
    "teamableObjectTypeId": {
      "type": "string",
      "readonly": true
    },
    "teamableObjectId": {
      "type": "string",
      "readonly": true
    },
    "key": {
      "type": "string"
    },
    "groupId": {
      "type": "string"
    },
    "groupDomainId": {
      "type": "string"
    },
    "roleKeys": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "_doc": null,
    "_system": null
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-delete"></a>Delete Branch

Deletes an existing Branch

POST /repositories/{repositoryId}/branches/{branchId}/delete

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="delete-repositories-repositoryid-branches-branchid"></a>Delete Branch

Deletes an existing Branch

DELETE /repositories/{repositoryId}/branches/{branchId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-indexes-name-delete"></a>Delete Indexe

POST /repositories/{repositoryId}/branches/{branchId}/indexes/{name}/delete

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| name | true | string |  |

### <a id="delete-repositories-repositoryid-branches-branchid-indexes-name"></a>Delete Indexe

DELETE /repositories/{repositoryId}/branches/{branchId}/indexes/{name}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| name | true | string |  |

### <a id="post-repositories-repositoryid-snapshots-snapshotid-delete"></a>Delete Snapshot

POST /repositories/{repositoryId}/snapshots/{snapshotId}/delete

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| snapshotId | true | string |  |

### <a id="delete-repositories-repositoryid-snapshots-snapshotid"></a>Delete Snapshot

DELETE /repositories/{repositoryId}/snapshots/{snapshotId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| snapshotId | true | string |  |

### <a id="delete-repositories-repositoryid-branches-branchid-teams-teamkey"></a>Deletes a Team

Deletes a Team against the given branch

DELETE /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-export"></a>Export Branch

Starts an export job for this resource

POST /repositories/{repositoryId}/branches/{branchId}/export

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| groupId | false | string | The Group ID to be assigned to the exported archive |
| artifactId | false | string | The Artifact ID to be assigned to the exported archive |
| versionId | false | string | The Version ID to be assigned to the exported archive |
| vaultId | false | string | The ID of the vault where the exported archive should be saved |
| schedule | false | string | Whether to run the job immediately or in the background (either 'synchronous' or 'asynchronous') |

#### Response

```json
{
  "type": "object",
  "description": "Export Configuration",
  "properties": {
    "startDate": {
      "type": "object",
      "description": "Only include objects whose modification date is after this time (epoch millis). This is used for partial or rolling exports."
    },
    "endDate": {
      "type": "object",
      "description": "Only include objects whose modification date is before this time (epoch millis). This is used for partial or rolling exports."
    },
    "startChangeset": {
      "type": "string",
      "description": "Only include data that is relevant to changesets at or beyond the specified changeset."
    },
    "endChangeset": {
      "type": "string",
      "description": "Only include data that is relevant to changesets at or before the specified changeset."
    },
    "includeACLs": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include ACLs during export."
    },
    "includeTeams": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Teams during export."
    },
    "includeActivities": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Activities during export."
    },
    "includeBinaries": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Binaries for data stores during export."
    },
    "includeAttachments": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Attachments for Attachables during export."
    },
    "artifactDependencies": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "artifactIncludes": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "forceIncludes": {
      "type": "boolean"
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-changes-export"></a>Export Changes

GET /repositories/{repositoryId}/branches/{branchId}/changes/export

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |
| view | false | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-diff-export"></a>Export Diff

GET /repositories/{repositoryId}/branches/{branchId}/diff/export

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-changes-start"></a>Find Branch Changes

Starts a job to find all the changes made in one branch that would be applied during a merge. The source branch is specified using the 'id' parameter. The target branch is the branch identified by the resource path. A view can be applied using the 'view' parameter (valid value is 'editorial').

POST /repositories/{repositoryId}/branches/{branchId}/changes/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string | The ID of the source branch. The target branch is the branch identified by the resource path. |
| view | false | string | A view to apply. The valid value is `editorial`. |
| filter | false | string |  |
| source | false | string |  |
| target | false | string |  |
| force | false | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-qnames-generate"></a>Generate Qnames

POST /repositories/{repositoryId}/branches/{branchId}/qnames/generate

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-teams-teamkey"></a>Get Team

Retrieves a Team against the given branch

GET /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |

#### Response

```json
{
  "type": "object",
  "extends": "document",
  "description": "Team",
  "properties": {
    "teamableObjectTypeId": {
      "type": "string",
      "readonly": true
    },
    "teamableObjectId": {
      "type": "string",
      "readonly": true
    },
    "key": {
      "type": "string"
    },
    "groupId": {
      "type": "string"
    },
    "groupDomainId": {
      "type": "string"
    },
    "roleKeys": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "_doc": null,
    "_system": null
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-authorities-authorityid-grant"></a>Grant Authority

Grants an authority against the specified branch to a given user

POST /repositories/{repositoryId}/branches/{branchId}/authorities/{authorityId}/grant

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| authorityId | true | string | The ID or authority key for the authority |
| id | true | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-teams-teamkey-authorities-authorityid-grant"></a>Grant Authority to Team

Assigns an Authority to a Team for the given branch

POST /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/authorities/{authorityId}/grant

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |
| authorityId | true | string | The ID or authority key for the authority |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-import"></a>Import Branch

Starts an import job for this resource

POST /repositories/{repositoryId}/branches/{branchId}/import

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| groupId | false | string | The Group ID to be assigned to the exported archive |
| artifactId | false | string | The Artifact ID to be assigned to the exported archive |
| versionId | false | string | The Version ID to be assigned to the exported archive |
| vaultId | false | string | The ID of the vault where the exported archive should be saved |
| schedule | false | string | Whether to run the job immediately or in the background (either 'synchronous' or 'asynchronous') |

#### Response

```json
{
  "type": "object",
  "description": "Import Configuration",
  "properties": {
    "includeACLs": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include ACLs during import."
    },
    "includeTeams": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Teams during import."
    },
    "includeActivities": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Activities during import."
    },
    "includeBinaries": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Binaries for data stores during import."
    },
    "includeAttachments": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Attachments for Attachables during import."
    },
    "strategy": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": "CLONE",
      "description": "Either CLONE or COPY_EVERYTHING. Use CLONE to keep the same IDs on import. Use COPY_EVERYTHING to generate all new IDs for all entries on every import."
    },
    "substitutions": {
      "type": "string"
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-search-index"></a>Index Search

GET /repositories/{repositoryId}/branches/{branchId}/search/index

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-deployments-info"></a>Info Deployments

GET /repositories/{repositoryId}/branches/{branchId}/deployments/info

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| state | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-changes-invalidate"></a>Invalidate Branch Changes

Invalidates any branch changes for the given branch

POST /repositories/{repositoryId}/branches/{branchId}/changes/invalidate

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-behaviors"></a>List Behaviors

GET /repositories/{repositoryId}/branches/{branchId}/behaviors

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-definitions"></a>List Definitions

GET /repositories/{repositoryId}/branches/{branchId}/definitions

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-descendants"></a>List Descendants

GET /repositories/{repositoryId}/branches/{branchId}/descendants

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-forks"></a>List Forks

GET /repositories/{repositoryId}/branches/{branchId}/forks

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-forms"></a>List Forms

GET /repositories/{repositoryId}/branches/{branchId}/forms

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-indexes"></a>List Indexes

GET /repositories/{repositoryId}/branches/{branchId}/indexes

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-joins"></a>List Joins

GET /repositories/{repositoryId}/branches/{branchId}/joins

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-merges"></a>List Merge Conflict Branches

Gets the branches with which this branch has merge conflicts.

GET /repositories/{repositoryId}/branches/{branchId}/merges

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| mergeType | false | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-policies"></a>List Policies

GET /repositories/{repositoryId}/branches/{branchId}/policies

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| containerOnly | false | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-properties"></a>List Properties

GET /repositories/{repositoryId}/branches/{branchId}/properties

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| excludeSystem | true | boolean |  |

### <a id="get-repositories-repositoryid-branches-branchid-pull-sources"></a>List Pull Sources

Finds the other branches from which a branch can safely pull from

GET /repositories/{repositoryId}/branches/{branchId}/pull/sources

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| all | false | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-schemas"></a>List Schemas

GET /repositories/{repositoryId}/branches/{branchId}/schemas

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-snapshots"></a>List Snapshots

GET /repositories/{repositoryId}/snapshots

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |

### <a id="get-repositories-repositoryid-branches-branchid-teams-teamkey-authorities"></a>List Team Authorities

Retrieves a list of the authorities defined to be granted by a Team

GET /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/authorities

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |

#### Response

```json
{
  "type": "object",
  "description": "List of Authorities",
  "properties": {
    "authorities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-teams"></a>List Teams

Lists the Teams against the given branch

GET /repositories/{repositoryId}/branches/{branchId}/teams

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-tree-list"></a>List Tree

GET /repositories/{repositoryId}/branches/{branchId}/tree/list

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| mode | false | string |  |
| archived | true | string |  |
| snapshots | true | string |  |
| releases | true | string |  |
| editorial | true | string |  |
| active | true | string |  |
| inactive | true | string |  |
| temporary | true | string |  |

### <a id="get-repositories-repositoryid-branches-tree-list"></a>List Tree

GET /repositories/{repositoryId}/branches/tree/list

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| snapshot | true | string |  |
| archived | true | string |  |
| temporary | true | string |  |

### <a id="get-repositories-repositoryid-branches"></a>Lists Branch

Retrieves a list of Branch instances

GET /repositories/{repositoryId}/branches

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| sort | false | object | Defines how to sort fields in the result set |
| skip | false | number | Skips the result set cursor ahead the specified number of records |
| limit | false | number | Specifies the number of records to be handed back in the result set |

This method supports pagination.

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_branch"
      }
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-teams-teamkey-members"></a>Lists Team Members

Lists the members of a Team against the given branch

GET /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/members

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-merge"></a>Merge Branch

Merges a source branch into a target branch. The source branch is specified using the 'id' parameter. The target branch is the branch identified by the resource path.

POST /repositories/{repositoryId}/branches/{branchId}/merge

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string | The ID of the source branch. The target branch is the branch identified by the resource path. |

### <a id="post-repositories-repositoryid-branches-network"></a>Network Branches

POST /repositories/{repositoryId}/branches/network

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| workspace | true | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-history-nodediffs"></a>Nodediffs History

GET /repositories/{repositoryId}/branches/{branchId}/history/nodediffs

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| root | false | string |  |
| tip | false | string |  |
| include\_root | false | string |  |

### <a id="post-repositories-repositoryid-branches-query"></a>Queries for Branch

Queries for instances of type Branch

POST /repositories/{repositoryId}/branches/query

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| sort | false | object | Defines how to sort fields in the result set |
| skip | false | number | Skips the result set cursor ahead the specified number of records |
| limit | false | number | Specifies the number of records to be handed back in the result set |

This method supports pagination.

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_branch"
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-behaviors-query"></a>Query

Queries for matches

POST /repositories/{repositoryId}/branches/{branchId}/behaviors/query

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| sort | false | object | Defines how to sort fields in the result set |
| skip | false | number | Skips the result set cursor ahead the specified number of records |
| limit | false | number | Specifies the number of records to be handed back in the result set |

This method supports pagination.

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap"
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-deployments-verification-query"></a>Query

Queries for matches

POST /repositories/{repositoryId}/deployments/verification/query

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| sort | false | object | Defines how to sort fields in the result set |
| skip | false | number | Skips the result set cursor ahead the specified number of records |
| limit | false | number | Specifies the number of records to be handed back in the result set |

This method supports pagination.

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap"
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-definitions-query"></a>Query

Queries for matches

POST /repositories/{repositoryId}/branches/{branchId}/definitions/query

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| sort | false | object | Defines how to sort fields in the result set |
| skip | false | number | Skips the result set cursor ahead the specified number of records |
| limit | false | number | Specifies the number of records to be handed back in the result set |

This method supports pagination.

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap"
      }
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-acl-list"></a>Read ACL

Read the Access Control List for the specified branch

GET /repositories/{repositoryId}/branches/{branchId}/acl/list

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "description": "Result Map of ACL entries",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "_doc": {
            "type": "string",
            "title": "Principal ID"
          },
          "name": {
            "type": "string",
            "title": "Principal Name"
          },
          "type": {
            "type": "string",
            "title": "Principal Type"
          },
          "domainId": {
            "type": "string"
          },
          "domainQualifiedId": {
            "type": "string"
          },
          "domainQualifiedName": {
            "type": "string"
          },
          "principalId": {
            "type": "string",
            "title": "Principal ID"
          },
          "userEmail": {
            "type": "string"
          },
          "userFirstName": {
            "type": "string"
          },
          "userLastName": {
            "type": "string"
          },
          "authorities": {
            "type": "array",
            "title": "Authorities",
            "items": {
              "type": "string",
              "title": "Authority Key"
            }
          }
        }
      }
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-acl"></a>Read ACL for Principal

Read the Access Control List for the specified branch and the given principal

GET /repositories/{repositoryId}/branches/{branchId}/acl

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Result Map of Authority Keys",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Authority Key"
      }
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-authorities"></a>Read Authorities Report

Read the Authorities Report for the specified branch

POST /repositories/{repositoryId}/branches/{branchId}/authorities

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "description": "Authority Report",
  "properties": {
    "principalId": {
      "type": "object",
      "properties": {
        "id": {
          "type": "object",
          "properties": {
            "role-key": {
              "type": "string"
            },
            "principal": {
              "type": "string"
            },
            "permissioned": {
              "type": "string"
            },
            "inheritsFrom": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "principal": {
                  "type": "string"
                },
                "permissioned": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid"></a>Read Branch

Reads an instance of a Branch

GET /repositories/{repositoryId}/branches/{branchId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "extends": "document",
  "description": "Branch",
  "container": "repository",
  "properties": {
    "_doc": null,
    "_system": null
  }
}
```

### <a id="get-repositories-repositoryid-branches-branchid-definitions-qname-children"></a>Read Children Definition

GET /repositories/{repositoryId}/branches/{branchId}/definitions/{qname}/children

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| qname | true | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-conflicting"></a>Read Conflicting Branche

GET /repositories/{repositoryId}/branches/{branchId}/conflicting

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-definitions-qname"></a>Read Definition

GET /repositories/{repositoryId}/branches/{branchId}/definitions/{qname}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| qname | true | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-search-index-documents-docid"></a>Read Document

GET /repositories/{repositoryId}/branches/{branchId}/search/index/documents/{docId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| docId | true | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-info"></a>Read Info Branche

GET /repositories/{repositoryId}/branches/{branchId}/info

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-qnames-qname"></a>Read Qname

GET /repositories/{repositoryId}/branches/{branchId}/qnames/{qname}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| qname | true | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-schemas-qname"></a>Read Schema

GET /repositories/{repositoryId}/branches/{branchId}/schemas/{qname}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| qname | true | string |  |

### <a id="get-repositories-repositoryid-snapshots-snapshotid"></a>Read Snapshot

GET /repositories/{repositoryId}/snapshots/{snapshotId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| snapshotId | true | string |  |

### <a id="get-repositories-repositoryid-branches-branchid-tree"></a>Read Tree Branche

GET /repositories/{repositoryId}/branches/{branchId}/tree

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| mode | false | string |  |
| archived | true | string |  |
| snapshots | true | string |  |
| releases | true | string |  |
| editorial | true | string |  |
| active | true | string |  |
| inactive | true | string |  |
| temporary | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-rebase-start"></a>Rebase Branch

Rebases the branch to a different root changeset.

POST /repositories/{repositoryId}/branches/{branchId}/rebase/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-teams-teamkey-members-remove"></a>Remove Team Member

Remove a principal from a team's membership list

POST /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/members/remove

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |
| id | true | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-reset-start"></a>Reset Branch

Resets the branch to a given prior changeset. This moves the branch head back to the given changeset and deletes the changesets that would otherwise now be dangling. The prior changeset must exist on the branch.

POST /repositories/{repositoryId}/branches/{branchId}/reset/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-revert-start"></a>Revert Branch

Reverts the branch to a given prior changeset. This creates a new changeset whose contents restore the state from a previous changeset. The delta between the prior changeset and the tip is calculated and content operations are performed to effectively restore the prior tip state. The prior changeset must exist on the branch.

POST /repositories/{repositoryId}/branches/{branchId}/revert/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-changes-revert"></a>Revert Changes

POST /repositories/{repositoryId}/branches/{branchId}/changes/revert

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-authorities-authorityid-revoke"></a>Revoke Authority

Revokes an authority against the specified branch from a given user

POST /repositories/{repositoryId}/branches/{branchId}/authorities/{authorityId}/revoke

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| authorityId | true | string | The ID or authority key for the authority |
| id | true | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-teams-teamkey-authorities-authorityid-revoke"></a>Revoke Authority from Team

Revokes an Authority from a Team for the given branch

POST /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/authorities/{authorityId}/revoke

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |
| authorityId | true | string | The ID or authority key for the authority |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-cherrypick-start"></a>Start Cherrypick

POST /repositories/{repositoryId}/branches/{branchId}/cherrypick/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-copyfrom-start"></a>Start Copyfrom

POST /repositories/{repositoryId}/branches/{branchId}/copyfrom/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-view-create-start"></a>Start Create

POST /repositories/{repositoryId}/branches/{branchId}/view/create/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-create-start"></a>Start Create

POST /repositories/{repositoryId}/branches/create/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branch | true | string |  |
| changeset | false | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-path-index-create-start"></a>Start Create

POST /repositories/{repositoryId}/branches/{branchId}/path/index/create/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-search-index-create-start"></a>Start Create

POST /repositories/{repositoryId}/branches/{branchId}/search/index/create/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-embeddings-index-create-start"></a>Start Create

POST /repositories/{repositoryId}/branches/{branchId}/embeddings/index/create/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-diff-start"></a>Start Diff

Starts the diff-ing of a source and target branch. The source branch is specified using the 'id' parameter. The target branch is the branch identified by the resource path.

POST /repositories/{repositoryId}/branches/{branchId}/diff/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string | The ID of the source branch. The target branch is the branch identified by the resource path. |

### <a id="post-repositories-repositoryid-branches-branchid-embeddings-index-drop-start"></a>Start Drop

POST /repositories/{repositoryId}/branches/{branchId}/embeddings/index/drop/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-search-index-drop-start"></a>Start Drop

POST /repositories/{repositoryId}/branches/{branchId}/search/index/drop/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-history-start"></a>Start History

POST /repositories/{repositoryId}/branches/{branchId}/history/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| root | false | string |  |
| tip | false | string |  |
| include\_root | false | string |  |
| view | false | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-merge-start"></a>Start Merge

Starts the merging of a source branch into a target branch. The source branch is specified using the 'id' parameter. The target branch is the branch identified by the resource path.

POST /repositories/{repositoryId}/branches/{branchId}/merge/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| id | true | string | The ID of the source branch. The target branch is the branch identified by the resource path. |
| dryRun | false | boolean |  |

The merge runs as a background job. The response holds the job ID (`_doc`); poll the job to see when it completes and how the merge went.

### <a id="post-repositories-repositoryid-branches-branchid-nodes-recreatefilenames-start"></a>Start Recreatefilenames

POST /repositories/{repositoryId}/branches/{branchId}/nodes/recreatefilenames/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-repair-start"></a>Start Repair

POST /repositories/{repositoryId}/branches/{branchId}/repair/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| commit | false | string |  |

### <a id="post-repositories-repositoryid-snapshots-start"></a>Start Snapshots

POST /repositories/{repositoryId}/snapshots/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| changeset | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-search-index-validate-start"></a>Start Validate

POST /repositories/{repositoryId}/branches/{branchId}/search/index/validate/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| repair | false | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-nodes-validate-start"></a>Start Validate

POST /repositories/{repositoryId}/branches/{branchId}/nodes/validate/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-path-index-validate-start"></a>Start Validate

POST /repositories/{repositoryId}/branches/{branchId}/path/index/validate/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| repair | false | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-deployments-verification-start"></a>Start Verification

POST /repositories/{repositoryId}/branches/{branchId}/deployments/verification/start

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| state | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-diffs-stats"></a>Stats Diffs

POST /repositories/{repositoryId}/branches/{branchId}/diffs/stats

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="get-repositories-repositoryid-branches-branchid-teams-teamkey-access-policies-summary"></a>Summarize Access Policy

Retrieves an access policy summary for a Team on the given branch

GET /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}/access/policies/summary

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |
| scope | false | string |  |
| info | false | string |  |
| order | false | string |  |

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
```

### <a id="get-repositories-repositoryid-branches-tree"></a>Tree Branches

GET /repositories/{repositoryId}/branches/tree

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| snapshot | true | string |  |
| archived | true | string |  |
| temporary | true | string |  |

### <a id="post-repositories-repositoryid-branches-branchid-unarchive"></a>Unarchive Branch

Restores the runtime tip view of an archived branch, so that its content can be worked with again

POST /repositories/{repositoryId}/branches/{branchId}/unarchive

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

### <a id="post-repositories-repositoryid-branches-branchid-update"></a>Update Branch

Updates an existing Branch

POST /repositories/{repositoryId}/branches/{branchId}/update

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="put-repositories-repositoryid-branches-branchid"></a>Update Branch

Updates an existing Branch

PUT /repositories/{repositoryId}/branches/{branchId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="put-repositories-repositoryid-branches-branchid-teams-teamkey"></a>Update a Team

Updates a Team against the given branch

PUT /repositories/{repositoryId}/branches/{branchId}/teams/{teamKey}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| teamKey | true | string | The key identifier for the team |

#### Response

```json
{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}
```

### <a id="post-repositories-repositoryid-branches-branchid-definitions-qname-validate"></a>Validate Definition

POST /repositories/{repositoryId}/branches/{branchId}/definitions/{qname}/validate

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| repositoryId | true | string | The ID of the repository |
| branchId | true | string | The ID of the branch |
| qname | true | string |  |

## <a id="schema"></a>Schema

```json

{
  "type": "object",
  "extends": "document",
  "description": "Branch",
  "container": "repository",
  "properties": {
    "_doc": null,
    "_system": null
  },
  "id": "branch"
}
```
