The constructor of the Data object. This object is used for requesting data from Sitefinity.

Hierarchy

  • Data

Constructors

Properties

urlOptions: TypeOptions

Accessors

Methods

  • Executes a DELETE request to retrieve the delete all of the associated members in the relation property.

    Parameters

    Returns void

  • Executes a POST request to execute a workflow operation for single item.

    Parameters

    Returns void

  • Executes a PATCH request to update a single item.

    Example

    const data = sf.data({
    entitySet: "newsitems",
    provider: "OpenAccessDataProvider",
    culture: "en"
    });

    const newsItemUpdate = {
    "Title": 'updated news title'
    };

    data.update({
    key: '00000000-0000-0000-0000-000000000000', // key of item to update
    data: newsItemUpdate,
    saveTemp: true,
    successCb: successCb,
    failureCb: failureCb
    });

    Parameters

    Returns void

  • Executes a POST request to upload a media item.

    Example

    const data = sf.data({
    entitySet: "images"
    });
    data.upload({
    data: {
    content: "base 64 representation of the file",
    contentType: "image/jpeg",
    name: "test.jpg",
    payload: {
    Title: "Test",
    entitySet: "test"
    },
    uploadProperties: {
    ParentId: "4BA7AD46-F29B-4E65-BE17-9BF7CE5BA1FB"
    }
    },
    successCb: successCb,
    failureCb: failureCb
    });

    Parameters

    Returns void

Generated using TypeDoc