Vault | Java SDK | General Endpoints
General Endpoints
List
getBulk(GetBulkRequest request)Retrieve a list of secrets, keys and folders.
final var filter = new HashMap<String, String>();
filter.put("folder", "/tmp");
final var response = client.getBulk(GetBulkRequest.builder().filter(filter).build());
State change
stateChange(String id, ItemVersionState state, int version, String destroyPeriod)Change the state of a specific version of a secret or key.
final var stateChangeResponse = client.stateChange("id", ItemVersionState.DEACTIVATED);
Delete
delete(String id)Delete a secret or key.
DeleteResponse deleteResponse = client.delele("id");
Retrieve
get(GetRequest request)Retrieve a secret or key, and any associated information.
GetResponse getResponse = client.get(
new GetRequest.GetRequestBuilder("id").build()
);
List
list(ListRequest request)Retrieve a list of secrets, keys and folders, and their associated information.
ListResponse listResponse = client.list(
new ListRequest.ListRequestBuilder().build()
);
Update
update(UpdateRequest request)Update information associated with a secret or key.
UpdateResponse updateResponse = client.update(
new UpdateRequest.UpdateRequestBuilder("id")
.setFolder("updated")
.build()
);