Create an iteration using java api

One answer

Found it... If somebody else is still looking for it
IProcessItemService service= (IProcessItemService) repo.getClientLibrary(IProcessItemService.class);
IIteration newIteration = (IIteration) IIteration.ITEM_TYPE.createItem();
newIteration.setName("Ssdfecowsdfnd Iteration");
newIteration.setId("193");
IDevelopmentLine workingDevLine = (IDevelopmentLine) devLine.getWorkingCopy();
workingDevLine.addIteration((IIterationHandle) newIteration.getItemHandle());
newIteration.setDevelopmentLine(workingDevLine);
service.save(new IProcessItem[] { workingDevLine, newIteration }, monitor);