public PackingServiceActivity UnpackExperiment(WorkspaceSetting setting, string packedLocation, string sourceRegion)
{
ValidateWorkspaceSetting(setting);
Util.AuthorizationToken = setting.AuthorizationToken;
string queryUrl = StudioApi + string.Format("workspaces/{0}/packages?api-version=2.0&packageUri={1}{2}", setting.WorkspaceId, HttpUtility.UrlEncode(packedLocation), "®ion=" + sourceRegion.Replace(" ", string.Empty));
//Console.WriteLine("Unpacking: PUT " + queryUrl);
HttpResult hr = Util.HttpPut(queryUrl, string.Empty).Result;
if (hr.IsSuccess)
{
PackingServiceActivity activity = jss.Deserialize<PackingServiceActivity>(hr.Payload);
return activity;
}
throw new AmlRestApiException(hr);
}