PublishingSystemManagerServicesCreatePubTarget Method Ingeniux CMS Web Services API

Creates a new Publishing Target

Namespace: IngeniuxCMService
Assembly: IngeniuxCMService (in IngeniuxCMService.dll) Version: 9.0.565.0 (9.0.565)
Syntax

public XHRServiceResponseGeneric<PublishingTargetSaveResult> CreatePubTarget(
	PublishingTargetSaveInput data
)

Parameters

data
Type: PublishingTargetSaveInput

Object containing the information of new Publishing Target to be created

Examples

Sample JSON input
JavaScript
{
    "data": {
        "info": {
            "newEntry": true,
            "name": "Live2",
            "rootPage": "x2",
            "pubFolder": "Live2",
            "homePageId": "x5",
            "page404Id": "",
            "structuredUrlEnabled": true,
            "id": "",
            "globalContentRoot": "",
            "transformOnPublish": false,
            "userAgent": "",
            "site": "",
            "urlExtension": "xml",
            "urlSeparator": "-",
            "forceLowerCaseURL": false,
            "autoRedirectCanonicalURL": true,
            "includeFoldersInURL": false,
            "normalizeUrlSeparators": false,
            "baseUrl": "",
            "useExternalPreviewURL": true,
            "externalPreviewURL": "DssPreview/IGXDynamicPreview",
            "iceFieldMarkupUpdateURL": "DssPreview/IGXDTICEUpdate",
            "analyticsProvider": "Ingeniux.Analytics.Google.AnalyticsDataProvider, Ingeniux.Analytics",
            "analyticsEnabled": false,
            "enableDynamicPublishing": true
        },
        "members": ["UserGroup/1", "UserGroups/1"],
        "replication": {
            "doReplication": false,
            "simultaneousReplication": false,
            "targets": []
        }
    }
}

Return Value

Type: XHRServiceResponseGenericPublishingTargetSaveResult

Object containing detailed information of newly created Publishing Target, and basic information of all Publishign Targets.

Examples

Sample JSON return
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "allowedTargets": [{
            "name": "Live",
            "id": "PublishingTargets\/1",
            "dynamicPublish": true,
            "previewUrl": "DssPreview\/IGXDynamicPreview",
            "rootPageId": "x2",
            "structuredUrlEnabled": true
        }, {
            "name": "Staging",
            "id": "PublishingTargets\/33",
            "dynamicPublish": true,
            "previewUrl": "DssPreview\/IGXDynamicPreview",
            "rootPageId": "x2",
            "structuredUrlEnabled": true
        }, {
            "name": "Staging 2",
            "id": "PublishingTargets\/34",
            "dynamicPublish": true,
            "previewUrl": "DssPreview\/IGXDynamicPreview",
            "rootPageId": "x2",
            "structuredUrlEnabled": true
        }, {
            "name": "Live2",
            "id": "PublishingTargets\/35",
            "dynamicPublish": true,
            "previewUrl": "DssPreview\/IGXDynamicPreview",
            "rootPageId": "x2",
            "structuredUrlEnabled": true
        }],
        "info": {
            "name": "Live2",
            "id": "PublishingTargets\/35",
            "rootPage": "x2",
            "rootPageName": "Site",
            "site": "",
            "transformOnPublish": false,
            "userAgent": "",
            "analytics": {
                "analyticsEnabled": false,
                "provider": null
            },
            "autoRedirectCanonicalURL": true,
            "baseUrl": "",
            "enableDynamicPublishing": true,
            "externalPreviewURL": "DssPreview\/IGXDynamicPreview",
            "forceLowerCaseURL": false,
            "globalContentRoot": "",
            "homePageId": "x5",
            "iceEnabled": true,
            "iceFieldMarkupUpdateURL": "DssPreview\/IGXDTICEUpdate",
            "includeFoldersInURL": false,
            "normalizeUrlSeparators": false,
            "page404Id": "",
            "pubFolder": "Live2",
            "structuredUrlEnabled": true,
            "urlExtension": "xml",
            "urlSeparator": "-",
            "useExternalPreviewURL": true
        },
        "replication": {
            "doReplication": false,
            "simultaneousReplication": false,
            "targetTypes": [{
                "name": "File Replication Target",
                "type": "FileReplicationTarget"
            }, {
                "name": "Secure FTP Replication Target",
                "type": "SFTPReplicationTarget"
            }, {
                "name": "FTP\/SSL Replication Target",
                "type": "FTPSReplicationTarget"
            }, {
                "name": "FTP Replication Target",
                "type": "FTPReplicationTarget"
            }],
            "targets": []
        }
    }
}
Remarks

If an existing Publishing Target with the same name or Publishing Folder path exists, returns error status

If the Root Page doesn't exist, returns error status

If Structured URL is enabled, but Structured URL home page doesn't exist, returns error status

If Global Content Root Page id is not empty, but the Page doesn't exist, returns error status

See Also

Reference