Method | HTTP request |
---|---|
create | POST /v1/datasets/{datasetRid}/branches |
delete | DELETE /v1/datasets/{datasetRid}/branches/{branchId} |
get | GET /v1/datasets/{datasetRid}/branches/{branchId} |
list | GET /v1/datasets/{datasetRid}/branches |
page | GET /v1/datasets/{datasetRid}/branches |
Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-write
.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
branch_id | BranchId | ||
transaction_rid | Optional[TransactionRid] | [optional] |
Branch
from foundry.v1 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# BranchId |
branch_id = "my-branch"
# Optional[TransactionRid] |
transaction_rid = None
try:
api_response = foundry_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.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.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-write
.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
branch_id | BranchId | branchId |
None
from foundry.v1 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# BranchId | branchId
branch_id = "my-branch"
try:
api_response = foundry_client.datasets.Dataset.Branch.delete(
dataset_rid,
branch_id,
)
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 | Branch deleted. | None |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Get a Branch of a Dataset.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-read
.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
branch_id | BranchId | branchId |
Branch
from foundry.v1 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# BranchId | branchId
branch_id = "master"
try:
api_response = foundry_client.datasets.Dataset.Branch.get(
dataset_rid,
branch_id,
)
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.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-read
.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
page_size | Optional[PageSize] | pageSize | [optional] |
ResourceIterator[Branch]
from foundry.v1 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# Optional[PageSize] | pageSize
page_size = None
try:
for branch in foundry_client.datasets.Dataset.Branch.list(
dataset_rid,
page_size=page_size,
):
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.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-read
.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
page_size | Optional[PageSize] | pageSize | [optional] |
page_token | Optional[PageToken] | pageToken | [optional] |
ListBranchesResponse
from foundry.v1 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# 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]