Developer Function: Script: $p.apiGroupsCreate
Overview¶
This is a script function that allows you to create groups using an Ajax POST request.
Syntax¶
JavaScript¶
$p.apiGroupsCreate({
data: {
<Group information to be created>
},
done: <Optional Processing>,
fail: <Optional Processing>,
always: <Optional Processing>
});
Description Of Each Parameter¶
| Parameter name | Description | Required |
|---|---|---|
| data | Group information to be created *See additional information in the margin | No |
| done | API communication successful | Yes |
| fail | API communication failure | No |
| always | When completed | No |
*For the group information to be created, set the same parameters as when creating an "API Group". Please set the parameters by referring to the linked manual.
Usage Example¶
JavaScript¶
$p.apiGroupsCreate({
data: {
GroupName: 'Created Group Name',
Body: 'Creation group contents',
GroupMembers: [
'User,1,True',
'Dept,1,False'
],
"GroupChildren": [
"Group,1,"
]
},
done: function (data) {
console.log(data);
console.log('Group information was created successfully.');
},
fail: function (data) {
console.log('Failed to create group information.');
},
always: function (data) {
console.log('Group information creation is complete.');
}
});