(vault().consumerRequestCounts())
- list - Consumer request counts
Get consumer request counts within a given datetime range.
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.VaultConsumerRequestCountsAllResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
VaultConsumerRequestCountsAllResponse res = sdk.vault().consumerRequestCounts().list()
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.consumerId("test_user_id")
.startDatetime("2021-05-01T12:00:00.000Z")
.endDatetime("2021-05-30T12:00:00.000Z")
.call();
if (res.consumerRequestCountsInDateRangeResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX |
consumerId |
String | ✔️ | ID of the consumer to return | test_user_id |
startDatetime |
String | ✔️ | Scopes results to requests that happened after datetime | 2021-05-01T12:00:00.000Z |
endDatetime |
String | ✔️ | Scopes results to requests that happened before datetime | 2021-05-30T12:00:00.000Z |
VaultConsumerRequestCountsAllResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |