Skip to content

$p.apiGetSite

Overview

This is a script function that allows you to obtain site information using an Ajax POST request.

In version 1.5.10.0 and later, the API key in the AI integration settings of SiteSettings is masked (********).

Limitations

1.5.10.0

  1. When run by a user who does not have the "Site Administration Permission" for the site to get (excluding Privileged Users), SiteSettings (the site settings, such as the labels and choices of the items) cannot be retrieved. This also applies to tenant managers who do not have the "Site Administration Permission". Site information such as SiteId and Title can be retrieved. In processing that refers to SiteSettings, make sure that it has a value before using it.

Syntax

JavaScript
$p.apiGetSite({
    id: <Target site ID>,
    done: <Optional Processing>,
    fail: <Optional Processing>,
    always: <Optional Processing>
});

Description Of Each Parameter

Parameter name Description Required
id Site ID to obtain ○
done API communication successful ○
fail API communication failure -
always On completion -

Usage Examples

JavaScript
$p.apiGetSite({
    id: 123,
    done: function (data) {
        console.log(data);
        console.log('Site information creation successful.');
    },
    fail: function () {
        console.log('Failed to create site information.');
    },
    always: function () {
        console.log('Site information creation is complete.');
    }
});

Supported Versions

Supported Version Details
1.5.10.0 and later Changed so that SiteSettings cannot be retrieved when run by a user without the "Site Administration Permission"