Method | HTTP request |
---|---|
apply | POST /v2/ontologies/{ontology}/actions/{action}/apply |
apply_batch | POST /v2/ontologies/{ontology}/actions/{action}/applyBatch |
Applies an action using the given parameters.
Changes to the Ontology are eventually consistent and may take some time to be visible.
Note that parameter default values are not currently supported by this endpoint.
Third-party applications using this endpoint via OAuth2 must request the
following operation scopes: api:ontologies-read api:ontologies-write
.
Name | Type | Description | Notes |
---|---|---|---|
ontology | OntologyIdentifier | ontology | |
action | ActionTypeApiName | action | |
parameters | Dict[ParameterId, Optional[DataValue]] | ||
artifact_repository | Optional[ArtifactRepositoryRid] | artifactRepository | [optional] |
options | Optional[ApplyActionRequestOptionsDict] | [optional] | |
package_name | Optional[SdkPackageName] | packageName | [optional] |
SyncApplyActionResponseV2
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# OntologyIdentifier | ontology
ontology = "palantir"
# ActionTypeApiName | action
action = "rename-employee"
# Dict[ParameterId, Optional[DataValue]] |
parameters = {"id": 80060, "newName": "Anna Smith-Doe"}
# Optional[ArtifactRepositoryRid] | artifactRepository
artifact_repository = None
# Optional[ApplyActionRequestOptionsDict] |
options = None
# Optional[SdkPackageName] | packageName
package_name = None
try:
api_response = foundry_client.ontologies.Action.apply(
ontology,
action,
parameters=parameters,
artifact_repository=artifact_repository,
options=options,
package_name=package_name,
)
print("The apply response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Action.apply: %s\n" % e)
See README
Status Code | Type | Description | Content Type |
---|---|---|---|
200 | SyncApplyActionResponseV2 | Success response. | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Applies multiple actions (of the same Action Type) using the given parameters. Changes to the Ontology are eventually consistent and may take some time to be visible.
Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not call Functions may receive a higher limit.
Note that notifications are not currently supported by this endpoint.
Third-party applications using this endpoint via OAuth2 must request the
following operation scopes: api:ontologies-read api:ontologies-write
.
Name | Type | Description | Notes |
---|---|---|---|
ontology | OntologyIdentifier | ontology | |
action | ActionTypeApiName | action | |
requests | List[BatchApplyActionRequestItemDict] | ||
artifact_repository | Optional[ArtifactRepositoryRid] | artifactRepository | [optional] |
options | Optional[BatchApplyActionRequestOptionsDict] | [optional] | |
package_name | Optional[SdkPackageName] | packageName | [optional] |
BatchApplyActionResponseV2
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# OntologyIdentifier | ontology
ontology = "palantir"
# ActionTypeApiName | action
action = "rename-employee"
# List[BatchApplyActionRequestItemDict] |
requests = [
{"parameters": {"id": 80060, "newName": "Anna Smith-Doe"}},
{"parameters": {"id": 80061, "newName": "Joe Bloggs"}},
]
# Optional[ArtifactRepositoryRid] | artifactRepository
artifact_repository = None
# Optional[BatchApplyActionRequestOptionsDict] |
options = None
# Optional[SdkPackageName] | packageName
package_name = None
try:
api_response = foundry_client.ontologies.Action.apply_batch(
ontology,
action,
requests=requests,
artifact_repository=artifact_repository,
options=options,
package_name=package_name,
)
print("The apply_batch response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Action.apply_batch: %s\n" % e)
See README
Status Code | Type | Description | Content Type |
---|---|---|---|
200 | BatchApplyActionResponseV2 | Success response. | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]