-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCisco Defense Orchestrator.postman_collection.json
374 lines (374 loc) · 17.2 KB
/
Cisco Defense Orchestrator.postman_collection.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
{
"info": {
"_postman_id": "4884b45a-9b19-400c-acfd-80add861394e",
"name": "Cisco Defense Orchestrator",
"description": "# Getting started\n\n## Welcome to the CDO public API[]()\n\nThe goal of our public API is to provide you with a simple and effective way to perform a lot of what you would normally be able to do in the CDO UI, but in code.\n\nTo use this API, you will need to know GraphQL. It is very easy to learn, and their [official guide]() provides a thorough, light read. We chose GraphQL because it is flexible, strongly typed, and auto-documenting.\n\nTo find the full schema documentation, simply go to the [GraphQL Playground](), and click on the `docs` tab on the right hand side of the page.\n\n---\n\n## Samples[]()\n\nTo help you get started, we have prepared a bunch of [sample GraphQL queries and mutations]() that you can experiment with right away!\n\n##### IMPORTANT\n\nBefore running the samples, you must first provide your API token to the playground. \nClick on `HTTP Headers` in the bottom left corner, and replace with your token. This will fix any errors being displayed, and should perform the query successfully.\n\nWhen you reload the `Samples` page, all of your changes, including the API token that you provided, will be reset. If you want a persistent playground session to work with, use the [empty playground]() . However, as a current limitation, do be warned that if you visit the `Samples` page again, your empty playground data will reset.\n\nSome of the queries will need modification before running them, so you don't end up with bogus data in your account. The required changes are mostly in mutation quries, where it is creating or updating data. Make sure you change any boilerplate, and ensure all the values being set are correct. (You can always delete incorrect data manually if you accidentally run the query before making these changes)\n\n---\n\n## Empty Playground[]()\n\nFor your convenience, we are also providing a raw [empty playground]() with no preset settings. This means you will need to provide your API token by clicking `HTTP Headers` in the bottom left corner of the screen, and pasting this in (with the correct API token):\n\n```\n{\n \"Authorization\": \"Bearer \"\n}\n\n ```\n\nCopy\n\nOnce you have done this, you can start writing queries! Have a look at the auto-generated `docs` tab on the right hand side of the playground to see the kind of queries you can write. The playground's intellisense should help too.\n\n---\n\n## Endpoints[]()\n\n#### How do I decide what endpoint URL to use?[]()\n\nWe have prepared this table to help you determine what endpoint URL you should hit when making API requests. This is the same URL you need to enter in the Playground.\n\n| Region | Endpoint you should use | Description |\n| --- | --- | --- |\n| US | [https://edge.us.cdo.cisco.com/api/public]() | Use if you normally access CDO from [www.defenseorchestrator.com]() |\n| EU | [https://edge.eu.cdo.cisco.com/api/public]() | Use if you normally access CDO from [www.defenseorchestrator.eu]() |\n| APJ | [https://edge.apj.cdo.cisco.com/api/public]() | Use if you normally access CDO from [www.apj.cdo.cisco.com]() |\n\n---\n\n## How do I start coding with the CDO Public API?[]()\n\nWhile you are able use any workflow you want with the GraphQL API, here is, in our opinion, the best way to start programming in TypeScript:\n\nFirst, set up the [GraphQL code generator]()\n\nOnce you have followed the setup wizard, make sure your `codegen.yml` config has the correct authorization headers, something like this:\n\n```\nschema:\n - https://edge..cdo.cisco.com/api/public:\n headers:\n Authorization: Bearer \n\n ```\n\nWe also recommend the [Apollo client library]() to help you write code to interface with our GraphQL API.\n\nDocumentation: [https://edge.us.cdo.cisco.com/api-explorer/docs/]()",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "8695710",
"_collection_link": "https://galactic-astronaut-430691.postman.co/workspace/Cisco-Security~ff5542bd-d893-4a19-ae32-6a56f151c6e7/collection/8695710-4884b45a-9b19-400c-acfd-80add861394e?action=share&creator=8695710&source=collection_link"
},
"item": [
{
"name": "Graph",
"item": [
{
"name": "Query Device",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{api_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query {\n devices(limit: 50, sortField: NAME, deviceType: [FIREPOWER, ASA, FTD]) {\n metadata {\n count\n }\n items {\n softwareVersion\n name\n uid\n isModel\n conflictDetectionState\n ipv4\n deviceType\n serial\n configurationStatus\n interfaces\n connectivityState\n highAvailability\n specificDevice {\n namespace\n ... on FtdSpecificDevice {\n uid\n }\n ... on AsaSpecificDevice {\n uid\n type\n vpnId\n }\n ... on MerakiSpecificDevice {\n uid\n type\n }\n ... on AwsSpecificDevice {\n vpcId\n region\n }\n }\n }\n }\n}",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Query Object",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query {\n devices(limit: 50, sortField: NAME, deviceType: [FIREPOWER, ASA, FTD]) {\n metadata {\n count\n }\n items {\n softwareVersion\n name\n uid\n isModel\n conflictDetectionState\n ipv4\n deviceType\n serial\n configurationStatus\n interfaces\n connectivityState\n highAvailability\n specificDevice {\n namespace\n ... on FtdSpecificDevice {\n uid\n }\n ... on AsaSpecificDevice {\n uid\n type\n vpnId\n }\n ... on MerakiSpecificDevice {\n uid\n type\n }\n ... on AwsSpecificDevice {\n vpcId\n region\n }\n }\n }\n }\n}",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Query Changelog",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query {\n changelog(\n # deviceUid: [\"some-uid-1\", \"some-uid-2\"]\n # searchTerm: \"some-search-term\"\n sortField: LAST_UPDATED\n sortOrder: ASC\n changeStatus: [COMPLETED]\n # user: [\"some-username\"]\n dateRange: { start: 1593017544000 }\n ) {\n metadata {\n count\n }\n items {\n uid\n deviceName\n lastUpdated\n lastUser\n lastDescription\n changeStatus\n deviceUid\n \n events {\n class\n action\n user\n objectReference {\n uid\n type\n namespace\n }\n details {\n class\n description\n diff\n }\n eventDate\n changeType\n }\n }\n }\n }",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Create Network Group",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation {\n createNetworkGroup(\n baseInput: { name: \"some-device-name\", deviceType: ASA }\n networkGroupInput: {\n ipAddresses: [{ value: \"6.9.6.9\" }, { value: \"7.9.7.9\" }]\n objectReferences: [\n {\n uid: \"<Enter the uid of another network group (or object) here>\"\n name: \"<Enter the name of that Object here>\"\n type: NETWORK_GROUP #or NETWORK_OBJECT depending on the type\n }\n ]\n }\n ) {\n name\n uid\n details {\n ... on NetworkDetailsIpEq {\n value\n }\n \n ... on NetworkDetailsIpRange {\n start\n end\n }\n \n ... on NetworkGroupDetails {\n items {\n ... on ObjectReferenceDetails {\n name\n uid\n }\n ... on NetworkDetailsIpEq {\n value\n }\n }\n }\n }\n }\n }\n ",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Update Network Group",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation {\n updateNetworkGroup(\n baseInput: {\n uid: \"<Enter uid of existing Object to update>\"\n name: \"<Enter a name>\"\n description: \"<Enter a description>\"\n }\n networkGroupInput: {\n ipAddresses: [{ value: \"6.9.6.9\" }, { value: \"7.0.0.0\" }]\n objectReferences: [\n {\n uid: \"<Enter the uid of another network group (or object) here>\"\n name: \"<Enter the name of that Object here>\"\n type: NETWORK_GROUP # or NETWORK_OBJECT\n }\n ]\n }\n ) {\n name\n uid\n description\n details {\n ... on NetworkDetailsIpEq {\n value\n }\n ... on NetworkDetailsIpRange {\n start\n end\n }\n ... on NetworkGroupDetails {\n items {\n ... on NetworkDetailsBase {\n wildcardMask\n }\n ... on NetworkDetailsIpEq {\n value\n }\n ... on ObjectReferenceDetails {\n name\n uid\n type\n }\n }\n }\n }\n }\n }",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Update Object",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation {\n updateNetworkObject(\n baseInput: { uid: \"<Enter the uid of the Object you want to update>\" }\n ipAddressRangeInput: { start: \"6.9.6.9\", end: \"9.6.9.7\" }\n ) {\n name\n uid\n objectType\n description\n details {\n ... on NetworkDetailsIpEq {\n value\n }\n ... on NetworkDetailsIpRange {\n start\n end\n }\n }\n }\n createNetworkObject(\n baseInput: { name: \"I <3 CDO\", deviceType: FTD }\n ipAddressEqInput: { value: \"1.1.1.1\" }\n ) {\n name\n uid\n objectType\n details {\n ... on NetworkDetailsIpEq {\n value\n }\n \n # In this case, this fragment should not occur as we create it with ipAddressEqInput\n ... on NetworkDetailsIpRange {\n start\n end\n }\n }\n }\n }",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Query Tenant Settings",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query {\n tenantSettings {\n uid\n enableChangeRequestTracking\n lastUpdatedDate\n preventCiscoSupportFromViewingTenant\n autoDetectRuleSets\n autoAcceptDeviceChanges\n allowDeploymentScheduling\n }\n }",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Update Tenant Settings",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation {\n updateTenantSettings(\n input: {\n enableChangeRequestTracking: true\n autoAcceptDeviceChanges: true\n allowDeploymentScheduling: true\n preventCiscoSupportFromViewingTenant: false\n }\n ) {\n uid\n enableChangeRequestTracking\n lastUpdatedDate\n preventCiscoSupportFromViewingTenant\n autoDetectRuleSets\n autoAcceptDeviceChanges\n allowDeploymentScheduling\n }\n }",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Query Change Requests",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query {\n activeChangeRequest\n \n changeRequests(\n limit: 5\n sortField: CREATED_DATE\n sortOrder: ASC\n ) {\n metadata {\n count\n }\n items {\n uid\n name\n description\n createdDate\n lastUpdatedDate\n }\n }\n}",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
},
{
"name": "Update Change Requests",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation {\n createChangeRequest(\n input: {\n name: \"<Enter a name>\"\n description: \"<Enter an optional description>\"\n }\n ) {\n uid\n description\n name\n createdDate\n lastUpdatedDate\n }\n updateChangeRequest(\n input: {\n uid: \"<Enter uid of existing change request to update>\"\n description: \"<Enter new description to give change request>\"\n }\n ) {\n uid\n description\n name\n createdDate\n lastUpdatedDate\n }\n \n deleteChangeRequest(uid: \"<Enter uid of existing change request to delete>\")\n \n clearActiveChangeRequest\n \n setActiveChangeRequest(name: \"<Enter name of change request to set as active>\")\n}",
"variables": ""
}
},
"url": {
"raw": "https://edge.us.cdo.cisco.com/api/public",
"protocol": "https",
"host": [
"edge",
"us",
"cdo",
"cisco",
"com"
],
"path": [
"api",
"public"
]
}
},
"response": []
}
]
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{api_token}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "hostname",
"value": "",
"type": "string"
},
{
"key": "api_token",
"value": "",
"type": "string"
},
{
"key": "object_id",
"value": "",
"type": "string"
}
]
}