Update Group Codes

Contents

Method PUT
URL https://{subdomain}.kintone.com/v1/groups/codes.json
Authentication Password Authentication, Session Authentication
Content-Type application/json

Permissions

Only Administrators can use this API.

For more information on Administrators, refer to the following article:
Types of Administrators (External link)

Request Parameters

Parameter Value Required Description
codes Array of Objects Yes An array of codes objects, containing data of Group codes that will be updated.
Up to 100 codes objects can be specified.
codes[].currentCode Strings Yes The Group code that will be updated.
An existing Group code must be specified.
Must be 128 characters or less. Empty strings, and characters consisting of only whitespaces are not allowed.
codes[].newCode Strings Yes The new Group code.
A Group Code that does not exist must be specified.
Must be 128 characters or less. Empty strings, and characters consisting of only whitespaces are not allowed.

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
var body = {
  'codes': [
    {
      'currentCode': 'group_code1',
      'newCode': 'group_code_new1'
    }
  ]
};

kintone.api(kintone.api.url('/v1/groups/codes.json', true), 'PUT', body, function(resp) {
  'use strict';
  // success
  console.log(resp);
}, function(error) {
  'use strict';
  // error
  console.log(error);
});

curl Sample

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$ curl -X PUT \
  https://{subdomain}.kintone.com/v1/groups/codes.json \
  -H 'Content-Type: application/json' \
  -H 'X-Cybozu-Authorization: a2ludG9uZTpkZXZlbG9wZXI=' \
  -d '{
    'codes': [
      {
        'currentCode': 'group_code1',
        'newCode': 'group_code_new1'
      }
    ]
  }'

Response Parameters

An empty JSON object will be returned.

Sample Response

1
{}

Limitations

  • It is not recommended run this API while performing the following operations on the Users & System Administration page:
    • Updates to groups on the Groups (or Roles) page
      For more information on Groups (or Roles), refer to the following article:
      Managing Groups (or Roles) (External link)
    • Importing from a file