Löschen zentraler Inhalte
RequestParameter: DeleteSectionRequest
ResponseParameter: DeleteSectionResponse
Mit Hilfe dieser Methode können Sie einen bestehenden zentralen Inhalt löschen.
Das Request-Objekt besitzt folgende Felder zur Steuerung der Abfrage:Section:
Der zu löschende zentrale Inhalt.
Das Response-Objekt enthält keine Information.
Beispiel Request „Löschen zentraler Inhalte“
C#
//Create an instance of the service agent
ServiceAgent agent = new ServiceAgent();
TemplateRequest templateRequest = new TemplateRequest();
templateRequest.SecurityContext = GetSecurityContext();
//Get the templates from mailworx
TemplateResponse templateResponse =
agent.GetTemplates(templateRequest);
DeleteSectionRequest updateRequest = new DeleteSectionRequest();
updateRequest.SecurityContext = GetSecurityContext();
CentralSectionRequest secRequest = new CentralSectionRequest();
secRequest.Template = templateResponse.Templates[0];
secRequest.SecurityContext = GetSecurityContext();
CentralSectionResponse secResponse =
agent.GetCentralSections(secRequest);
//select section to delete
Section secDelete = secResponse.Sections[0];
//create delete request
DeleteSectionRequest deleteRequest = new DeleteSectionRequest();
deleteRequest.SecurityContext = GetSecurityContext();
deleteRequest.Section = secDelete.Guid;
//delete central section
DeleteSectionResponse deleteResponse =
agent.DeleteCentralSection(deleteRequest);