views:

1841

answers:

2

Hi,

Is it possible to move a MOSS subsite and content to a different site collection using the SharePoint API? For example, I would like to archive a subsite, by moving it from /teamsite/subsite1 to /teamsite/archive/subsite1. I am using MOSS 2007.

Thanks, MagicAndi.

A: 

You need to look in to the Content Deployment API, Here is one of the Class Article in the subject.

Kusek
+3  A: 

MagicAndi,

The answer is a resounding "yes." The import and export of sites within SharePoint is handled through the Content Deployment API (also known as the PRIME API). This API is responsible for providing the backing to both import/export functionality supplied through STSADM.exe; it also handles the content deployment within MOSS.

A great place to get started with the Content Deployment API is with a series of articles written by Stefan Gossner. Stefan is an escalation engineer for Microsoft, and you'd be hard pressed to find someone more knowledgeable in the practical workings of the PRIME API:

http://blogs.technet.com/stefan_gossner/archive/2007/08/30/deep-dive-into-the-sharepoint-content-deployment-and-migration-api-part-1.aspx

All parts of this six-part series are excellent, and I recommend reading them all. Parts three and four, though, get to some of the specifics of the import and export operations you indicated you'd like to implement.

I hope this helps!

Sean McDonough