| Method | HTTP request | Release Stage |
|---|---|---|
| create | POST /v1/datasets/{datasetRid}/branches | Stable |
| delete | DELETE /v1/datasets/{datasetRid}/branches/{branchId} | Stable |
| get | GET /v1/datasets/{datasetRid}/branches/{branchId} | Stable |
| list | GET /v1/datasets/{datasetRid}/branches | Stable |
Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch. | |
| branch_id | BranchId | ||
| transaction_rid | Optional[TransactionRid] | [optional] |
Branch
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# BranchId
branch_id = "my-branch"
# Optional[TransactionRid]
transaction_rid = None
try:
api_response = client.datasets.Dataset.Branch.create(
dataset_rid, branch_id=branch_id, transaction_rid=transaction_rid
)
print("The create response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Branch.create: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Branch | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Deletes the Branch with the given BranchId.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. | |
| branch_id | BranchId | The identifier (name) of the Branch. |
None
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# BranchId | The identifier (name) of the Branch.
branch_id = "my-branch"
try:
api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_id)
print("The delete response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Branch.delete: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 204 | None | Branch deleted. | None |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Get a Branch of a Dataset.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. | |
| branch_id | BranchId | The identifier (name) of the Branch. |
Branch
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# BranchId | The identifier (name) of the Branch.
branch_id = "master"
try:
api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_id)
print("The get response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Branch.get: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Branch | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Lists the Branches of a Dataset.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches. | |
| page_size | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See page sizes for details. | [optional] |
| page_token | Optional[PageToken] | [optional] |
ListBranchesResponse
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.
page_size = None
# Optional[PageToken]
page_token = None
try:
for branch in client.datasets.Dataset.Branch.list(
dataset_rid, page_size=page_size, page_token=page_token
):
pprint(branch)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Branch.list: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | ListBranchesResponse | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]