-
Notifications
You must be signed in to change notification settings - Fork 2
/
definition_workflow_01O6IPKZS51QX3DVF1ru9bVbQPjUrIfD3fF.json
199 lines (199 loc) · 8.13 KB
/
definition_workflow_01O6IPKZS51QX3DVF1ru9bVbQPjUrIfD3fF.json
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
{
"workflow": {
"unique_name": "definition_workflow_01O6IPKZS51QX3DVF1ru9bVbQPjUrIfD3fF",
"name": "CDO GraphQL - Get Object Group By Name",
"title": "CDO GraphQL - Get Object Group By Name",
"type": "generic.workflow",
"base_type": "workflow",
"variables": [
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "input",
"name": "Object Group Name",
"type": "datatype.string",
"is_required": true,
"is_invisible": false
},
"unique_name": "variable_workflow_01O6IPKZLX3RT0VQzfy95wPW3gCkueN60ti",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.secure_string",
"properties": {
"value": "",
"scope": "input",
"name": "CDO Bearer",
"type": "datatype.secure_string",
"is_required": true,
"is_invisible": false
},
"unique_name": "variable_workflow_01O6IPKZLX2I2311eNka42GjPLEXg9S42fL",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "output",
"name": "Object Group UID",
"type": "datatype.string",
"is_required": false,
"is_invisible": false
},
"unique_name": "variable_workflow_01O6IPKZLWY6N7akfSbR0jAECRfs84zSWV0",
"object_type": "variable_workflow"
}
],
"properties": {
"atomic": {
"atomic_group": "Cisco Defense Orchestrator",
"is_atomic": true
},
"delete_workflow_instance": false,
"description": "CDO Public API Docs: https://edge.us.cdo.cisco.com/api-explorer/docs/\n\nThis atomic action makes it possible to use GraphQL to retrieve an Object Group's UID given it's name with SXO's Web Service Adapter.\n\nSteps to use:\n1. Create a target https://edge.us.cdo.cisco.com\n2. Input CDO API Token to this workflow\n3. Supply the name of the object group to search for (by default, only the first match is returned)\n4. The output of this atomic action is the UID of the object group",
"display_name": "CDO GraphQL - Get Object Group By Name",
"runtime_user": {
"override_target_runtime_user": false,
"specify_on_workflow_start": false,
"target_default": true
},
"target": {
"target_type": "web-service.endpoint",
"target_id": "definition_target_01NKERNE20JE765baX72xwE4gWn20P3sdKc",
"execute_on_workflow_target": true
}
},
"object_type": "definition_workflow",
"actions": [
{
"unique_name": "definition_activity_01O6IPLUZVEVH7A8z1w6NVOSnlEtmZtLbq8",
"name": "HTTP Request",
"title": "CDO - Query Object Group",
"type": "web-service.http_request",
"base_type": "activity",
"properties": {
"accept": "application/json, text/plain, */*",
"action_timeout": 180,
"allow_auto_redirect": true,
"body": "{\n \"operationName\": null,\n \"variables\": {},\n \"query\": \"{\\n objects(limit: 1, objectType: [NETWORK_GROUP], offset: 0, sortOrder: DESC, sortField: OBJECT_TYPE, name: \\\"$workflow.definition_workflow_01O6IPKZS51QX3DVF1ru9bVbQPjUrIfD3fF.input.variable_workflow_01O6IPKZLX3RT0VQzfy95wPW3gCkueN60ti$\\\") {\\n metadata {\\n count\\n }\\n items {\\n name\\n uid\\n objectType\\n description\\n details {\\n ... on NetworkDetailsBase {\\n wildcardMask\\n }\\n ... on NetworkDetailsIpEq {\\n value\\n }\\n ... on NetworkDetailsIpRange {\\n start\\n end\\n }\\n ... on NetworkGroupDetails {\\n items {\\n ... on ObjectReferenceDetails {\\n uid\\n name\\n type\\n }\\n ... on NetworkDetailsIpEq {\\n value\\n }\\n }\\n }\\n }\\n }\\n }\\n}\\n\"\n}",
"content_type": "application/json",
"continue_on_error_status_code": false,
"continue_on_failure": false,
"custom_headers": [
{
"name": "Authorization",
"value": "Bearer $workflow.definition_workflow_01O6IPKZS51QX3DVF1ru9bVbQPjUrIfD3fF.input.variable_workflow_01O6IPKZLX2I2311eNka42GjPLEXg9S42fL$"
}
],
"display_name": "CDO - Query Object Group",
"method": "POST",
"runtime_user": {
"override_target_runtime_user": false,
"target_default": true
},
"skip_execution": false,
"target": {
"override_workflow_target": false,
"override_workflow_target_group_criteria": false,
"use_workflow_target": true,
"use_workflow_target_group": false
}
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01O6IPM9KI43L7VaZEJaShLuSNHBxUzEiKt",
"name": "JSONPath Query",
"title": "Parse Response - UID",
"type": "corejava.jsonpathquery",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"display_name": "Parse Response - UID",
"input_json": "$activity.definition_activity_01O6IPLUZVEVH7A8z1w6NVOSnlEtmZtLbq8.output.response_body$",
"jsonpath_queries": [
{
"jsonpath_query": "$..uid",
"jsonpath_query_name": "Object Group UID",
"jsonpath_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01O6IPMP3VERG1VWFuaFeivXSZIs2S3PcW3",
"name": "Replace String",
"title": "Clean Up Response",
"type": "core.replacestring",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Clean Up Response",
"input_string": "$activity.definition_activity_01O6IPM9KI43L7VaZEJaShLuSNHBxUzEiKt.output.jsonpath_queries.Object Group UID$",
"replace_list": [
{
"replaced_string": "[",
"replacement_string": ""
},
{
"replaced_string": "]",
"replacement_string": ""
},
{
"replaced_string": "\"",
"replacement_string": ""
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01O6IPN4BEJYC5Cs15xAAyaUq6ll1KC5u9n",
"name": "Set Variables",
"title": "Set Object Group UID as Output",
"type": "core.set_multiple_variables",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Set Object Group UID as Output",
"skip_execution": false,
"variables_to_update": [
{
"variable_to_update": "$workflow.definition_workflow_01O6IPKZS51QX3DVF1ru9bVbQPjUrIfD3fF.output.variable_workflow_01O6IPKZLWY6N7akfSbR0jAECRfs84zSWV0$",
"variable_value_new": "$activity.definition_activity_01O6IPMP3VERG1VWFuaFeivXSZIs2S3PcW3.output.result_string$"
}
]
},
"object_type": "definition_activity"
}
],
"categories": [
"category_1BMfMXSnJMyt5Ihqi7rWJr5N8cf"
]
},
"targets": {
"definition_target_01NKERNE20JE765baX72xwE4gWn20P3sdKc": {
"unique_name": "definition_target_01NKERNE20JE765baX72xwE4gWn20P3sdKc",
"name": "CDO API",
"title": "CDO API",
"type": "web-service.endpoint",
"base_type": "target",
"object_type": "definition_target",
"properties": {
"disable_certificate_validation": false,
"display_name": "CDO API",
"host": "edge.us.cdo.cisco.com",
"ignore_proxy": false,
"no_runtime_user": true,
"path": "/api/public",
"protocol": "https"
}
}
}
}