In Google Apps Script I am calling the G Suite Admin SDK Directory API using the command AdminDirectory.Groups.insert(group)
. Is this considered to be a POST request? I’m wondering because I know there are implicit ways of making POST requests where POST is not specified explicitly such as urlfetch()
. In the project that I am working on, I am trying to avoid using HTTP requests for security reasons.
I did some research online, but I am having some difficulty finding the answer to this question. I'm thinking that since a JavaScript object rather than a JSON object was passed into insert()
, it would not be considered a POST request since JSON notation is typically used when sending data to a server or retrieving data from a server. Because group
is a JavaScript object and not a JSON object, I am thinking the command AdminDirectory.Groups.insert(group)
would not be a POST request. Am I on the right track here?
For some context, here is the function I wrote to create a group:
function createAGroup() {
var group = {
email: "test-group@test.com",
name: "Test Group",
description: "This is a test group."
};
group = AdminDirectory.Groups.insert(group);
Logger.log('Group %s created.', group);
}
The function createAGroup()
created a group successfully. However, was the command AdminDirectory.Groups.insert(group)
using a POST request to create the group or not?