Update Space

Updates the settings of a Space.

MethodPUT
URLhttps://{subdomain}.kintone.com/k/v1/space.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/space.json
Authentication Password Authentication, Session Authentication
Content-Typeapplication/json

Contents

Permissions

  • Only Space Administrators can use this API.

Request Parameters

If parameters are ignored in the request, the related properties will not be updated.

Parameter Value Required Description
id Integer or String Yes The Space ID.
name String The new name of the Space.
isPrivate Boolean The Private settings of the Space.
true: The Space is private.
false: The Space is not private.
fixedMember Boolean The options set for the Block users from joining or leaving the space and following or unfollowing the threads setting.
true: Users cannot join/leave the Space or follow/unfollow threads.
false: Users can join/leave the Space and follow/unfollow threads.
useMultiThread Boolean The Enable multiple threads setting.
true: The Space is a Multi-threaded Space.
false: The Space is a Single-threaded Space.
showAnnouncement Boolean The display status for the Announcement widget.
true: The Announcement widget is displayed.
false: The Announcement widget is not displayed.
showThreadList Boolean The display status for the Threads widget.
true: The Threads widget is displayed.
false: The Threads widget is not displayed.
showAppList Boolean The display status for the Apps widget.
true: The Apps widget is displayed.
false: The Apps widget is not displayed.
showMemberList Boolean The display status for the People widget.
true: The People widget is displayed.
false: The People widget is not displayed.
showRelatedLinkList Boolean The display status for the Related Apps & Spaces widget.
true: The Related Apps & Spaces widget is displayed.
false: The Related Apps & Spaces widget is not displayed.
permissions Object An object containing information of the space's permission settings.
permissions.createApp String The option set for the Only Allow Space Administrators to Create Apps setting
EVERYONE: all users can create apps.
ADMIN: only administrators can create apps.

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var body = {
  'id': 1001,
  'name': 'Space Name',
  'isPrivate': true,
  'fixedMember': true,
  'useMultiThread': true,
  'showAnnouncement': true,
  'showThreadList': true,
  'showAppList': true,
  'showMemberList': true,
  'showRelatedLinkList': true,
  'permissions': {
    'createApp': 'EVERYONE'
  }
};

kintone.api(kintone.api.url('/k/v1/space.json', true), 'PUT', 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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var body = {
  'id': 1001,
  'name': 'Space Name',
  'isPrivate': true,
  'fixedMember': true,
  'useMultiThread': true,
  'showAnnouncement': true,
  'showThreadList': true,
  'showAppList': true,
  'showMemberList': true,
  'showRelatedLinkList': true,
  'permissions': {
    'createApp': 'EVERYONE'
  },
  // CSRF TOKEN: used for all APIs that have an HTTP method of POST, PUT and DELETE on Kintone.
  '__REQUEST_TOKEN__': kintone.getRequestToken()
};

var url = 'https://{subdomain}.kintone.com/k/v1/space.json';
var xhr = new XMLHttpRequest();
xhr.open('PUT', url);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onload = function() {
  if (xhr.status === 200) {
    // success
    console.log(JSON.parse(xhr.responseText));
  } else {
    // error
    console.log(JSON.parse(xhr.responseText));
  }
};
xhr.send(JSON.stringify(body));

Response Parameters

An empty JSON object will be returned.

Sample Response

1
{}