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 scope: 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>
object
Success response.
string
(enum)Represents the state of a validation.
Enum values: VALID
, INVALID
list<SubmissionCriteriaEvaluation>
map<ParameterId, ParameterEvaluationResult>
1curl -X POST \
2 -H "Content-type: application/json" \
3 -H "Authorization: Bearer $TOKEN" \
4 "https://$HOSTNAME/api/v1/ontologies/ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367/actions/rename-employee/validate" \
5 -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 "result": "INVALID",
3 "submissionCriteria": [
4 {
5 "configuredFailureMessage": "First name can not match the first name of the referenced object.",
6 "result": "INVALID"
7 }
8 ],
9 "parameters": {
10 "age": {
11 "result": "INVALID",
12 "evaluatedConstraints": [
13 {
14 "type": "range",
15 "gte": 18
16 }
17 ],
18 "required": true
19 },
20 "id": {
21 "result": "VALID",
22 "evaluatedConstraints": [],
23 "required": true
24 },
25 "date": {
26 "result": "VALID",
27 "evaluatedConstraints": [],
28 "required": true
29 },
30 "lastName": {
31 "result": "VALID",
32 "evaluatedConstraints": [
33 {
34 "type": "oneOf",
35 "options": [
36 {
37 "displayName": "Doe",
38 "value": "Doe"
39 },
40 {
41 "displayName": "Smith",
42 "value": "Smith"
43 },
44 {
45 "displayName": "Adams",
46 "value": "Adams"
47 },
48 {
49 "displayName": "Jones",
50 "value": "Jones"
51 }
52 ],
53 "otherValuesAllowed": true
54 }
55 ],
56 "required": true
57 },
58 "numbers": {
59 "result": "VALID",
60 "evaluatedConstraints": [
61 {
62 "type": "arraySize",
63 "lte": 4,
64 "gte": 2
65 }
66 ],
67 "required": true
68 },
69 "differentObjectId": {
70 "result": "VALID",
71 "evaluatedConstraints": [
72 {
73 "type": "objectPropertyValue"
74 }
75 ],
76 "required": false
77 },
78 "firstName": {
79 "result": "VALID",
80 "evaluatedConstraints": [],
81 "required": true
82 },
83 "reference": {
84 "result": "VALID",
85 "evaluatedConstraints": [
86 {
87 "type": "objectQueryResult"
88 }
89 ],
90 "required": false
91 },
92 "percentage": {
93 "result": "VALID",
94 "evaluatedConstraints": [
95 {
96 "type": "range",
97 "lt": 100,
98 "gte": 0
99 }
100 ],
101 "required": true
102 },
103 "objectSet": {
104 "result": "VALID",
105 "evaluatedConstraints": [],
106 "required": true
107 },
108 "attachment": {
109 "result": "VALID",
110 "evaluatedConstraints": [],
111 "required": false
112 },
113 "hasObjectSet": {
114 "result": "VALID",
115 "evaluatedConstraints": [],
116 "required": false
117 },
118 "multipleAttachments": {
119 "result": "VALID",
120 "evaluatedConstraints": [
121 {
122 "type": "arraySize",
123 "gte": 0
124 }
125 ],
126 "required": false
127 }
128 }
129}