Search documentation
karat

+

K

User Documentation ↗

Apply Action

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

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.

Path parameters

ontology
string

The API name of the ontology. To find the API name, 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

artifactRepository
string
optional

The repository associated with a marketplace installation.

packageName
string
optional

The package name of the generated SDK.

Request body

ApplyActionRequestV2
object
Hide children

Hide children

options
object
optional
Show children

Show children

mode
string (enum)
optional

Enum values: VALIDATE_ONLY, VALIDATE_AND_EXECUTE

returnEdits
string (enum)
optional

Enum values: ALL, NONE

parameters
map<ParameterId, DataValue>
optional
Show children

Show children

ParameterId
string

The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the Ontology Manager.

DataValue
any

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
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Floatnumber3.14159265
Doublenumber3.14159265
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"
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"

Response body

SyncApplyActionResponseV2
object

Success response.

Hide children

Hide children

validation
object
optional
Show children

Show children

result
string (enum)

Represents the state of a validation.

Enum values: VALID, INVALID

submissionCriteria
list<SubmissionCriteriaEvaluation>
optional
Show children

Show children

SubmissionCriteriaEvaluation
object

Contains the status of the submission criteria. Submission criteria are the prerequisites that need to be satisfied before an Action can be applied. These are configured in the Ontology Manager.

Show children

Show children

configuredFailureMessage
string
optional

The message indicating one of the submission criteria was not satisfied. This is configured per submission criteria in the Ontology Manager.

result
string (enum)

Represents the state of a validation.

Enum values: VALID, INVALID

parameters
map<ParameterId, ParameterEvaluationResult>
optional
Show children

Show children

ParameterId
string

The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the Ontology Manager.

ParameterEvaluationResult
object

Represents the validity of a parameter against the configured constraints.

Show children

Show children

result
string (enum)

Represents the state of a validation.

Enum values: VALID, INVALID

evaluatedConstraints
list<ParameterEvaluatedConstraint>
optional
Show children

Show children

ParameterEvaluatedConstraint
union

A constraint that an action parameter value must satisfy in order to be considered valid. Constraints can be configured on action parameters in the Ontology Manager. Applicable constraints are determined dynamically based on parameter inputs. Parameter values are evaluated against the final set of constraints.

The type of the constraint.

TypeDescription
arraySizeThe parameter expects an array of values and the size of the array must fall within the defined range.
groupMemberThe parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint.
objectPropertyValueThe parameter value must be a property value of an object found within an object set.
objectQueryResultThe parameter value must be the primary key of an object found within an object set.
oneOfThe parameter has a manually predefined set of options.
rangeThe parameter value must be within the defined range.
stringLengthThe parameter value must have a length within the defined range.
stringRegexMatchThe parameter value must match a predefined regular expression.
unevaluableThe parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid.
Show children

Show children

oneOf
object
optional

The parameter has a manually predefined set of options.

Show children

Show children

options
list<ParameterOption>
optional
Show children

Show children

ParameterOption
object

A possible value for the parameter. This is defined in the Ontology Manager by Actions admins.

Show children

Show children

displayName
string
optional

The display name of the entity.

value
any
optional

An allowed configured value for a parameter within an action.

otherValuesAllowed
boolean

A flag denoting whether custom, user provided values will be considered valid. This is configured via the Allowed "Other" value toggle in the Ontology Manager.

groupMember
object
optional

The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint.

objectPropertyValue
object
optional

The parameter value must be a property value of an object found within an object set.

range
object
optional

The parameter value must be within the defined range.

Show children

Show children

lt
any
optional

Less than

lte
any
optional

Less than or equal

gt
any
optional

Greater than

gte
any
optional

Greater than or equal

arraySize
object
optional

The parameter expects an array of values and the size of the array must fall within the defined range.

Show children

Show children

lt
any
optional

Less than

lte
any
optional

Less than or equal

gt
any
optional

Greater than

gte
any
optional

Greater than or equal

objectQueryResult
object
optional

The parameter value must be the primary key of an object found within an object set.

stringLength
object
optional

The parameter value must have a length within the defined range. This range is always inclusive.

Show children

Show children

lt
any
optional

Less than

lte
any
optional

Less than or equal

gt
any
optional

Greater than

gte
any
optional

Greater than or equal

stringRegexMatch
object
optional

The parameter value must match a predefined regular expression.

Show children

Show children

regex
string

The regular expression configured in the Ontology Manager.

configuredFailureMessage
string
optional

The message indicating that the regular expression was not matched. This is configured per parameter in the Ontology Manager.

unevaluable
object
optional

The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid.

required
boolean

Represents whether the parameter is a required input to the action.

edits
union
optional
Show children

Show children

edits
object
optional
Show children

Show children

edits
list<ObjectEdit>
optional
Show children

Show children

ObjectEdit
union
Show children

Show children

modifyObject
object
optional
Show children

Show children

primaryKey
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

objectType
string

The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the List object types endpoint or check the Ontology Manager.

addObject
object
optional
Show children

Show children

primaryKey
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

objectType
string

The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the List object types endpoint or check the Ontology Manager.

addLink
object
optional
Show children

Show children

linkTypeApiNameAtoB
string

The name of the link type in the API. To find the API name for your Link Type, check the Ontology Manager application.

linkTypeApiNameBtoA
string

The name of the link type in the API. To find the API name for your Link Type, check the Ontology Manager application.

aSideObject
object
Show children

Show children

primaryKey
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

objectType
string

The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the List object types endpoint or check the Ontology Manager.

bSideObject
object
Show children

Show children

primaryKey
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

objectType
string

The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the List object types endpoint or check the Ontology Manager.

addedObjectCount
integer
modifiedObjectsCount
integer
deletedObjectsCount
integer
addedLinksCount
integer
deletedLinksCount
integer
largeScaleEdits
object
optional
Show children

Show children

editedObjectTypes
list<ObjectTypeApiName>
optional
Show children

Show children

ObjectTypeApiName
string

The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the List object types endpoint or check the Ontology Manager.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/ontologies/palantir/actions/rename-employee/apply?artifactRepository=&packageName=" \ -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 { "validation": { "result": "VALID" }, "parameters": { "id": { "evaluatedConstraints": [], "result": "VALID", "required": true }, "newName": { "evaluatedConstraints": [], "result": "VALID", "required": true } } }