Search documentation
karat

+

K

User Documentation ↗

Apply Action Batch

POST/api/v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch

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 parameter default values and 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.

Path parameters

ontologyRid
string

The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the List ontologies endpoint or check the Ontology Manager.

actionType
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.

Request body

BatchApplyActionRequest
object
Hide children

Hide children

requests
list<ApplyActionRequest>
optional
Show children

Show children

ApplyActionRequest
object
Show children

Show children

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

BatchApplyActionResponse
object

Success response.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v1/ontologies/ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367/actions/rename-employee/applyBatch" \ -d '{"requests":[{"parameters":{"id":80060,"newName":"Anna Smith-Doe"}},{"parameters":{"id":80061,"newName":"Joe Bloggs"}}]}'

Response

Copied!
1 {}