Method | HTTP request |
---|---|
create | POST /v2/datasets/{datasetRid}/branches |
delete | DELETE /v2/datasets/{datasetRid}/branches/{branchName} |
get | GET /v2/datasets/{datasetRid}/branches/{branchName} |
list | GET /v2/datasets/{datasetRid}/branches |
page | GET /v2/datasets/{datasetRid}/branches |
Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
name | BranchName | ||
transaction_rid | Optional[TransactionRid] | [optional] |
Branch
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = None
# BranchName |
name = "master"
# Optional[TransactionRid] |
transaction_rid = "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4"
try:
api_response = foundry_client.datasets.Dataset.Branch.create(
dataset_rid,
name=name,
transaction_rid=transaction_rid,
)
print("The create response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Branch.create: %s\n" % e)
See README
Status Code | Type | Description | Content Type |
---|---|---|---|
200 | Branch | The created Branch | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Deletes the Branch with the given BranchName.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
branch_name | BranchName | branchName |
None
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = None
# BranchName | branchName
branch_name = None
try:
api_response = foundry_client.datasets.Dataset.Branch.delete(
dataset_rid,
branch_name,
)
print("The delete response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Branch.delete: %s\n" % e)
See README
Status Code | Type | Description | Content Type |
---|---|---|---|
204 | None | 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 | datasetRid | |
branch_name | BranchName | branchName |
Branch
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = None
# BranchName | branchName
branch_name = None
try:
api_response = foundry_client.datasets.Dataset.Branch.get(
dataset_rid,
branch_name,
)
print("The get response:\n")
pprint(api_response)
except foundry.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 | datasetRid | |
page_size | Optional[PageSize] | pageSize | [optional] |
page_token | Optional[PageToken] | pageToken | [optional] |
ResourceIterator[Branch]
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = None
# Optional[PageSize] | pageSize
page_size = None
# Optional[PageToken] | pageToken
page_token = None
try:
for branch in foundry_client.datasets.Dataset.Branch.list(
dataset_rid,
page_size=page_size,
page_token=page_token,
):
pprint(branch)
except foundry.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]
Lists the Branches of a Dataset.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
page_size | Optional[PageSize] | pageSize | [optional] |
page_token | Optional[PageToken] | pageToken | [optional] |
ListBranchesResponse
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = None
# Optional[PageSize] | pageSize
page_size = None
# Optional[PageToken] | pageToken
page_token = None
try:
api_response = foundry_client.datasets.Dataset.Branch.page(
dataset_rid,
page_size=page_size,
page_token=page_token,
)
print("The page response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Branch.page: %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]