ensureAuthenticated();
URI uri = baseUri().path("staging/profiles").path(profileId).path("promote").build();
StagingPromoteRequest request = new StagingPromoteRequest();
StagingPromote data = new StagingPromote();
data.setStagedRepositoryId(stagedRepositoryId);
data.setTargetRepositoryId(targetRepositoryId);
request.setData(data);
client.post(uri, marshal(StagingPromoteRequest.class, request));
}