@Timed @ExceptionMetered @Path("/v2") @GET @Produces(APPLICATION_JSON) public Iterable<SanitizedSecret> secretListingV2(@Auth AutomationClient automationClient,@QueryParam("idx") Integer idx,@QueryParam("num") Integer num,@DefaultValue("true") @QueryParam("newestFirst") boolean newestFirst){
  if (idx != null && num != null) {
    if (idx < 0 || num < 0) {
      throw new BadRequestException("Index and num must both be positive when retrieving batched secrets!");
    }
    return secretController.getSecretsBatched(idx,num,newestFirst);
  }
  return secretController.getSanitizedSecrets(null,null);
}

@ Timed @ ExceptionMetered @ Path ( "/v2" ) @ GET @ Produces ( APPLICATION_JSON ) public Iterable < SanitizedSecret > secretListingV2 ( @ Auth AutomationClient automationClient , @ QueryParam ( "idx" ) Integer idx , @ QueryParam ( "num" ) Integer num , @ DefaultValue ( "true" ) @ QueryParam ( "newestFirst" ) boolean newestFirst ) { if ( idx != null && num != null ) { if ( idx < 0 || num < 0 ) { throw new BadRequestException ( "Index and num must both be positive when retrieving batched secrets!" ) ; } return secretController . getSecretsBatched ( idx , num , newestFirst ) ; } return secretController . getSanitizedSecrets ( null , null ) ; }
retrieve listing of secrets . if " idx " and " num " are both provided , retrieve " num " names starting at " idx " from a list of secrets ordered by creation date , with order depending on " newestfirst " ( which defaults to " true " )
