Email Groups
============

get\__email_groups
------------------

**コードサンプル**

.. code:: shell


   #  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

.. code:: python

   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())

.. code:: javascript


   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``

*メールグループリストを取得します。*

パラメーター
^^^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,承認トークン

**応答例**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "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"
     }
   ]

.. raw:: html

   </Details>

応答
^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`コマンドラインからのサーバーインストーラーの呼び出し<コマンドラインからのサーバーインストーラーの呼び出し>` ,ステータス200,Inline

レスポンススキーマ
^^^^^^^^^^^^^^^^^^

ステータスコード **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,なし
  » id,integer,false,none,メールグループID
  » oid,integer,false,none,メールグループオプションID
  » gid,integer,false,none,メールグループID
  » name,string,false,none,メールグループ名
  » to_addr,string,false,none,メールグループオプションの受信者アドレス
  » cc_addr,string,false,none,メールグループオプション CCアドレス
  » bcc_addr,string,false,none,メールグループオプション BCCアドレス
  » from_addr,string,false,none,メールグループオプションの送信者アドレス
  » reply_to_addr,string,false,none,メールグループオプションの返信先アドレス
  » subject_prefix,string,false,none,メールグループオプションの件名プレフィックス
  » from_time,string,false,none,メンバーの時間から選択した時間範囲までのメールグループオプション
  » to_time,string,false,none,メンバーの時間範囲を選択するメールグループオプション

..  Note::
   この操作には認証が必要ありません

post\__email_groups
-------------------

**コードサンプル**

.. code:: shell


   #  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

.. code:: python

   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())

.. code:: javascript

   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``

*新しいメールグループを追加します。*

**ボディパラメーター**

.. code:: json

   {
     "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"
       }
     ]
   }

.. _パラメーター-1:

パラメーター
^^^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,承認トークン
  body,body,:ref:`EmailGroupsPostData<EmailGroupsPostData>` ,true,なし

**応答例**

.. _応答-1:

応答
^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`コマンドラインからのサーバーインストーラーの呼び出し<コマンドラインからのサーバーインストーラーの呼び出し>` ,電子メールグループが正常に作成されました,None

.. _レスポンススキーマ-1:

レスポンススキーマ
^^^^^^^^^^^^^^^^^^

..  Note::
   この操作には認証が必要ありません

get\_\ *email_groups*\ {email_group_id}
---------------------------------------

**コードサンプル**

.. code:: shell


   #  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

.. code:: python

   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())

.. code:: javascript


   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}``

*email_group_idで識別される、メールグループの情報を取得します。*

.. _パラメーター-2:

パラメーター
^^^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  email_group_id,path,string,true,なし
  X-Auth-Token,header,string,true,承認トークン

**応答例**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "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"
   }

.. raw:: html

   </Details>

.. _応答-2:

応答
^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`コマンドラインからのサーバーインストーラーの呼び出し<コマンドラインからのサーバーインストーラーの呼び出し>` ,ステータス200,:ref:`メールグループ<メールグループ>` 

..  Note::
   この操作には認証が必要ありません

put\_\ *email_groups*\ {email_group_id}
---------------------------------------

**コードサンプル**

.. code:: shell


   #  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

.. code:: python

   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())

.. code:: javascript

   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}``

*メールグループ情報を更新します。*

**ボディパラメーター**

.. code:: json

   {
     "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
         }
       ]
     }
   }

.. _パラメーター-3:

パラメーター
^^^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  email_group_id,path,string,true,なし
  X-Auth-Token,header,string,true,承認トークン
  body,body,:ref:`EmailGroupsPutData<EmailGroupsPutData>` ,true,なし

**応答例**

.. _応答-3:

応答
^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`コマンドラインからのサーバーインストーラーの呼び出し<コマンドラインからのサーバーインストーラーの呼び出し>` ,除外されたデータベースが正常に追加されました,None

.. _レスポンススキーマ-2:

レスポンススキーマ
^^^^^^^^^^^^^^^^^^

..  Note::
   この操作には認証が必要ありません

delete\_\ *email_groups*\ {email_group_id}
------------------------------------------

**コードサンプル**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/email/groups/{email_group_id} \
     -H X-Auth-Token: string

.. code:: python

   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())

.. code:: javascript


   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}``

*メールグループを削除します。*

.. _パラメーター-4:

パラメーター
^^^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  email_group_id,path,string,true,なし
  X-Auth-Token,header,string,true,承認トークン

**応答例**

.. _応答-4:

応答
^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`コマンドラインからのサーバーインストーラーの呼び出し<コマンドラインからのサーバーインストーラーの呼び出し>` ,電子メールグループは正常に削除されました,None

.. _レスポンススキーマ-3:

レスポンススキーマ
^^^^^^^^^^^^^^^^^^

..  Note::
   この操作には認証が必要ありません
