| Method | HTTP request | Release Stage |
|---|---|---|
| children | GET /v2/filesystem/folders/{folderRid}/children | Public Beta |
| create | POST /v2/filesystem/folders | Public Beta |
| get | GET /v2/filesystem/folders/{folderRid} | Public Beta |
| get_batch | POST /v2/filesystem/folders/getBatch | Public Beta |
List all child Resources of the Folder.
This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is provided, this page size will also be used as the default.
| Name | Type | Description | Notes |
|---|---|---|---|
| folder_rid | FolderRid | ||
| page_size | Optional[PageSize] | The page size to use for the endpoint. | [optional] |
| page_token | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and use it to populate the pageToken field of the next request. |
[optional] |
| preview | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
ListChildrenOfFolderResponse
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# FolderRid
folder_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8"
# Optional[PageSize] | The page size to use for the endpoint.
page_size = None
# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.
page_token = None
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None
try:
for folder in client.filesystem.Folder.children(
folder_rid, page_size=page_size, page_token=page_token, preview=preview
):
pprint(folder)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Folder.children: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | ListChildrenOfFolderResponse | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Creates a new Folder.
| Name | Type | Description | Notes |
|---|---|---|---|
| display_name | ResourceDisplayName | ||
| parent_folder_rid | FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (ri.compass.main.folder.0). |
|
| preview | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
Folder
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# ResourceDisplayName
display_name = "My Folder"
# FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`).
parent_folder_rid = "ri.compass.main.folder.4cae7c13-b59f-48f6-9ef2-dbde603e4e33"
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None
try:
api_response = client.filesystem.Folder.create(
display_name=display_name, parent_folder_rid=parent_folder_rid, preview=preview
)
print("The create response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Folder.create: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Folder | The created Folder | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Get the Folder with the specified rid.
| Name | Type | Description | Notes |
|---|---|---|---|
| folder_rid | FolderRid | ||
| preview | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
Folder
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# FolderRid
folder_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8"
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None
try:
api_response = client.filesystem.Folder.get(folder_rid, preview=preview)
print("The get response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Folder.get: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Folder | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Fetches multiple folders in a single request.
The maximum batch size for this endpoint is 1000.
| Name | Type | Description | Notes |
|---|---|---|---|
| body | List[GetFoldersBatchRequestElement] | Body of the request | |
| preview | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
GetFoldersBatchResponse
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# List[GetFoldersBatchRequestElement] | Body of the request
body = [{"folderRid": "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8"}]
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None
try:
api_response = client.filesystem.Folder.get_batch(body, preview=preview)
print("The get_batch response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Folder.get_batch: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | GetFoldersBatchResponse | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]