importTemplate
    • PDF

    importTemplate

    • PDF

    Article Summary

    Import user-created template structure files.

    POST https://{endpoint}/template/import
    

    Request

    Request Parameters

    ParameterRequiredTypeLimitationDescription
    fileYesFiletemplate structure file (Json에 중복 등 오류가 발생할 수 있는 내용이 있을 경우 해당 오류 발생 직전까지만 추가되며 그 후는 추가되지 않는다.)

    Response

    HTTP status codeDescription
    201template import complete
    400Authentication failed, invalid request.
    500Server error

    Example

    Request Example

    POST https://mail.apigw.ntruss.com/api/v1/template/import
    Content-Type: multipart/form-data; boundary=----WebKitFormBoundarysvwDAQeQdwkAw4RS
    
    ------WebKitFormBoundarysvwDAQeQdwkAw4RS
    Content-Disposition: form-data; name="file"; filename="template_20200513180659.json"
    Content-Type: application/json
    
    ------WebKitFormBoundarysvwDAQeQdwkAw4RS--
    

    Response Example

    {
      "contents": [
        {
          "sid": 268,
          "parentSid": -1,
          "createDate": {
            "utc": 1589358238711,
            "formattedDate": "2020-05-13",
            "formattedDateTime": "2020-05-13 17:23:58 711"
          },
          "name": "AD",
          "isCategory": true,
          "isUse": true,
          "subCategories": [],
          "templates": [
            {
              "sid": 269,
              "parentSid": 268,
              "createDate": {
                "utc": 1589360814507,
                "formattedDate": "2020-05-13",
                "formattedDateTime": "2020-05-13 18:06:54 507"
              },
              "name": "AD_Template",
              "isCategory": false,
              "isUse": true,
              "subCategories": null,
              "templates": null
            }
          ]
        },
        {
          "sid": 270,
          "parentSid": -1,
          "createDate": {
            "utc": 1589361807385,
            "formattedDate": "2020-05-13",
            "formattedDateTime": "2020-05-13 18:23:27 385"
          },
          "name": "Nomal",
          "isCategory": true,
          "isUse": true,
          "subCategories": [],
          "templates": [
            {
              "sid": 271,
              "parentSid": 270,
              "createDate": {
                "utc": 1589361807394,
                "formattedDate": "2020-05-13",
                "formattedDateTime": "2020-05-13 18:23:27 394"
              },
              "name": "Nomal_Template",
              "isCategory": false,
              "isUse": true,
              "subCategories": null,
              "templates": null
            }
          ]
        },
        {
          "sid": 272,
          "parentSid": -1,
          "createDate": {
            "utc": 1589365172274,
            "formattedDate": "2020-05-13",
            "formattedDateTime": "2020-05-13 19:19:32 274"
          },
          "name": "ETC",
          "isCategory": true,
          "isUse": true,
          "subCategories": null,
          "templates": null
        }
      ]
    }
    

    Properties

    PropertyRequiredTypeLimitationDescription
    contentsNoList<TemplateStructureResponse>Template and Category Detail Structure

    Error Codes

    HTTP status codeReturn codeResponse message
    40077101Error in login information
    40077102BAD_REQUEST
    40077103Resource not found
    40377201No permissions
    40377202No subscription
    40577001METHOD_NOT_ALLOWED
    41577002UNSUPPORTED_MEDIA_TYPE
    50077301Default project not found
    50077302Error in working with external system API
    50077303Other INTERNAL_SERVER_ERROR

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.