iceScrum | Import project via REST API – iceScrum

iceScrum Forums Discutez d'iceScrum

6 sujets de 1 à 6 (sur un total de 6)

  • Auteur
    Messages
  • #231716

    tziem
    Participant

    Is it possible to import a project (zip) via REST API?

    #232303

    Nicolas Noullet
    Maître des clés

    Hi,
    Not this is not possible, this is one of the very few services that are hard to offer as a web service as it is interactive (conflicts must be resolved if the projects conflicts with existing data, and the conflicts are detected only after the project has been uploaded).

    #232314

    tziem
    Participant

    Hi Nicolas,
    but you also have to deal with conflicts if you upload the zip file via the UI and this is possible.
    I’m looking for an automation process (script) where I can backup (download) an project, delete the project and upload the project again. Downloading and deleting of an project via REST API is already supported but the last step can only be done via the frontend.
    It would be nice if I can do it also with the REST API.

    Best regards
    Thomas

    #232669

    Nicolas Noullet
    Maître des clés

    Hi Thomas,

    Yes it is possible via the UI, but the reason is that once the project is imported the UI interactively asks several questions to the user in order to resolve the conflicts. Such resolution would have to be handled by the client code and it would be way less trivial than usual REST operations and human arbitration may be needed.

    Can you tell me more about the motivation behind this usage of exports? What are you trying to achieve?

    Thanks!

    #232691

    tziem
    Participant

    Hi Nicolas,

    thank you for your response.
    I want to synchronize two server instances. Therefore I export the entiry project from the first instance as a zip file including all attachements. After that I delete the entire project from the second instance and import the exported project there.
    I did this several times in the past without any conflicts to resolve.
    My motivation is to use a script for that which runs every night.

    Best regards
    Thomas

    #233409

    Nicolas Noullet
    Maître des clés

    Thomas,

    In your case there is indeed no risk of conflict because of the data synchronization, but this is a very specific use case. If we provide an API endpoint then we must ensure that it works for the most common use cases, and in such cases conflicts may very well occur.

    Anyway, could you tell me more about the use of this server duplication? What is it used for? If the whole server is synced then it would be more efficient to sync the database and the directory structure (attachments).

6 sujets de 1 à 6 (sur un total de 6)

Le forum ‘Questions and help’ est fermé à de nouveaux sujets et réponses.