Validates if an action can be run with the given set of parameters.
The response contains the evaluation of parameters and submission criteria
that determine if the request is VALID
or INVALID
.
For performance reasons, validations will not consider existing objects or other data in Foundry.
For example, the uniqueness of a primary key or the existence of a user ID will not be checked.
Note that parameter default values are not currently supported by
this endpoint. Unspecified parameters will be given a default value of null
.
Third-party applications using this endpoint via OAuth2 must request the
following operation scopes: api:ontologies-read
.
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.
string
The API name of the action to validate. To find the API name for your action, use the List action types endpoint or check the Ontology Manager.
object
map<ParameterId, DataValue>
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.
any
Represents the value of data in the following format. Note that these values can be nested, for example an array of structs.
Type | JSON encoding | Example |
---|---|---|
Array | array | ["alpha", "bravo", "charlie"] |
Attachment | string | "ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e" |
Boolean | boolean | true |
Byte | number | 31 |
Date | ISO 8601 extended local date string | "2021-05-01" |
Decimal | string | "2.718281828" |
Float | number | 3.14159265 |
Double | number | 3.14159265 |
Integer | number | 238940 |
Long | string | "58319870951433" |
Marking | string | "MU" |
Null | null | null |
Object Set | string OR the object set definition | ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z |
Ontology Object Reference | JSON encoding of the object's primary key | 10033123 or "EMP1234" |
Set | array | ["alpha", "bravo", "charlie"] |
Short | number | 8739 |
String | string | "Call me Ishmael" |
Struct | JSON object | {"name": "John Doe", "age": 42} |
TwoDimensionalAggregation | JSON object | {"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]} |
ThreeDimensionalAggregation | JSON object | {"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]} |
Timestamp | ISO 8601 extended offset date-time string in UTC zone | "2021-01-04T05:00:00Z" |
object
Success response.
string
(enum)Represents the state of a validation.
Enum values: VALID
, INVALID
list<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.
string
The message indicating one of the submission criteria was not satisfied. This is configured per submission criteria in the Ontology Manager.
string
(enum)Represents the state of a validation.
Enum values: VALID
, INVALID
map<ParameterId, ParameterEvaluationResult>
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.
object
Represents the validity of a parameter against the configured constraints.
string
(enum)Represents the state of a validation.
Enum values: VALID
, INVALID
list<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.
Type | Description |
---|---|
arraySize | The parameter expects an array of values and the size of the array must fall within the defined range. |
groupMember | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. |
objectPropertyValue | The parameter value must be a property value of an object found within an object set. |
objectQueryResult | The parameter value must be the primary key of an object found within an object set. |
oneOf | The parameter has a manually predefined set of options. |
range | The parameter value must be within the defined range. |
stringLength | The parameter value must have a length within the defined range. |
stringRegexMatch | The parameter value must match a predefined regular expression. |
unevaluable | 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. |
object
The parameter has a manually predefined set of options.
list<ParameterOption>
object
A possible value for the parameter. This is defined in the Ontology Manager by Actions admins.
string
The display name of the entity.
any
An allowed configured value for a parameter within an action.
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.
object
The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint.
object
The parameter value must be a property value of an object found within an object set.
object
The parameter value must be within the defined range.
any
Less than
any
Less than or equal
any
Greater than
any
Greater than or equal
object
The parameter expects an array of values and the size of the array must fall within the defined range.
any
Less than
any
Less than or equal
any
Greater than
any
Greater than or equal
object
The parameter value must be the primary key of an object found within an object set.
object
The parameter value must have a length within the defined range. This range is always inclusive.
any
Less than
any
Less than or equal
any
Greater than
any
Greater than or equal
object
The parameter value must match a predefined regular expression.
string
The regular expression configured in the Ontology Manager.
string
The message indicating that the regular expression was not matched. This is configured per parameter in the Ontology Manager.
object
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.
boolean
Represents whether the parameter is a required input to the action.
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/validate" \
-d '{"parameters":{"id":"2","firstName":"Chuck","lastName":"Jones","age":17,"date":"2021-05-01","numbers":[1,2,3],"hasObjectSet":true,"objectSet":"ri.object-set.main.object-set.39a9f4bd-f77e-45ce-9772-70f25852f623","reference":"Chuck","percentage":41.3,"differentObjectId":"2"}}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"result": "INVALID",
"submissionCriteria": [
{
"configuredFailureMessage": "First name can not match the first name of the referenced object.",
"result": "INVALID"
}
],
"parameters": {
"age": {
"result": "INVALID",
"evaluatedConstraints": [
{
"type": "range",
"gte": 18
}
],
"required": true
},
"id": {
"result": "VALID",
"evaluatedConstraints": [],
"required": true
},
"date": {
"result": "VALID",
"evaluatedConstraints": [],
"required": true
},
"lastName": {
"result": "VALID",
"evaluatedConstraints": [
{
"type": "oneOf",
"options": [
{
"displayName": "Doe",
"value": "Doe"
},
{
"displayName": "Smith",
"value": "Smith"
},
{
"displayName": "Adams",
"value": "Adams"
},
{
"displayName": "Jones",
"value": "Jones"
}
],
"otherValuesAllowed": true
}
],
"required": true
},
"numbers": {
"result": "VALID",
"evaluatedConstraints": [
{
"type": "arraySize",
"lte": 4,
"gte": 2
}
],
"required": true
},
"differentObjectId": {
"result": "VALID",
"evaluatedConstraints": [
{
"type": "objectPropertyValue"
}
],
"required": false
},
"firstName": {
"result": "VALID",
"evaluatedConstraints": [],
"required": true
},
"reference": {
"result": "VALID",
"evaluatedConstraints": [
{
"type": "objectQueryResult"
}
],
"required": false
},
"percentage": {
"result": "VALID",
"evaluatedConstraints": [
{
"type": "range",
"lt": 100,
"gte": 0
}
],
"required": true
},
"objectSet": {
"result": "VALID",
"evaluatedConstraints": [],
"required": true
},
"attachment": {
"result": "VALID",
"evaluatedConstraints": [],
"required": false
},
"hasObjectSet": {
"result": "VALID",
"evaluatedConstraints": [],
"required": false
},
"multipleAttachments": {
"result": "VALID",
"evaluatedConstraints": [
{
"type": "arraySize",
"gte": 0
}
],
"required": false
}
}
}