Get Per Record Notification Settings

Gets the Per Record Notification settings of the App.

MethodGET
URLhttps://{subdomain}.kintone.com/k/v1/app/notifications/perRecord.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/app/notifications/perRecord.json
AuthenticationAPI Token Authentication , Password Authentication
Content-Typeapplication/json (not needed if specifying the query with a query string)

Contents

Pre-live settings

Apps may hold pre-live settings that have not yet been deployed to the live app.
Access the pre-live settings with the below URL.

URL https://{subdomain}.kintone.com/k/v1/preview/app/notifications/perRecord.json
URL(guest space) https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/preview/app/notifications/perRecord.json

Permissions

  • App Management Permissions are needed.

Request Parameters

Parameter Value Required Description
app Integer or String Yes The App ID.
lang String   The localized language to retrieve the data in:
- default: retrieves the default names
- en: retrieves the localized English names
- zh: retrieves the localized Chinese names
- ja: retrieves the localized Japanese names
- user: retrieves the localized names in the same language as the language setting* set on the user used for the authentication.
If ignored, the default names will be retrieved.

*If the user language setting is set to “Use Web browser settings”, the settings set in the Accept-Language header will be used. If there is no Accept-Language header, the language set in the “Localization” settings in the System Administrator’s menu will be used.

Sample Request

JavaScript (using Kintone REST API Request )

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
var body = {
  'app': kintone.app.getId(),
  'lang': 'en'
};

kintone.api(kintone.api.url('/k/v1/app/notifications/perRecord', true), 'GET', body, function(resp) {
  // success
  console.log(resp);
}, function(error) {
  // error
  console.log(error);
});

XMLHttpRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
var appId = kintone.app.getId();
var url = 'https://{subdomain}.kintone.com/k/v1/app/notifications/perRecord.json?app=' + appId + '&lang=en';

var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.onload = function() {
  if (xhr.status === 200) {
    // success
    console.log(JSON.parse(xhr.responseText));
  } else {
    // error
    console.log(JSON.parse(xhr.responseText));
  }
};
xhr.send();

Response Parameters

Parameter Type Description
notifications Array An array of objects containing data of the Per Record Notification settings.
notifications[].filterCond String The record’s filter condition in query string format.
For more information, refer to the Sample Requests (Query String) section.
notifications[].title String The notification subject that is saved under “Summary”.
notifications[].targets Array An array of objects containing the recipients of the Per Record Notification.
notifications[].targets[].entity Object An object containing entity details per recipient of the Per Record Notification.
notifications[].targets[].entity.type String The type of the entity the Per Record Notification settings are configured to.
- USER: User
- GROUP: Group
- ORGANIZATION: Department
- FIELD_ENTITY: Created By, Updated By, User Selection, Group Selection, and Department Selection Fields
notifications[].targets[].entity.code String The code of the entity the Per Record Notification settings are configured to. The following entities will return the following values:
- FIELD_ENTITY: The field code of the field
- For all other entities: The code of the User, Group, or Department
For guest users, the login name is preceded by guest/.
notifications[].targets[].includeSubs Boolean The “Include affiliated departments” setting of the Department.
Will always return false unless the notifications[].targets[].entity.type is set to ORGANIZATION or FIELD_ENTITY for a Department Selection Field.
- true: Affiliated departments do inherit the Per Record Notification settings
- false: Affiliated departments do not inherit the Per Record Notification settings
revision String The revision number of the App settings.

Sample Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "notifications": [
    {
      "filterCond": "User_selection in (\" USER\", \"user1\")",
      "title": "user1 was selected",
      "targets": [
        {
          "entity": {
            "type": "USER",
            "code": "user1"
          },
          "includeSubs": false
        }
      ]
    }
  ],
  "revision": "2"
}