Skip to content

Commit 2fb238c

Browse files
author
nianiB9
authored
Merge pull request #148 from docusign/DEVDOCS-15800
DEVDOCS-15800 - limiting Monitoring data to 2000 items to be consistent with other launchers.
2 parents aab17f8 + ba8a094 commit 2fb238c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ For a list of code examples that use the Web Forms API, see the [How-to guides o
112112
1. Extract the Quickstart ZIP file or download or clone the code-examples-java repository.
113113
1. In your command-line environment, switch to the :
114114
`cd <Quickstart >` or `cd code-examples-java`
115-
1. Package the code: `mvn package`
115+
1. Package the code: `mvn package -Dmaven.test.skip=true`
116116
1. To configure the launcher for [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) authentication, create a copy of the file src/main/resources/application.example.json and save the copy as src/main/resources/application.json.
117117
1. Add your User ID. On the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=apiIntegratorKey) page, under **My Account Information**, copy the **User ID** GUID and save it in application.json as your `DS_TARGET_ACCOUNT_ID`.
118118
1. Add your integration key. On the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=apiIntegratorKey) page, under **Apps and Integration Keys**, choose the app to use, then select **Actions > Edit**. Under **General Info**, copy the **Integration Key** GUID and save it in application.json as your `authorization.code.grant.client.client-id`.

src/main/java/com/docusign/controller/monitor/services/GetMonitoringDataService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66
import org.json.JSONObject;
77
import org.slf4j.Logger;
88
import org.slf4j.LoggerFactory;
9+
import java.time.LocalDate;
10+
import java.time.format.DateTimeFormatter;
911

1012
public final class GetMonitoringDataService {
1113
private static final Logger LOGGER = LoggerFactory.getLogger(GetMonitoringDataService.class);
1214

1315
public static JSONArray getMonitoringData(DataSetApi datasetApi) throws Exception {
1416
// Declare variables
1517
boolean complete = false;
16-
String cursorValue = "";
18+
LocalDate cursorDate = LocalDate.now().minusYears(1);
19+
String cursorValue = cursorDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + "T00:00:00Z";
1720
JSONArray monitoringData = new JSONArray();
1821

1922
LOGGER.info("before optinos");
2023
DataSetApi.GetStreamOptions options = datasetApi.new GetStreamOptions();
24+
options.setLimit(2000);
2125

2226
// First call the endpoint with no cursor to get the first records.
2327
// After each call, save the cursor and use it to make the next

0 commit comments

Comments
 (0)