Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Apply Action

POST/api/v2/ontologies/{ontology}/actions/{action}/apply

Applies an action using the given parameters.

Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.

Note that a 200 HTTP status code only indicates that the request was received and processed by the server. See the validation result in the response body to determine if the action was applied successfully.

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.

Path parameters

ontology
string

The API name or RID of the Ontology. To find the API name or RID, use the List Ontologies endpoint or check the Ontology Manager.

action
string

The API name of the action to apply. To find the API name for your action, use the List action types endpoint or check the Ontology Manager.

Query parameters

sdkPackageRid
stringoptional

The package rid of the generated SDK.

sdkVersion
stringoptional

The version of the generated SDK.

transactionId
stringoptional

The ID of an Ontology transaction to apply the action against. Transactions are an experimental feature and all workflows may not be supported.

scenarioRid
stringoptional

The resource identifier of an ontology scenario to apply the action against.

branch
stringoptional

The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.

Request body

ApplyActionRequestV2
object
Hide child attributes

Hide child attributes

options
objectoptional
Show child attributes

Show child attributes

parameters
map<ParameterId, DataValue>optional
Show child attributes

Show child attributes

Response body

SyncApplyActionResponseV2
object

Success response.

Hide child attributes

Hide child attributes

operationId
stringoptional
validation
objectoptional
Show child attributes

Show child attributes

edits
unionoptional
Show child attributes

Show child attributes

returnValue
anyoptional

Represents the value of data in the following format. Note that these values can be nested, for example an array of structs.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
Attachmentstring"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"
Booleanbooleantrue
Bytenumber31
CipherTextstring"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
EntrySetarray of JSON objects[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]
Floatnumber3.14159265
GeoshapeGeoJSON geometry, as an object or string{"type": "Point", "coordinates": [102.0, 0.5]}
Integernumber238940
Longstring"58319870951433"
Markingstring"MU"
Nullnullnull
Object Setstring OR the object set definitionri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z
Ontology Object ReferenceJSON encoding of the object's primary key10033123 or "EMP1234"
Ontology Interface Object ReferenceJSON encoding of the object's API name and primary key{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}
Ontology Object Type Referencestring of the object type's api name"Employee"
Scenario Referencestring of the scenario RID"ri.actions..scenario.cf2a8a49-8b56-446d-ab04-a6bc7fadef48"
Setarray["alpha", "bravo", "charlie"]
Shortnumber8739
Stringstring"Call me Ishmael"
StructJSON object{"name": "John Doe", "age": 42}
TwoDimensionalAggregationJSON object{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}
ThreeDimensionalAggregationJSON object{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"
Time Series ReferenceseriesId string or JSON object"sensor-123", {"seriesId": "sensor-123", "syncRid": "ri.time-series-catalog.main.sync.2f944bae-5851-4204-8615-920c969a9f2e"}, or {"templateRid": "ri.time-series-catalog.main.template.2f944bae-5851-4204-8615-920c969a9f2e", "templateVersion": "1"}

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/ontologies/palantir/actions/rename-employee/apply?scenarioRid=ri.actions..scenario.a1b2c3d4-e5f6-7890-abcd-ef1234567890&branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252" \ -d '{"parameters":{"id":80060,"newName":"Anna Smith-Doe"}}'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "operationId": "ri.actions.main.action.c61d9ab5-2919-4127-a0a1-ac64c0ce6367", "validation": { "result": "VALID" }, "parameters": { "id": { "evaluatedConstraints": [], "result": "VALID", "required": true }, "newName": { "evaluatedConstraints": [], "result": "VALID", "required": true } }, "returnValue": "Anna Smith-Doe" }