@censys/platform-sdk 0.4.3 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/FUNCTIONS.md +0 -1
  2. package/README.md +17 -2
  3. package/docs/sdks/collections/README.md +12 -6
  4. package/docs/sdks/globaldata/README.md +260 -6
  5. package/docs/sdks/threathunting/README.md +335 -0
  6. package/examples/globalDataSearch.example.ts +0 -1
  7. package/examples/package-lock.json +5 -6
  8. package/funcs/globalDataCreateTrackedScan.d.ts +18 -0
  9. package/funcs/globalDataCreateTrackedScan.d.ts.map +1 -0
  10. package/funcs/globalDataCreateTrackedScan.js +132 -0
  11. package/funcs/globalDataCreateTrackedScan.js.map +1 -0
  12. package/funcs/globalDataGetTrackedScan.d.ts +19 -0
  13. package/funcs/globalDataGetTrackedScan.d.ts.map +1 -0
  14. package/funcs/globalDataGetTrackedScan.js +137 -0
  15. package/funcs/globalDataGetTrackedScan.js.map +1 -0
  16. package/funcs/globalDataGetTrackedScanThreatHunting.d.ts +19 -0
  17. package/funcs/globalDataGetTrackedScanThreatHunting.d.ts.map +1 -0
  18. package/funcs/globalDataGetTrackedScanThreatHunting.js +137 -0
  19. package/funcs/globalDataGetTrackedScanThreatHunting.js.map +1 -0
  20. package/funcs/threatHuntingCreateTrackedScan.d.ts +18 -0
  21. package/funcs/threatHuntingCreateTrackedScan.d.ts.map +1 -0
  22. package/funcs/threatHuntingCreateTrackedScan.js +129 -0
  23. package/funcs/threatHuntingCreateTrackedScan.js.map +1 -0
  24. package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +18 -0
  25. package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts.map +1 -0
  26. package/funcs/threatHuntingGetHostObservationsWithCertificate.js +141 -0
  27. package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -0
  28. package/jsr.json +1 -1
  29. package/lib/config.d.ts +4 -4
  30. package/lib/config.js +4 -4
  31. package/models/components/elasticsearch.d.ts +3 -0
  32. package/models/components/elasticsearch.d.ts.map +1 -1
  33. package/models/components/elasticsearch.js +5 -0
  34. package/models/components/elasticsearch.js.map +1 -1
  35. package/models/components/elasticsearcherrormessage.d.ts +33 -0
  36. package/models/components/elasticsearcherrormessage.d.ts.map +1 -0
  37. package/models/components/elasticsearcherrormessage.js +73 -0
  38. package/models/components/elasticsearcherrormessage.js.map +1 -0
  39. package/models/components/hostobservationrange.d.ts +39 -0
  40. package/models/components/hostobservationrange.d.ts.map +1 -0
  41. package/models/components/hostobservationrange.js +92 -0
  42. package/models/components/hostobservationrange.js.map +1 -0
  43. package/models/components/hostobservationresponse.d.ts +34 -0
  44. package/models/components/hostobservationresponse.d.ts.map +1 -0
  45. package/models/components/hostobservationresponse.js +85 -0
  46. package/models/components/hostobservationresponse.js.map +1 -0
  47. package/models/components/httpfavicon.d.ts +5 -0
  48. package/models/components/httpfavicon.d.ts.map +1 -1
  49. package/models/components/httpfavicon.js +4 -0
  50. package/models/components/httpfavicon.js.map +1 -1
  51. package/models/components/index.d.ts +14 -0
  52. package/models/components/index.d.ts.map +1 -1
  53. package/models/components/index.js +14 -0
  54. package/models/components/index.js.map +1 -1
  55. package/models/components/responseenvelopehostobservationresponse.d.ts +30 -0
  56. package/models/components/responseenvelopehostobservationresponse.d.ts.map +1 -0
  57. package/models/components/responseenvelopehostobservationresponse.js +70 -0
  58. package/models/components/responseenvelopehostobservationresponse.js.map +1 -0
  59. package/models/components/responseenvelopetrackedscan.d.ts +30 -0
  60. package/models/components/responseenvelopetrackedscan.d.ts.map +1 -0
  61. package/models/components/responseenvelopetrackedscan.js +70 -0
  62. package/models/components/responseenvelopetrackedscan.js.map +1 -0
  63. package/models/components/scansdiscoveryinputbody.d.ts +172 -0
  64. package/models/components/scansdiscoveryinputbody.d.ts.map +1 -0
  65. package/models/components/scansdiscoveryinputbody.js +233 -0
  66. package/models/components/scansdiscoveryinputbody.js.map +1 -0
  67. package/models/components/scansrescaninputbody.d.ts +214 -0
  68. package/models/components/scansrescaninputbody.d.ts.map +1 -0
  69. package/models/components/scansrescaninputbody.js +268 -0
  70. package/models/components/scansrescaninputbody.js.map +1 -0
  71. package/models/components/screenshot.d.ts +2 -0
  72. package/models/components/screenshot.d.ts.map +1 -1
  73. package/models/components/screenshot.js +11 -0
  74. package/models/components/screenshot.js.map +1 -1
  75. package/models/components/searchaggregateinputbody.d.ts +5 -0
  76. package/models/components/searchaggregateinputbody.d.ts.map +1 -1
  77. package/models/components/searchaggregateinputbody.js +4 -0
  78. package/models/components/searchaggregateinputbody.js.map +1 -1
  79. package/models/components/searchvaluecountsinputbody.d.ts +5 -0
  80. package/models/components/searchvaluecountsinputbody.d.ts.map +1 -1
  81. package/models/components/searchvaluecountsinputbody.js +2 -0
  82. package/models/components/searchvaluecountsinputbody.js.map +1 -1
  83. package/models/components/serviceid.d.ts +70 -0
  84. package/models/components/serviceid.d.ts.map +1 -0
  85. package/models/components/serviceid.js +106 -0
  86. package/models/components/serviceid.js.map +1 -0
  87. package/models/components/trackedscan.d.ts +39 -0
  88. package/models/components/trackedscan.d.ts.map +1 -0
  89. package/models/components/trackedscan.js +90 -0
  90. package/models/components/trackedscan.js.map +1 -0
  91. package/models/components/trackedscanscantarget.d.ts +39 -0
  92. package/models/components/trackedscanscantarget.d.ts.map +1 -0
  93. package/models/components/trackedscanscantarget.js +94 -0
  94. package/models/components/trackedscanscantarget.js.map +1 -0
  95. package/models/components/trackedscanscantargethostnameport.d.ts +31 -0
  96. package/models/components/trackedscanscantargethostnameport.d.ts.map +1 -0
  97. package/models/components/trackedscanscantargethostnameport.js +71 -0
  98. package/models/components/trackedscanscantargethostnameport.js.map +1 -0
  99. package/models/components/trackedscanscantargethostport.d.ts +31 -0
  100. package/models/components/trackedscanscantargethostport.d.ts.map +1 -0
  101. package/models/components/trackedscanscantargethostport.js +71 -0
  102. package/models/components/trackedscanscantargethostport.js.map +1 -0
  103. package/models/components/trackedscantask.d.ts +74 -0
  104. package/models/components/trackedscantask.d.ts.map +1 -0
  105. package/models/components/trackedscantask.js +106 -0
  106. package/models/components/trackedscantask.js.map +1 -0
  107. package/models/components/weborigin.d.ts +31 -0
  108. package/models/components/weborigin.d.ts.map +1 -0
  109. package/models/components/weborigin.js +71 -0
  110. package/models/components/weborigin.js.map +1 -0
  111. package/models/operations/index.d.ts +5 -0
  112. package/models/operations/index.d.ts.map +1 -1
  113. package/models/operations/index.js +5 -0
  114. package/models/operations/index.js.map +1 -1
  115. package/models/operations/v3globaldatascansget.d.ts +94 -0
  116. package/models/operations/v3globaldatascansget.d.ts.map +1 -0
  117. package/models/operations/v3globaldatascansget.js +157 -0
  118. package/models/operations/v3globaldatascansget.js.map +1 -0
  119. package/models/operations/v3globaldatascansrescan.d.ts +91 -0
  120. package/models/operations/v3globaldatascansrescan.d.ts.map +1 -0
  121. package/models/operations/v3globaldatascansrescan.js +157 -0
  122. package/models/operations/v3globaldatascansrescan.js.map +1 -0
  123. package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts +124 -0
  124. package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts.map +1 -0
  125. package/models/operations/v3threathuntinggethostobservationswithcertificate.js +183 -0
  126. package/models/operations/v3threathuntinggethostobservationswithcertificate.js.map +1 -0
  127. package/models/operations/v3threathuntingscansdiscovery.d.ts +91 -0
  128. package/models/operations/v3threathuntingscansdiscovery.d.ts.map +1 -0
  129. package/models/operations/v3threathuntingscansdiscovery.js +157 -0
  130. package/models/operations/v3threathuntingscansdiscovery.js.map +1 -0
  131. package/models/operations/v3threathuntingscansget.d.ts +94 -0
  132. package/models/operations/v3threathuntingscansget.d.ts.map +1 -0
  133. package/models/operations/v3threathuntingscansget.js +157 -0
  134. package/models/operations/v3threathuntingscansget.js.map +1 -0
  135. package/package.json +4 -5
  136. package/sdk/globaldata.d.ts +23 -0
  137. package/sdk/globaldata.d.ts.map +1 -1
  138. package/sdk/globaldata.js +32 -0
  139. package/sdk/globaldata.js.map +1 -1
  140. package/sdk/threathunting.d.ts +30 -0
  141. package/sdk/threathunting.d.ts.map +1 -1
  142. package/sdk/threathunting.js +42 -0
  143. package/sdk/threathunting.js.map +1 -1
  144. package/src/funcs/globalDataCreateTrackedScan.ts +185 -0
  145. package/src/funcs/globalDataGetTrackedScan.ts +191 -0
  146. package/src/funcs/globalDataGetTrackedScanThreatHunting.ts +191 -0
  147. package/src/funcs/threatHuntingCreateTrackedScan.ts +188 -0
  148. package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +201 -0
  149. package/src/lib/config.ts +4 -4
  150. package/src/models/components/elasticsearch.ts +12 -0
  151. package/src/models/components/elasticsearcherrormessage.ts +74 -0
  152. package/src/models/components/hostobservationrange.ts +99 -0
  153. package/src/models/components/hostobservationresponse.ts +91 -0
  154. package/src/models/components/httpfavicon.ts +9 -0
  155. package/src/models/components/index.ts +14 -0
  156. package/src/models/components/responseenvelopehostobservationresponse.ts +83 -0
  157. package/src/models/components/responseenvelopetrackedscan.ts +74 -0
  158. package/src/models/components/scansdiscoveryinputbody.ts +385 -0
  159. package/src/models/components/scansrescaninputbody.ts +428 -0
  160. package/src/models/components/screenshot.ts +13 -0
  161. package/src/models/components/searchaggregateinputbody.ts +9 -0
  162. package/src/models/components/searchvaluecountsinputbody.ts +7 -0
  163. package/src/models/components/serviceid.ts +116 -0
  164. package/src/models/components/trackedscan.ts +101 -0
  165. package/src/models/components/trackedscanscantarget.ts +117 -0
  166. package/src/models/components/trackedscanscantargethostnameport.ts +73 -0
  167. package/src/models/components/trackedscanscantargethostport.ts +72 -0
  168. package/src/models/components/trackedscantask.ts +114 -0
  169. package/src/models/components/weborigin.ts +66 -0
  170. package/src/models/operations/index.ts +5 -0
  171. package/src/models/operations/v3globaldatascansget.ts +232 -0
  172. package/src/models/operations/v3globaldatascansrescan.ts +229 -0
  173. package/src/models/operations/v3threathuntinggethostobservationswithcertificate.ts +315 -0
  174. package/src/models/operations/v3threathuntingscansdiscovery.ts +238 -0
  175. package/src/models/operations/v3threathuntingscansget.ts +232 -0
  176. package/src/sdk/globaldata.ts +56 -0
  177. package/src/sdk/threathunting.ts +77 -0
package/FUNCTIONS.md CHANGED
@@ -36,7 +36,6 @@ async function run() {
36
36
  "host.ip",
37
37
  ],
38
38
  pageSize: 1,
39
- pageToken: "<next_page_token>",
40
39
  query: "host.services: (protocol=SSH and not port: 22)",
41
40
  },
42
41
  });
package/README.md CHANGED
@@ -96,7 +96,6 @@ async function run() {
96
96
  "host.ip",
97
97
  ],
98
98
  pageSize: 1,
99
- pageToken: "<next_page_token>",
100
99
  query: "host.services: (protocol=SSH and not port: 22)",
101
100
  },
102
101
  });
@@ -135,12 +134,19 @@ run();
135
134
  * [getHostTimeline](docs/sdks/globaldata/README.md#gethosttimeline) - Get host event history
136
135
  * [getWebProperties](docs/sdks/globaldata/README.md#getwebproperties) - Get multiple web properties
137
136
  * [getWebProperty](docs/sdks/globaldata/README.md#getwebproperty) - Get a web property
137
+ * [createTrackedScan](docs/sdks/globaldata/README.md#createtrackedscan) - Create a tracked rescan
138
+ * [getTrackedScan](docs/sdks/globaldata/README.md#gettrackedscan) - Get tracked scan details
138
139
  * [aggregate](docs/sdks/globaldata/README.md#aggregate) - Aggregate results for a search query
139
140
  * [search](docs/sdks/globaldata/README.md#search) - Run a search query
141
+ * [getTrackedScanThreatHunting](docs/sdks/globaldata/README.md#gettrackedscanthreathunting) - Get tracked scan details
140
142
 
141
143
 
142
144
  ### [threatHunting](docs/sdks/threathunting/README.md)
143
145
 
146
+ * [getTrackedScan](docs/sdks/threathunting/README.md#gettrackedscan) - Get tracked scan details
147
+ * [getHostObservationsWithCertificate](docs/sdks/threathunting/README.md#gethostobservationswithcertificate) - Get Host Observations With Certificate
148
+ * [createTrackedScan](docs/sdks/threathunting/README.md#createtrackedscan) - Create a tracked discovery scan
149
+ * [getTrackedScanThreatHunting](docs/sdks/threathunting/README.md#gettrackedscanthreathunting) - Get tracked scan details
144
150
  * [valueCounts](docs/sdks/threathunting/README.md#valuecounts) - CensEye: Retrieve value counts to discover pivots
145
151
 
146
152
  </details>
@@ -170,14 +176,21 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
170
176
  - [`collectionsSearch`](docs/sdks/collections/README.md#search) - Run a search query within a collection
171
177
  - [`collectionsUpdate`](docs/sdks/collections/README.md#update) - Update a collection
172
178
  - [`globalDataAggregate`](docs/sdks/globaldata/README.md#aggregate) - Aggregate results for a search query
179
+ - [`globalDataCreateTrackedScan`](docs/sdks/globaldata/README.md#createtrackedscan) - Create a tracked rescan
173
180
  - [`globalDataGetCertificate`](docs/sdks/globaldata/README.md#getcertificate) - Get a certificate
174
181
  - [`globalDataGetCertificates`](docs/sdks/globaldata/README.md#getcertificates) - Get multiple certificates
175
182
  - [`globalDataGetHost`](docs/sdks/globaldata/README.md#gethost) - Get a host
176
183
  - [`globalDataGetHosts`](docs/sdks/globaldata/README.md#gethosts) - Get multiple hosts
177
184
  - [`globalDataGetHostTimeline`](docs/sdks/globaldata/README.md#gethosttimeline) - Get host event history
185
+ - [`globalDataGetTrackedScan`](docs/sdks/globaldata/README.md#gettrackedscan) - Get tracked scan details
186
+ - [`globalDataGetTrackedScan`](docs/sdks/threathunting/README.md#gettrackedscan) - Get tracked scan details
187
+ - [`globalDataGetTrackedScanThreatHunting`](docs/sdks/globaldata/README.md#gettrackedscanthreathunting) - Get tracked scan details
188
+ - [`globalDataGetTrackedScanThreatHunting`](docs/sdks/threathunting/README.md#gettrackedscanthreathunting) - Get tracked scan details
178
189
  - [`globalDataGetWebProperties`](docs/sdks/globaldata/README.md#getwebproperties) - Get multiple web properties
179
190
  - [`globalDataGetWebProperty`](docs/sdks/globaldata/README.md#getwebproperty) - Get a web property
180
191
  - [`globalDataSearch`](docs/sdks/globaldata/README.md#search) - Run a search query
192
+ - [`threatHuntingCreateTrackedScan`](docs/sdks/threathunting/README.md#createtrackedscan) - Create a tracked discovery scan
193
+ - [`threatHuntingGetHostObservationsWithCertificate`](docs/sdks/threathunting/README.md#gethostobservationswithcertificate) - Get Host Observations With Certificate
181
194
  - [`threatHuntingValueCounts`](docs/sdks/threathunting/README.md#valuecounts) - CensEye: Retrieve value counts to discover pivots
182
195
 
183
196
  </details>
@@ -353,7 +366,7 @@ run();
353
366
  ### Error Classes
354
367
  **Primary errors:**
355
368
  * [`SDKBaseError`](./src/models/errors/sdkbaseerror.ts): The base class for HTTP error responses.
356
- * [`ErrorModel`](./src/models/errors/errormodel.ts): Request does not contain a valid Authorization token.
369
+ * [`ErrorModel`](./src/models/errors/errormodel.ts): Request does not contain a valid Authorization token. *
357
370
 
358
371
  <details><summary>Less common errors (6)</summary>
359
372
 
@@ -371,6 +384,8 @@ run();
371
384
  * [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
372
385
 
373
386
  </details>
387
+
388
+ \* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
374
389
  <!-- End Error Handling [errors] -->
375
390
 
376
391
  <!-- Start Server Selection [server] -->
@@ -22,6 +22,7 @@ List all collections for an organization. Retrieved information includes collect
22
22
 
23
23
  ### Example Usage
24
24
 
25
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-crud-list" method="get" path="/v3/collections" -->
25
26
  ```typescript
26
27
  import { SDK } from "@censys/platform-sdk";
27
28
 
@@ -99,6 +100,7 @@ Create a new collection.
99
100
 
100
101
  ### Example Usage
101
102
 
103
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-crud-create" method="post" path="/v3/collections" -->
102
104
  ```typescript
103
105
  import { SDK } from "@censys/platform-sdk";
104
106
 
@@ -182,6 +184,7 @@ Delete a collection.
182
184
 
183
185
  ### Example Usage
184
186
 
187
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-crud-delete" method="delete" path="/v3/collections/{collection_uid}" -->
185
188
  ```typescript
186
189
  import { SDK } from "@censys/platform-sdk";
187
190
 
@@ -257,6 +260,7 @@ Retrieve information about a collection. Retrieved information includes its name
257
260
 
258
261
  ### Example Usage
259
262
 
263
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-crud-get" method="get" path="/v3/collections/{collection_uid}" -->
260
264
  ```typescript
261
265
  import { SDK } from "@censys/platform-sdk";
262
266
 
@@ -332,6 +336,7 @@ Update a collection's name, description, and/or query.
332
336
 
333
337
  ### Example Usage
334
338
 
339
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-crud-update" method="put" path="/v3/collections/{collection_uid}" -->
335
340
  ```typescript
336
341
  import { SDK } from "@censys/platform-sdk";
337
342
 
@@ -417,6 +422,7 @@ Retrieve the event history for a collection. This includes the addition or remov
417
422
 
418
423
  ### Example Usage
419
424
 
425
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-list-events" method="get" path="/v3/collections/{collection_uid}/events" -->
420
426
  ```typescript
421
427
  import { SDK } from "@censys/platform-sdk";
422
428
 
@@ -500,6 +506,7 @@ Aggregate results for a Platform search query that targets a collection's assets
500
506
 
501
507
  ### Example Usage
502
508
 
509
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-search-aggregate" method="post" path="/v3/collections/{collection_uid}/search/aggregate" -->
503
510
  ```typescript
504
511
  import { SDK } from "@censys/platform-sdk";
505
512
 
@@ -512,9 +519,9 @@ async function run() {
512
519
  const result = await sdk.collections.aggregate({
513
520
  collectionUid: "11111111-2222-3333-4444-555555555555",
514
521
  searchAggregateInputBody: {
515
- field: "web.endpoints.http.html_title",
522
+ field: "host.services.port",
516
523
  numberOfBuckets: 100,
517
- query: "web: *",
524
+ query: "host.services.protocol=SSH",
518
525
  },
519
526
  });
520
527
 
@@ -543,9 +550,9 @@ async function run() {
543
550
  const res = await collectionsAggregate(sdk, {
544
551
  collectionUid: "11111111-2222-3333-4444-555555555555",
545
552
  searchAggregateInputBody: {
546
- field: "web.endpoints.http.html_title",
553
+ field: "host.services.port",
547
554
  numberOfBuckets: 100,
548
- query: "web: *",
555
+ query: "host.services.protocol=SSH",
549
556
  },
550
557
  });
551
558
  if (res.ok) {
@@ -585,6 +592,7 @@ Run a search query across a collection's assets. Reference the [documentation on
585
592
 
586
593
  ### Example Usage
587
594
 
595
+ <!-- UsageSnippet language="typescript" operationID="v3-collections-search-query" method="post" path="/v3/collections/{collection_uid}/search/query" -->
588
596
  ```typescript
589
597
  import { SDK } from "@censys/platform-sdk";
590
598
 
@@ -601,7 +609,6 @@ async function run() {
601
609
  "host.ip",
602
610
  ],
603
611
  pageSize: 1,
604
- pageToken: "<next_page_token>",
605
612
  query: "host.services: (protocol=SSH and not port: 22)",
606
613
  },
607
614
  });
@@ -635,7 +642,6 @@ async function run() {
635
642
  "host.ip",
636
643
  ],
637
644
  pageSize: 1,
638
- pageToken: "<next_page_token>",
639
645
  query: "host.services: (protocol=SSH and not port: 22)",
640
646
  },
641
647
  });
@@ -14,8 +14,11 @@ Endpoints related to the Global Data product
14
14
  * [getHostTimeline](#gethosttimeline) - Get host event history
15
15
  * [getWebProperties](#getwebproperties) - Get multiple web properties
16
16
  * [getWebProperty](#getwebproperty) - Get a web property
17
+ * [createTrackedScan](#createtrackedscan) - Create a tracked rescan
18
+ * [getTrackedScan](#gettrackedscan) - Get tracked scan details
17
19
  * [aggregate](#aggregate) - Aggregate results for a search query
18
20
  * [search](#search) - Run a search query
21
+ * [getTrackedScanThreatHunting](#gettrackedscanthreathunting) - Get tracked scan details
19
22
 
20
23
  ## getCertificates
21
24
 
@@ -23,6 +26,7 @@ Retrieve information about multiple certificates. A certificate ID is its SHA-25
23
26
 
24
27
  ### Example Usage
25
28
 
29
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-asset-certificate-list" method="get" path="/v3/global/asset/certificate" -->
26
30
  ```typescript
27
31
  import { SDK } from "@censys/platform-sdk";
28
32
 
@@ -102,6 +106,7 @@ Retrieve information about a single certificate. A certificate ID is its SHA-256
102
106
 
103
107
  ### Example Usage
104
108
 
109
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-asset-certificate" method="get" path="/v3/global/asset/certificate/{certificate_id}" -->
105
110
  ```typescript
106
111
  import { SDK } from "@censys/platform-sdk";
107
112
 
@@ -177,6 +182,7 @@ Retrieve information about multiple hosts. A host ID is its IP address.
177
182
 
178
183
  ### Example Usage
179
184
 
185
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-asset-host-list" method="get" path="/v3/global/asset/host" -->
180
186
  ```typescript
181
187
  import { SDK } from "@censys/platform-sdk";
182
188
 
@@ -256,6 +262,7 @@ Retrieve information about a single host. A host ID is its IP address.
256
262
 
257
263
  ### Example Usage
258
264
 
265
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-asset-host" method="get" path="/v3/global/asset/host/{host_id}" -->
259
266
  ```typescript
260
267
  import { SDK } from "@censys/platform-sdk";
261
268
 
@@ -333,6 +340,7 @@ Retrieve event history for a host. A host ID is its IP address.
333
340
 
334
341
  ### Example Usage
335
342
 
343
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-asset-host-timeline" method="get" path="/v3/global/asset/host/{host_id}/timeline" -->
336
344
  ```typescript
337
345
  import { SDK } from "@censys/platform-sdk";
338
346
 
@@ -412,6 +420,7 @@ Retrieve information about multiple web properties. Web properties are identifie
412
420
 
413
421
  ### Example Usage
414
422
 
423
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-asset-webproperty-list" method="get" path="/v3/global/asset/webproperty" -->
415
424
  ```typescript
416
425
  import { SDK } from "@censys/platform-sdk";
417
426
 
@@ -491,6 +500,7 @@ Retrieve information about a single web property. Web properties are identified
491
500
 
492
501
  ### Example Usage
493
502
 
503
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-asset-webproperty" method="get" path="/v3/global/asset/webproperty/{webproperty_id}" -->
494
504
  ```typescript
495
505
  import { SDK } from "@censys/platform-sdk";
496
506
 
@@ -562,12 +572,180 @@ run();
562
572
  | errors.ErrorModel | 401, 403 | application/problem+json |
563
573
  | errors.SDKError | 4XX, 5XX | \*/\* |
564
574
 
575
+ ## createTrackedScan
576
+
577
+ Create a new tracked rescan for a known service or web property. Rescans are used to update information for previously discovered targets. The scan will be queued. The response will contain a scan ID that you can use with the [get tracked scan details endpoint](https://docs.censys.com/reference/v3-globaldata-scans-get#/) to monitor its status and results.<br><br>This endpoint is available to all Enterprise customers.
578
+
579
+ ### Example Usage
580
+
581
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-scans-rescan" method="post" path="/v3/global/scans/rescan" -->
582
+ ```typescript
583
+ import { SDK } from "@censys/platform-sdk";
584
+
585
+ const sdk = new SDK({
586
+ organizationId: "11111111-2222-3333-4444-555555555555",
587
+ personalAccessToken: "<YOUR_BEARER_TOKEN_HERE>",
588
+ });
589
+
590
+ async function run() {
591
+ const result = await sdk.globalData.createTrackedScan({
592
+ scansRescanInputBody: {
593
+ target: {
594
+ webOrigin: {
595
+ hostname: "censys.io",
596
+ port: 443,
597
+ },
598
+ },
599
+ },
600
+ });
601
+
602
+ console.log(result);
603
+ }
604
+
605
+ run();
606
+ ```
607
+
608
+ ### Standalone function
609
+
610
+ The standalone function version of this method:
611
+
612
+ ```typescript
613
+ import { SDKCore } from "@censys/platform-sdk/core.js";
614
+ import { globalDataCreateTrackedScan } from "@censys/platform-sdk/funcs/globalDataCreateTrackedScan.js";
615
+
616
+ // Use `SDKCore` for best tree-shaking performance.
617
+ // You can create one instance of it to use across an application.
618
+ const sdk = new SDKCore({
619
+ organizationId: "11111111-2222-3333-4444-555555555555",
620
+ personalAccessToken: "<YOUR_BEARER_TOKEN_HERE>",
621
+ });
622
+
623
+ async function run() {
624
+ const res = await globalDataCreateTrackedScan(sdk, {
625
+ scansRescanInputBody: {
626
+ target: {
627
+ webOrigin: {
628
+ hostname: "censys.io",
629
+ port: 443,
630
+ },
631
+ },
632
+ },
633
+ });
634
+ if (res.ok) {
635
+ const { value: result } = res;
636
+ console.log(result);
637
+ } else {
638
+ console.log("globalDataCreateTrackedScan failed:", res.error);
639
+ }
640
+ }
641
+
642
+ run();
643
+ ```
644
+
645
+ ### Parameters
646
+
647
+ | Parameter | Type | Required | Description |
648
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
649
+ | `request` | [operations.V3GlobaldataScansRescanRequest](../../models/operations/v3globaldatascansrescanrequest.md) | :heavy_check_mark: | The request object to use for the request. |
650
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
651
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
652
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
653
+
654
+ ### Response
655
+
656
+ **Promise\<[operations.V3GlobaldataScansRescanResponse](../../models/operations/v3globaldatascansrescanresponse.md)\>**
657
+
658
+ ### Errors
659
+
660
+ | Error Type | Status Code | Content Type |
661
+ | ------------------------ | ------------------------ | ------------------------ |
662
+ | errors.ErrorModel | 401, 403 | application/problem+json |
663
+ | errors.SDKError | 4XX, 5XX | \*/\* |
664
+
665
+ ## getTrackedScan
666
+
667
+ Retrieve the current status and results of a tracked scan by its ID.
668
+ This endpoint works for both discovery scans and rescans.
669
+
670
+ ### Example Usage
671
+
672
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-scans-get" method="get" path="/v3/global/scans/{scan_id}" -->
673
+ ```typescript
674
+ import { SDK } from "@censys/platform-sdk";
675
+
676
+ const sdk = new SDK({
677
+ organizationId: "11111111-2222-3333-4444-555555555555",
678
+ personalAccessToken: "<YOUR_BEARER_TOKEN_HERE>",
679
+ });
680
+
681
+ async function run() {
682
+ const result = await sdk.globalData.getTrackedScan({
683
+ scanId: "5f39588f-d4c5-48e5-8894-0bb5918c28fa",
684
+ });
685
+
686
+ console.log(result);
687
+ }
688
+
689
+ run();
690
+ ```
691
+
692
+ ### Standalone function
693
+
694
+ The standalone function version of this method:
695
+
696
+ ```typescript
697
+ import { SDKCore } from "@censys/platform-sdk/core.js";
698
+ import { globalDataGetTrackedScan } from "@censys/platform-sdk/funcs/globalDataGetTrackedScan.js";
699
+
700
+ // Use `SDKCore` for best tree-shaking performance.
701
+ // You can create one instance of it to use across an application.
702
+ const sdk = new SDKCore({
703
+ organizationId: "11111111-2222-3333-4444-555555555555",
704
+ personalAccessToken: "<YOUR_BEARER_TOKEN_HERE>",
705
+ });
706
+
707
+ async function run() {
708
+ const res = await globalDataGetTrackedScan(sdk, {
709
+ scanId: "5f39588f-d4c5-48e5-8894-0bb5918c28fa",
710
+ });
711
+ if (res.ok) {
712
+ const { value: result } = res;
713
+ console.log(result);
714
+ } else {
715
+ console.log("globalDataGetTrackedScan failed:", res.error);
716
+ }
717
+ }
718
+
719
+ run();
720
+ ```
721
+
722
+ ### Parameters
723
+
724
+ | Parameter | Type | Required | Description |
725
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
726
+ | `request` | [operations.V3GlobaldataScansGetRequest](../../models/operations/v3globaldatascansgetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
727
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
728
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
729
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
730
+
731
+ ### Response
732
+
733
+ **Promise\<[operations.V3GlobaldataScansGetResponse](../../models/operations/v3globaldatascansgetresponse.md)\>**
734
+
735
+ ### Errors
736
+
737
+ | Error Type | Status Code | Content Type |
738
+ | ------------------------ | ------------------------ | ------------------------ |
739
+ | errors.ErrorModel | 401, 403 | application/problem+json |
740
+ | errors.SDKError | 4XX, 5XX | \*/\* |
741
+
565
742
  ## aggregate
566
743
 
567
744
  Aggregate results for a Platform search query. This functionality is equivalent to the [Report Builder](https://docs.censys.com/docs/platform-report-builder#/) in the Platform web UI.
568
745
 
569
746
  ### Example Usage
570
747
 
748
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-search-aggregate" method="post" path="/v3/global/search/aggregate" -->
571
749
  ```typescript
572
750
  import { SDK } from "@censys/platform-sdk";
573
751
 
@@ -579,9 +757,9 @@ const sdk = new SDK({
579
757
  async function run() {
580
758
  const result = await sdk.globalData.aggregate({
581
759
  searchAggregateInputBody: {
582
- field: "web.endpoints.http.html_title",
760
+ field: "host.services.port",
583
761
  numberOfBuckets: 100,
584
- query: "web: *",
762
+ query: "host.services.protocol=SSH",
585
763
  },
586
764
  });
587
765
 
@@ -609,9 +787,9 @@ const sdk = new SDKCore({
609
787
  async function run() {
610
788
  const res = await globalDataAggregate(sdk, {
611
789
  searchAggregateInputBody: {
612
- field: "web.endpoints.http.html_title",
790
+ field: "host.services.port",
613
791
  numberOfBuckets: 100,
614
- query: "web: *",
792
+ query: "host.services.protocol=SSH",
615
793
  },
616
794
  });
617
795
  if (res.ok) {
@@ -651,6 +829,7 @@ Run a search query across Censys data. Reference the [documentation on Censys Qu
651
829
 
652
830
  ### Example Usage
653
831
 
832
+ <!-- UsageSnippet language="typescript" operationID="v3-globaldata-search-query" method="post" path="/v3/global/search/query" -->
654
833
  ```typescript
655
834
  import { SDK } from "@censys/platform-sdk";
656
835
 
@@ -666,7 +845,6 @@ async function run() {
666
845
  "host.ip",
667
846
  ],
668
847
  pageSize: 1,
669
- pageToken: "<next_page_token>",
670
848
  query: "host.services: (protocol=SSH and not port: 22)",
671
849
  },
672
850
  });
@@ -699,7 +877,6 @@ async function run() {
699
877
  "host.ip",
700
878
  ],
701
879
  pageSize: 1,
702
- pageToken: "<next_page_token>",
703
880
  query: "host.services: (protocol=SSH and not port: 22)",
704
881
  },
705
882
  });
@@ -729,6 +906,83 @@ run();
729
906
 
730
907
  ### Errors
731
908
 
909
+ | Error Type | Status Code | Content Type |
910
+ | ------------------------ | ------------------------ | ------------------------ |
911
+ | errors.ErrorModel | 401, 403 | application/problem+json |
912
+ | errors.SDKError | 4XX, 5XX | \*/\* |
913
+
914
+ ## getTrackedScanThreatHunting
915
+
916
+ Retrieve the current status and results of a tracked scan by its ID.
917
+ This endpoint works for both discovery scans and rescans.
918
+
919
+ ### Example Usage
920
+
921
+ <!-- UsageSnippet language="typescript" operationID="v3-threathunting-scans-get" method="get" path="/v3/threat-hunting/scans/{scan_id}" -->
922
+ ```typescript
923
+ import { SDK } from "@censys/platform-sdk";
924
+
925
+ const sdk = new SDK({
926
+ organizationId: "11111111-2222-3333-4444-555555555555",
927
+ personalAccessToken: "<YOUR_BEARER_TOKEN_HERE>",
928
+ });
929
+
930
+ async function run() {
931
+ const result = await sdk.globalData.getTrackedScanThreatHunting({
932
+ scanId: "cd62e794-9f12-4c2f-b5b3-153853aaf8d9",
933
+ });
934
+
935
+ console.log(result);
936
+ }
937
+
938
+ run();
939
+ ```
940
+
941
+ ### Standalone function
942
+
943
+ The standalone function version of this method:
944
+
945
+ ```typescript
946
+ import { SDKCore } from "@censys/platform-sdk/core.js";
947
+ import { globalDataGetTrackedScanThreatHunting } from "@censys/platform-sdk/funcs/globalDataGetTrackedScanThreatHunting.js";
948
+
949
+ // Use `SDKCore` for best tree-shaking performance.
950
+ // You can create one instance of it to use across an application.
951
+ const sdk = new SDKCore({
952
+ organizationId: "11111111-2222-3333-4444-555555555555",
953
+ personalAccessToken: "<YOUR_BEARER_TOKEN_HERE>",
954
+ });
955
+
956
+ async function run() {
957
+ const res = await globalDataGetTrackedScanThreatHunting(sdk, {
958
+ scanId: "cd62e794-9f12-4c2f-b5b3-153853aaf8d9",
959
+ });
960
+ if (res.ok) {
961
+ const { value: result } = res;
962
+ console.log(result);
963
+ } else {
964
+ console.log("globalDataGetTrackedScanThreatHunting failed:", res.error);
965
+ }
966
+ }
967
+
968
+ run();
969
+ ```
970
+
971
+ ### Parameters
972
+
973
+ | Parameter | Type | Required | Description |
974
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
975
+ | `request` | [operations.V3ThreathuntingScansGetRequest](../../models/operations/v3threathuntingscansgetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
976
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
977
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
978
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
979
+
980
+ ### Response
981
+
982
+ **Promise\<[operations.V3ThreathuntingScansGetResponse](../../models/operations/v3threathuntingscansgetresponse.md)\>**
983
+
984
+ ### Errors
985
+
732
986
  | Error Type | Status Code | Content Type |
733
987
  | ------------------------ | ------------------------ | ------------------------ |
734
988
  | errors.ErrorModel | 401, 403 | application/problem+json |