Email Groups#
get__email_groups#
Code samples
# You can also use wget
curl -X GET https://PEM-SERVER-IP/api/v14/email/groups \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Accept: application/json,
X-Auth-Token: string
}
r = requests.get(https://PEM-SERVER-IP/api/v14/email/groups, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/email/groups,
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /email/groups
Retrieve the email groups list.*
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
X-Auth-Token |
header |
string |
true |
Token of authorization |
Example responses
[
{
"id": 0,
"oid": 0,
"gid": 0,
"name": "string",
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
]
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Status 200 |
Inline |
Response Schema#
Status Code 200
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
anonymous |
false |
none |
none |
|
» id |
integer |
false |
none |
Email group ID |
» oid |
integer |
false |
none |
Email group options ID |
» gid |
integer |
false |
none |
Email group ID |
» name |
string |
false |
none |
Email group name |
» to_addr |
string |
false |
none |
Email group options receiver address |
» cc_addr |
string |
false |
none |
Email group options CC address |
» bcc_addr |
string |
false |
none |
Email group options BCC address |
» from_addr |
string |
false |
none |
Email group options sender address |
» reply_to_addr |
string |
false |
none |
Email group options reply to address |
» subject_prefix |
string |
false |
none |
Email group options subject prefix |
» from_time |
string |
false |
none |
Email group options from time to select time range for members |
» to_time |
string |
false |
none |
Email group options to time to select time range for members |
Note
This operation does not require authentication
post__email_groups#
Code samples
# You can also use wget
curl -X POST https://PEM-SERVER-IP/api/v14/email/groups \
-H Content-Type: application/json \
-H X-Auth-Token: string
import requests
headers = {
Content-Type: application/json,
X-Auth-Token: string
}
r = requests.post(https://PEM-SERVER-IP/api/v14/email/groups, headers = headers)
print(r.json())
const inputBody = {
"name": "string",
"options": [
{
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
]
};
const headers = {
Content-Type:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/email/groups,
{
method: POST,
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /email/groups
Add a new email group.*
Body parameter
{
"name": "string",
"options": [
{
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
]
}
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
X-Auth-Token |
header |
string |
true |
Token of authorization |
body |
body |
true |
none |
Example responses
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Email group created successfully |
None |
Response Schema#
Note
This operation does not require authentication
get_email_groups{email_group_id}#
Code samples
# You can also use wget
curl -X GET https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id} \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Accept: application/json,
X-Auth-Token: string
}
r = requests.get(https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id}, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id},
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /email/groups/{email_group_id}
Retrieve information for the email group, identified by the email_group_id.*
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
email_group_id |
path |
string |
true |
none |
X-Auth-Token |
header |
string |
true |
Token of authorization |
Example responses
{
"id": 0,
"oid": 0,
"gid": 0,
"name": "string",
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Status 200 |
Note
This operation does not require authentication
put_email_groups{email_group_id}#
Code samples
# You can also use wget
curl -X PUT https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id} \
-H Content-Type: application/json \
-H X-Auth-Token: string
import requests
headers = {
Content-Type: application/json,
X-Auth-Token: string
}
r = requests.put(https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id}, headers = headers)
print(r.json())
const inputBody = {
"name": "string",
"options": {
"added": [
{
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
],
"changed": [
{
"oid": 0,
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
],
"deleted": [
{
"oid": 0
}
]
}
};
const headers = {
Content-Type:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id},
{
method: PUT,
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PUT /email/groups/{email_group_id}
Update the email group information.*
Body parameter
{
"name": "string",
"options": {
"added": [
{
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
],
"changed": [
{
"oid": 0,
"to_addr": "string",
"cc_addr": "string",
"bcc_addr": "string",
"from_addr": "string",
"reply_to_addr": "string",
"subject_prefix": "string",
"from_time": "00:00:00",
"to_time": "23:59:59"
}
],
"deleted": [
{
"oid": 0
}
]
}
}
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
email_group_id |
path |
string |
true |
none |
X-Auth-Token |
header |
string |
true |
Token of authorization |
body |
body |
true |
none |
Example responses
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Excluded databases added successfully |
None |
Response Schema#
Note
This operation does not require authentication
delete_email_groups{email_group_id}#
Code samples
# You can also use wget
curl -X DELETE https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id} \
-H X-Auth-Token: string
import requests
headers = {
X-Auth-Token: string
}
r = requests.delete(https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id}, headers = headers)
print(r.json())
const headers = {
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id},
{
method: DELETE,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
DELETE /email/groups/{email_group_id}
Delete the email group.*
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
email_group_id |
path |
string |
true |
none |
X-Auth-Token |
header |
string |
true |
Token of authorization |
Example responses
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Email group deleted successfully |
None |
Response Schema#
Note
This operation does not require authentication