Skip to content

Commit bf2096d

Browse files
Excavator: Upgrade API Version (#215)
1 parent 5c7de54 commit bf2096d

File tree

15 files changed

+290
-2
lines changed

15 files changed

+290
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ Namespace | Resource | Operation | HTTP request |
736736
**Orchestration** | Schedule | [**create**](docs/v2/Orchestration/Schedule.md#create) | **POST** /v2/orchestration/schedules |
737737
**Orchestration** | Schedule | [**delete**](docs/v2/Orchestration/Schedule.md#delete) | **DELETE** /v2/orchestration/schedules/{scheduleRid} |
738738
**Orchestration** | Schedule | [**get**](docs/v2/Orchestration/Schedule.md#get) | **GET** /v2/orchestration/schedules/{scheduleRid} |
739+
**Orchestration** | Schedule | [**get_batch**](docs/v2/Orchestration/Schedule.md#get_batch) | **POST** /v2/orchestration/schedules/getBatch |
739740
**Orchestration** | Schedule | [**pause**](docs/v2/Orchestration/Schedule.md#pause) | **POST** /v2/orchestration/schedules/{scheduleRid}/pause |
740741
**Orchestration** | Schedule | [**replace**](docs/v2/Orchestration/Schedule.md#replace) | **PUT** /v2/orchestration/schedules/{scheduleRid} |
741742
**Orchestration** | Schedule | [**run**](docs/v2/Orchestration/Schedule.md#run) | **POST** /v2/orchestration/schedules/{scheduleRid}/run |
@@ -1635,6 +1636,8 @@ Namespace | Name | Import |
16351636
**Orchestration** | [GetBuildsBatchResponse](docs/v2/Orchestration/models/GetBuildsBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetBuildsBatchResponse` |
16361637
**Orchestration** | [GetJobsBatchRequestElement](docs/v2/Orchestration/models/GetJobsBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetJobsBatchRequestElement` |
16371638
**Orchestration** | [GetJobsBatchResponse](docs/v2/Orchestration/models/GetJobsBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetJobsBatchResponse` |
1639+
**Orchestration** | [GetSchedulesBatchRequestElement](docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetSchedulesBatchRequestElement` |
1640+
**Orchestration** | [GetSchedulesBatchResponse](docs/v2/Orchestration/models/GetSchedulesBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetSchedulesBatchResponse` |
16381641
**Orchestration** | [Job](docs/v2/Orchestration/models/Job.md) | `from foundry_sdk.v2.orchestration.models import Job` |
16391642
**Orchestration** | [JobOutput](docs/v2/Orchestration/models/JobOutput.md) | `from foundry_sdk.v2.orchestration.models import JobOutput` |
16401643
**Orchestration** | [JobStartedTime](docs/v2/Orchestration/models/JobStartedTime.md) | `from foundry_sdk.v2.orchestration.models import JobStartedTime` |
@@ -2096,6 +2099,7 @@ Namespace | Name | Import |
20962099
**Datasets** | GetDatasetSchedulesPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchedulesPermissionDenied` |
20972100
**Datasets** | GetDatasetSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchemaPermissionDenied` |
20982101
**Datasets** | GetFileContentPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetFileContentPermissionDenied` |
2102+
**Datasets** | InputBackingDatasetNotInOutputViewProject | `from foundry_sdk.v2.datasets.errors import InputBackingDatasetNotInOutputViewProject` |
20992103
**Datasets** | InvalidBranchName | `from foundry_sdk.v2.datasets.errors import InvalidBranchName` |
21002104
**Datasets** | InvalidTransactionType | `from foundry_sdk.v2.datasets.errors import InvalidTransactionType` |
21012105
**Datasets** | InvalidViewBackingDataset | `from foundry_sdk.v2.datasets.errors import InvalidViewBackingDataset` |

docs-snippets-npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"sls": {
2525
"dependencies": {
2626
"com.palantir.foundry.api:api-gateway": {
27-
"minVersion": "1.1232.0",
27+
"minVersion": "1.1233.0",
2828
"maxVersion": "1.x.x",
2929
"optional": false
3030
}

docs-snippets-npm/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,11 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets<typeof PLATFORM_API_DOCS_SPEC
12931293
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get(schedule_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get: %s\\n\" % e)"
12941294
}
12951295
],
1296+
"v2.getSchedulesBatch": [
1297+
{
1298+
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetSchedulesBatchRequestElement] | Body of the request\nbody = [{\"scheduleRid\": \"ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get_batch: %s\\n\" % e)"
1299+
}
1300+
],
12961301
"v2.pauseSchedule": [
12971302
{
12981303
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.pause(schedule_rid)\n print(\"The pause response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.pause: %s\\n\" % e)"

docs/v2/Filesystem/models/ResourceType.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The type of the Resource derived from the Resource Identifier (RID).
4747
| `"LOGIC_FLOWS_CONNECTED_FLOW"` |
4848
| `"MACHINERY_DOCUMENT"` |
4949
| `"MAGRITTE_AGENT"` |
50+
| `"MAGRITTE_DRIVER"` |
5051
| `"MAGRITTE_SOURCE"` |
5152
| `"MARKETPLACE_BLOCK_SET_INSTALLATION"` |
5253
| `"MARKETPLACE_BLOCK_SET_REPO"` |

docs/v2/Orchestration/Schedule.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Method | HTTP request | Release Stage |
55
[**create**](#create) | **POST** /v2/orchestration/schedules | Public Beta |
66
[**delete**](#delete) | **DELETE** /v2/orchestration/schedules/{scheduleRid} | Stable |
77
[**get**](#get) | **GET** /v2/orchestration/schedules/{scheduleRid} | Public Beta |
8+
[**get_batch**](#get_batch) | **POST** /v2/orchestration/schedules/getBatch | Public Beta |
89
[**pause**](#pause) | **POST** /v2/orchestration/schedules/{scheduleRid}/pause | Stable |
910
[**replace**](#replace) | **PUT** /v2/orchestration/schedules/{scheduleRid} | Public Beta |
1011
[**run**](#run) | **POST** /v2/orchestration/schedules/{scheduleRid}/run | Stable |
@@ -192,6 +193,60 @@ See [README](../../../README.md#authorization)
192193

193194
[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)
194195

196+
# **get_batch**
197+
Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be
198+
omitted from the response.
199+
200+
201+
The maximum batch size for this endpoint is 1000.
202+
203+
### Parameters
204+
205+
Name | Type | Description | Notes |
206+
------------- | ------------- | ------------- | ------------- |
207+
**body** | List[GetSchedulesBatchRequestElement] | Body of the request | |
208+
**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
209+
210+
### Return type
211+
**GetSchedulesBatchResponse**
212+
213+
### Example
214+
215+
```python
216+
from foundry_sdk import FoundryClient
217+
import foundry_sdk
218+
from pprint import pprint
219+
220+
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
221+
222+
# List[GetSchedulesBatchRequestElement] | Body of the request
223+
body = [{"scheduleRid": "ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871"}]
224+
# Optional[PreviewMode] | Enables the use of preview functionality.
225+
preview = None
226+
227+
228+
try:
229+
api_response = client.orchestration.Schedule.get_batch(body, preview=preview)
230+
print("The get_batch response:\n")
231+
pprint(api_response)
232+
except foundry_sdk.PalantirRPCException as e:
233+
print("HTTP error when calling Schedule.get_batch: %s\n" % e)
234+
235+
```
236+
237+
238+
239+
### Authorization
240+
241+
See [README](../../../README.md#authorization)
242+
243+
### HTTP response details
244+
| Status Code | Type | Description | Content Type |
245+
|-------------|-------------|-------------|------------------|
246+
**200** | GetSchedulesBatchResponse | | application/json |
247+
248+
[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)
249+
195250
# **pause**
196251

197252

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# GetSchedulesBatchRequestElement
2+
3+
GetSchedulesBatchRequestElement
4+
5+
## Properties
6+
| Name | Type | Required | Description |
7+
| ------------ | ------------- | ------------- | ------------- |
8+
**schedule_rid** | ScheduleRid | Yes | |
9+
10+
11+
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# GetSchedulesBatchResponse
2+
3+
GetSchedulesBatchResponse
4+
5+
## Properties
6+
| Name | Type | Required | Description |
7+
| ------------ | ------------- | ------------- | ------------- |
8+
**data** | Dict[ScheduleRid, Schedule] | Yes | |
9+
10+
11+
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)

foundry_sdk/_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
# using the autorelease bot
1818
__version__ = "0.0.0"
1919

20-
__openapi_document_version__ = "1.1232.0"
20+
__openapi_document_version__ = "1.1233.0"

foundry_sdk/v2/cli.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7855,6 +7855,31 @@ def orchestration_schedule_get(
78557855
click.echo(repr(result))
78567856

78577857

7858+
@orchestration_schedule.command("get_batch")
7859+
@click.argument("body", type=str, required=True)
7860+
@click.option(
7861+
"--preview", type=bool, required=False, help="""Enables the use of preview functionality."""
7862+
)
7863+
@click.pass_obj
7864+
def orchestration_schedule_get_batch(
7865+
client: FoundryClient,
7866+
body: str,
7867+
preview: typing.Optional[bool],
7868+
):
7869+
"""
7870+
Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be
7871+
omitted from the response.
7872+
7873+
7874+
The maximum batch size for this endpoint is 1000.
7875+
"""
7876+
result = client.orchestration.Schedule.get_batch(
7877+
body=json.loads(body),
7878+
preview=preview,
7879+
)
7880+
click.echo(repr(result))
7881+
7882+
78587883
@orchestration_schedule.command("pause")
78597884
@click.argument("schedule_rid", type=str, required=True)
78607885
@click.pass_obj

foundry_sdk/v2/datasets/errors.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,22 @@ class GetFileContentPermissionDenied(errors.PermissionDeniedError):
425425
error_instance_id: str
426426

427427

428+
class InputBackingDatasetNotInOutputViewProjectParameters(typing_extensions.TypedDict):
429+
"""
430+
One or more backing datasets do not live in the same project as the view. Either move the input datasets to
431+
the same project as the view or add them as project references.
432+
"""
433+
434+
__pydantic_config__ = {"extra": "allow"} # type: ignore
435+
436+
437+
@dataclass
438+
class InputBackingDatasetNotInOutputViewProject(errors.BadRequestError):
439+
name: typing.Literal["InputBackingDatasetNotInOutputViewProject"]
440+
parameters: InputBackingDatasetNotInOutputViewProjectParameters
441+
error_instance_id: str
442+
443+
428444
class InvalidBranchNameParameters(typing_extensions.TypedDict):
429445
"""The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs."""
430446

@@ -812,6 +828,7 @@ class ViewPrimaryKeyRequiresBackingDatasets(errors.BadRequestError):
812828
"GetDatasetSchedulesPermissionDenied",
813829
"GetDatasetSchemaPermissionDenied",
814830
"GetFileContentPermissionDenied",
831+
"InputBackingDatasetNotInOutputViewProject",
815832
"InvalidBranchName",
816833
"InvalidTransactionType",
817834
"InvalidViewBackingDataset",

0 commit comments

Comments
 (0)