importTemplate
    • PDF

    importTemplate

    • PDF

    Article Summary

    사용자가 Json으로 작성한 템플릿 구조 파일을 import 합니다.

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

    요청

    요청 파라미터

    파라미터명필수 여부타입제약 사항설명
    fileYesFileimport할 Json 파일 (Json에 중복 등 오류가 발생할 수 있는 내용이 있을 경우 해당 오류 발생 직전까지만 추가되며 그 후는 추가되지 않음)

    응답

    HTTP 상태코드설명
    201템플릿 import 완료
    400인증 실패, 잘못된 요청
    500서버 오류

    예시

    요청 예시

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

    응답 예시

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

    속성

    항목필수 여부타입제약 사항설명
    contentsNoList<TemplateStructureResponse>템플릿 및 카테고리 상세 구조

    오류 코드

    HTTP Status Code리턴 코드응답 메시지
    40077101로그인 정보 오류
    40077102BAD_REQUEST
    40077103리소스가 존재하지 않음
    40377201권한 없음
    40377202Email 상품 사용신청 하지 않음
    40577001METHOD_NOT_ALLOWED
    41577002UNSUPPORTED_MEDIA_TYPE
    50077301기본 프로젝트가 존재하지 않음
    50077302외부 시스템 API 연동 오류
    50077303그외 INTERNAL_SERVER_ERROR

    이 문서가 도움이 되었습니까?

    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.