Available in Classic and VPC
Get a list of requests to create a backup file of your email templates.
Request
The following describes the request format for the endpoint. The request format is as follows:
| Method | URI | 
|---|---|
| GET | /template/export | 
Request headers
For headers common to Cloud Outbound Mailer APIs, see Cloud Outbound Mailer request headers.
Request query parameters
The following describes the parameters.
| Field | Type | Required | Description | 
|---|---|---|---|
size | 
Integer | Optional | Number of records per page
  | 
page | 
Integer | Optional | Page index to view
  | 
sort | 
String | Optional | Sort by
  | 
Request example
The following is a sample request.
curl --location --request GET 'https://mail.apigw.ntruss.com/api/v1/template/export
?size=5
&page=0'
--header 'x-ncp-apigw-timestamp: {Timestamp}'
--header 'x-ncp-iam-access-key: {Access Key}'
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
The following describes the response format.
Response body
The following describes the response body.
| Field | Type | Required | Description | 
|---|---|---|---|
content | 
List<TemplateExportRequestResponse> | Optional | Details for the request history list | 
totalElements | 
Integer | Required | Total number of records | 
last | 
Boolean | Required | It indicates whether this is the last page | 
totalPages | 
Integer | Required | Total number of pages | 
size | 
Integer | Required | Number of records per page | 
number | 
Integer | Required | Index of the current page
  | 
sort | 
List<Sort> | Required | Sort by | 
first | 
Boolean | Required | It indicates whether this is the first page | 
numberOfElements | 
Integer | Required | Number of records in the current page | 
Response status codes
The following describes the response status codes.
| HTTP status code | Code | Description | 
|---|---|---|
| 200 | - | Request succeeded | 
| 400 | - | Authentication failed, invalid request | 
| 400 | 77101 | Error in login information | 
| 400 | 77102 | Request error | 
| 400 | 77103 | Requested resource does not exist | 
| 403 | 77201 | No permissions to the requested resource | 
| 403 | 77202 | Call from a user who hasn't subscribed to the email service | 
| 405 | 77001 | Unsupported method type | 
| 415 | 77002 | Unsupported media type | 
| 500 | - | Server error | 
| 500 | 77301 | Default project does not exist | 
| 500 | 77302 | External system API integration error | 
| 500 | 77303 | Other internal server error | 
Response example
The following is a sample response.
{
  "content": [
    {
      "sid": 1,
      "projectSid": 270294,
      "requestUtc": {
        "utc": 1576655804261,
        "formattedDate": "2019-12-18",
        "formattedDateTime": "2019-12-18 16:56:44 261"
      },
      "completeUtc": {
        "utc": 1578383178834,
        "formattedDate": "2020-01-07",
        "formattedDateTime": "2020-01-07 16:46:18 834"
      },
      "elapsedTime": "479:49:34.573",
      "statusCode": {
        "label": "Expire",
        "code": "E"
      },
      "downloadUrl": "http://localhost:7070/v1/email/templates/export/1"
    },
    {
      "sid": 11,
      "projectSid": 270294,
      "requestUtc": {
        "utc": 1589369165996,
        "formattedDate": "2020-05-13",
        "formattedDateTime": "2020-05-13 20:26:05 996"
      },
      "completeUtc": {
        "utc": 1589369224517,
        "formattedDate": "2020-05-13",
        "formattedDateTime": "2020-05-13 20:27:04 517"
      },
      "elapsedTime": "00:00:58.521",
      "statusCode": {
        "label": "Complete",
        "code": "C"
      },
      "downloadUrl": "http://localhost:7070/v1/email/templates/export/11"
    }
  ],
  "totalElements": 2,
  "last": true,
  "totalPages": 1,
  "size": 5,
  "number": 0,
  "sort": [
    {
      "direction": "DESC",
      "property": "createUtc",
      "ignoreCase": false,
      "nullHandling": "NATIVE",
      "ascending": false,
      "descending": true
    }
  ],
  "first": true,
  "numberOfElements": 2
}