RedirectServicesSaveRedirect Method Ingeniux CMS Web Services API

Creates/Updates a Redirect entry

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

public XHRServiceResponseGeneric<RedirectListing> SaveRedirect(
	RedirectInput data
)

Parameters

data
Type: RedirectInput

Object containing information to create/update a Redirect entry

///
Examples

Sample JSON input
JavaScript
{
    "data": {
        "From": "/support/contactus",
        "To": "http://www.ingeniux.com/contactus",
        "SelectedTgtIds": ["PublishingTargets/1"],
        "ID": "redirects/1"
    }
}

Return Value

Type: XHRServiceResponseGenericRedirectListing

Listing of all Redirect entries

Examples

Sample JSON return
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "Redirects": [{
            "ID": "redirects\/1",
            "Name": "redirects\/1",
            "From": "\/support\/contactus",
            "Notes": "Requested by Jane Doe. Delete after June 1, 2014",
            "SelectedTgtIDs": "PublishingTargets\/1",
            "SelectedTgtNames": "Live",
            "To": "http:\/\/www.ingeniux.com\/contactus"
        }, {
            "ID": "redirects\/2",
            "Name": "redirects\/2",
            "From": "\/support\/contactus",
            "Notes": "",
            "SelectedTgtIDs": "PublishingTargets\/33",
            "SelectedTgtNames": "Staging",
            "To": "http:\/\/test.ingeniux.com\/contactus"
        }]
    }
}
Remarks

If the "Id" property of the input parameter is not provided, we are saving a new redirect entry

See Also

Reference