Skip to content

Commit fe9a96d

Browse files
authored
Merge pull request #127996 from srikarshastry/feature/srsistla/updateUXDocs
Update polling config and paging config with updated information
2 parents e5831a9 + 78208a7 commit fe9a96d

File tree

1 file changed

+89
-16
lines changed

1 file changed

+89
-16
lines changed

articles/sentinel/data-connector-connection-rules-reference.md

Lines changed: 89 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ The request section defines how the CCF data connector sends requests to your da
354354
| ---- | ---- | ---- | ---- |
355355
| **ApiEndpoint** | True | String | URL for remote server. Defines the endpoint to pull data from. |
356356
| **RateLimitQPS** | | Integer | Defines the number of calls or queries allowed in a second. |
357+
| **RateLimitConfig** | | Object | Defines the rate limit configuration for the RESTful API. See [example](#ratelimitconfig-example). |
357358
| **QueryWindowInMin** | | Integer | Defines the available query window in minutes. Minimum is 1 minute. Default is 5 minutes.|
358359
| **HttpMethod** | | String | Defines the API method: `GET`(default) or `POST` |
359360
| **QueryTimeFormat** | | String | Defines the date and time format the endpoint (remote server) expects. The CCF uses the current date and time wherever this variable is used. Possible values are the constants: `UnixTimestamp`, `UnixTimestampInMills` or any other valid representation of date time, for example: `yyyy-MM-dd`, `MM/dd/yyyy HH:mm:ss`<br>default is ISO 8601 UTC |
@@ -395,7 +396,40 @@ Consider this example:
395396
- `QueryTimeIntervalDelimiter` = `..`
396397
- `ApiEndpoint` = `https://www.example.com`
397398

398-
The query sent to the remote server is: `https://www.example.com?interval=time:{QueryTimeFormat}..{QueryTimeFormat + QueryWindowInMin}`
399+
The query sent to the remote server is: `https://www.example.com?interval=time:{QueryTimeFormat}..{QueryTimeFormat + QueryWindowInMin}`
400+
401+
### RateLimitConfig example
402+
403+
Consider this example:
404+
- `ApiEndpoint` = `https://www.example.com`
405+
```json
406+
"rateLimitConfig": {
407+
"evaluation": {
408+
"checkMode": "OnlyWhen429"
409+
},
410+
"extraction": {
411+
"source": "CustomHeaders",
412+
"headers": {
413+
"limit": {
414+
"name": "X-RateLimit-Limit",
415+
"format": "Integer"
416+
},
417+
"remaining": {
418+
"name": "X-RateLimit-Remaining",
419+
"format": "Integer"
420+
},
421+
"reset": {
422+
"name": "X-RateLimit-RetryAfter",
423+
"format": "UnixTimeSeconds"
424+
}
425+
}
426+
},
427+
"retryStrategy": {
428+
"useResetOrRetryAfterHeaders": true
429+
}
430+
}
431+
```
432+
When the response includes rate limit headers, the connector can use this information to adjust its request rate.
399433

400434
### Request examples using Microsoft Graph as data source API
401435

@@ -466,7 +500,7 @@ For complex queries, use `QueryParametersTemplate`. This next example sends a `P
466500
Example:
467501

468502
```json
469-
request: {
503+
"request": {
470504
"apiEndpoint": "https://graph.microsoft.com/v1.0/me/messages",
471505
"httpMethod": "POST",
472506
"queryTimeFormat": "yyyy-MM-ddTHH:mm:ssZ",
@@ -512,7 +546,7 @@ A server response with JSON format is expected, with the requested data in the p
512546
"format": "json",
513547
"SuccessStatusJsonPath": "$.status",
514548
"SuccessStatusValue": "success",
515-
"IsGzipCompressed: true
549+
"IsGzipCompressed": true
516550
}
517551
```
518552

@@ -555,18 +589,20 @@ The most common paging type is when a server data source API provides URLs to th
555589
| **LinkHeaderTokenJsonPath** | False | String | Use this property to indicate where to get the value in the response body.<br><br>For example, if the data source returns the following JSON: `{ nextPage: "foo", value: [{data}]}` then `LinkHeaderTokenJsonPath` will be `$.nextPage` |
556590
| **PageSize** | False | Integer | How many events per page |
557591
| **PageSizeParameterName** | False | String | Query parameter name for the page size |
592+
| **PagingInfoPlacement** | False | String | How paging info is populated. Accepts either "QueryString" or "RequestBody" |
593+
| **PagingQueryParamOnly** | False | Boolean | If set to true, will omit all other query parameters except paging query parameters. |
558594

559595
Here are some examples:
560596

561597
```json
562-
Paging: {
598+
"paging": {
563599
"pagingType": "LinkHeader",
564600
"linkHeaderTokenJsonPath" : "$.metadata.links.next"
565601
}
566602
```
567603

568604
```json
569-
Paging: {
605+
"paging": {
570606
"pagingType" : "PersistentLinkHeader",
571607
"pageSizeParameterName" : "limit",
572608
"pageSize" : 500
@@ -587,11 +623,13 @@ Paging: {
587623
| **HasNextFlagJsonPath** | False | String | Defines the path to the HasNextPage flag attribute |
588624
| **NextPageRequestHeader** | False | String | Determines the next page header name in the request. |
589625
| **NextPageUrlQueryParametersTemplate** | False | String | Only if the connector is for Coralogix API |
626+
| **PagingInfoPlacement** | False | String | How paging info is populated. Accepts either "QueryString" or "RequestBody" |
627+
| **PagingQueryParamOnly** | False | Boolean | If set to true, will omit all other query parameters except paging query parameters. |
590628

591629
Example:
592630

593631
```json
594-
Paging: {
632+
"paging": {
595633
"pagingType" : "NextPageUrl",
596634
"nextPageTokenJsonPath" : "$.data.repository.pageInfo.endCursor",
597635
"hasNextFlagJsonPath" : "$.data.repository.pageInfo.hasNextPage",
@@ -615,19 +653,21 @@ Paging: {
615653
| **NextPageParaName** | False | string | Determines the next page name in the request. |
616654
| **HasNextFlagJsonPath** | False | string | Defines the path to a **HasNextPage** flag attribute when determining if more pages are left in the response. |
617655
| **NextPageRequestHeader** | False | string | Determines the next page header name in the request. |
656+
| **PagingInfoPlacement** | False | String | How paging info is populated. Accepts either "QueryString" or "RequestBody" |
657+
| **PagingQueryParamOnly** | False | Boolean | If set to true, will omit all other query parameters except paging query parameters. |
618658

619659
Examples:
620660

621661
```json
622-
Paging: {
662+
"paging": {
623663
"pagingType" : "NextPageToken",
624664
"nextPageRequestHeader" : "ETag",
625665
"nextPageTokenResponseHeader" : "ETag"
626666
}
627667
```
628668

629669
```json
630-
Paging: {
670+
"paging": {
631671
"pagingType" : "PersistentToken",
632672
    "nextPageParaName" : "gta",
633673
    "nextPageTokenJsonPath" : "$.alerts[-1:]._id"
@@ -643,14 +683,18 @@ Paging: {
643683
| **PageSize** | False | Integer | How many events per page |
644684
| **PageSizeParameterName** | False | String | Query parameter name for the page size |
645685
| **OffsetParaName** | False | String | The next request query parameter name. The CCF calculates the offset value for each request, (all events ingested + 1) |
686+
| **PagingInfoPlacement** | False | String | How paging info is populated. Accepts either "QueryString" or "RequestBody" |
687+
| **PagingQueryParamOnly** | False | Boolean | If set to true, will omit all other query parameters except paging query parameters. |
646688

647689
Example:
648690
```json
649-
Paging: {
650-
651-
       "pagingType": "Offset",
652-
        "offsetParaName": "offset"
653-
}
691+
"paging": {
692+
"pagingType": "Offset",
693+
"offsetParaName": "offset",
694+
"pageSize": 50,
695+
"pagingQueryParamOnly": true,
696+
"pagingInfoPlacement": "QueryString"
697+
}
654698
```
655699

656700
#### Configure CountBasedPaging
@@ -666,11 +710,13 @@ Paging: {
666710
| **TotalResultsJsonPath** | False | String | JSON path of total number of results in HTTP response payload |
667711
| **PageNumberJsonPath** | False | String | Required if totalResultsJsonPath is provided. JSON path of page number in HTTP response payload |
668712
| **PageCountJsonPath** | False | String | Required if totalResultsJsonPath is provided. JSON path of page count in HTTP response payload |
713+
| **PagingInfoPlacement** | False | String | How paging info is populated. Accepts either "QueryString" or "RequestBody" |
714+
| **PagingQueryParamOnly** | False | Boolean | If set to true, will omit all other query parameters except paging query parameters. |
669715

670716
Example:
671717

672718
```json
673-
Paging: {
719+
"paging": {
674720
"pagingType" : "CountBasedPaging",
675721
"pageNumberParaName" : "page",
676722
"pageSize" : 10,
@@ -713,8 +759,33 @@ Here's an example of all the components of the CCF data connector JSON together.
713759
"request": {
714760
"apiEndpoint": "https://rest.contoso.com/example",
715761
"rateLimitQPS": 10,
762+
"rateLimitConfig": {
763+
"evaluation": {
764+
"checkMode": "OnlyWhen429"
765+
},
766+
"extraction": {
767+
"source": "CustomHeaders",
768+
"headers": {
769+
"limit": {
770+
"name": "X-RateLimit-Limit",
771+
"format": "Integer"
772+
},
773+
"remaining": {
774+
"name": "X-RateLimit-Remaining",
775+
"format": "Integer"
776+
},
777+
"reset": {
778+
"name": "X-RateLimit-RetryAfter",
779+
"format": "UnixTimeSeconds"
780+
}
781+
}
782+
},
783+
"retryStrategy": {
784+
"useResetOrRetryAfterHeaders": true
785+
}
786+
},
716787
"queryWindowInMin": 5,
717-
"httpMethod": "GET",
788+
"httpMethod": "POST",
718789
"queryTimeFormat": "UnixTimestamp",
719790
"startTimeAttributeName": "t0",
720791
"endTimeAttributeName": "t1",
@@ -726,7 +797,9 @@ Here's an example of all the components of the CCF data connector JSON together.
726797
}
727798
},
728799
"paging": {
729-
"pagingType": "LinkHeader"
800+
"pagingType": "LinkHeader",
801+
"pagingInfoPlacement": "RequestBody",
802+
"pagingQueryParamOnly": true
730803
},
731804
"response": {
732805
"eventsJsonPaths": ["$"]

0 commit comments

Comments
 (0)