Moving Folder across Servers via API

Is it possible to move folders across different Servers via API?

We have a Test Server and a Production Server, our goal is to create a utility which will allow a user to move a folder from test -> prod via API. I just don't know if it's possible.

Thanks,

Nikku

Parents Reply Children
  • Hi @Nikku,

    As to your observation regarding references to objects in other folders, there is per se no need to "fix the reference". In the default case, the object in question is referenced by a GUID, and in which folder it resides does not matter (if you move stuff around in the folder tree things will still work just fine).

    You are correct in that there is no guarantee that everything you need to successfully publish a publication actually resides in a certain folder. Really the only way to address that is to start from the Maps folder, parse each map recursively to ensure you have enumerated all objects. Next you would have to parse all of the objects to ensure you move over all conref targets. But you can find the information you need more conveniently from metadata fields, too. The notes below are from my mindmap, so check the offical documentation to ensure you get what you expect. Of course, for each object that needs to be moved over all versions and languages (potentially) need to be addressed. When you move over an object, it does not matter if you create version 3 first, then version 2 and so on, as long as there are no clashes.

    Observations on metadata fields

       FISHHYPERLINKS

           these are <XREF> @href attribute values

       FISHLINKS

           these are @href attribute values e.g. on

               @conref

               <topicref>

       FISHTARGETS

           elements with @id attributes - which can serve as link targets

           includes the id of the current module

       FISHFRAGMENTLINKS

           the topicid#rootelementid part of a conref target

    Variables need to be resolved, too. I.e. you also need to ensure any publication resources are moved over.

    Publications will give you the most exercise, for sure. You have to recreate the baselines. You have to set the resources. The publishing context, <features> XML stored in FISHPUBCONTEXT, need to be copied over.

    Fore sure there are more issues than I could think of just now off the top of my head. 

    I would appreciate it if you let us know how you get on with this. Always interesting to know what others are tinkering with.

    Joakim