프로젝트

일반

사용자정보

B2B » 이력 » 개정판 5

개정판 4 (이름없음, 2021/06/02 10:38) → 개정판 5/28 (이름없음, 2021/06/02 10:38)

h2. *Intro* 

 b2b에서 수행할 수 있는 api입니다.(설명 추가) 

 *토큰 발급 받기* 

 B2B api에선 issueDid(second party유형의 did를 새로 발급) 요청을 제외한 모든 헤더에 토큰을 포함합니다. 

 {{collapse(api 공통 설명 영역으로 옮기면 좋을 것 같은 "토큰 발급 방법") 

 1. signin 요청을 통해 토큰을 발급받습니다. 

 2. 요청 헤더에 아래 key를 적용해 토큰 값을 넣어줍니다. 

 | key | value | description | 
 | X-Auth-Token | 발급 받아 사용 | did마다 인증을 위한 고유한 토큰을 가지며 최대 6시간 유효합니다. | 

 }} 

 h2. UploadResolver 

 GraphQL Multipart-Form으로 파일 업로드 시 *operations* 키 값으로 "이 형식":https://graphql-kr.github.io/learn/serving-over-http/#post-request<notextile></notextile>의 JSON 인코딩 바디를 포함하여 요청을 보냅니다. 

 operations 내부의 *variables* 문법 사용 방법은 "이 문서":https://graphql.org/learn/queries/#variables<notextile></notextile>를 참고할 수 있습니다. 

 *1. uploadImage*<notextile></notextile> <notextile></notextile>%{color: #993300;}(Multipart-Form) @api 요청 링크 추가@%<notextile></notextile> 

 Martipart-Form 요청 형식 

 | key | value | description | 
 | file |   | 업로드 할 파일 또는 파일의 경로 %{color: #ff0000;}(확장자 표시해주기)% | 
 | operations |   | 표준 GraphQL Post 요청 형식에 따른 쿼리를 작성합니다. | 

 요청 필드 

 | field | type | description | 
 | did | String | b2b의 did | 

 요청 예시 

 <pre> 
 {"query":"mutation($did: String){uploadImage(did: $did){command result{originalFilename fullUrlPath}}}","variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"}} 
 </pre> 

 응답 필드 

 | field | type | description | 
 | command | String | 응답 Command 종류 | 
 | originalFilename | String | 업로드 한 파일 이름 | 
 | fullUrlPath | String | 저장된 경로 | 

 요청 예시 

 <pre> 
 {"query":"mutation($did: String){uploadImage(did: $did){command result{originalFilename fullUrlPath}}}","variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"}} 
 </pre> 

 {{collapse(beautify) 

 <pre> 
 {"query": "mutation($did: String){ 
 uploadImage(did: $did){  
   command                #String 
   result{  
     originalFilename     #String 
     fullUrlPath          #String 
   } } }", 
 "variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"} 
 } 
 </pre> 

 }} 

 응답 예시 

 <pre> 
 { 
     "data": { 
         "uploadImage": { 
             "command": "uploadImage", 
             "result": [ 
                 { 
                     "originalFilename": "100.jpg", 
                     "fullUrlPath": "https://cdn.myd.world/6f9b5a50b175e81cf2892b6da61d21af/images/GTfQBO/100.jpg"  
                 } 
             ] 
         } 
     } 
 } 
 </pre> 

 *2. uploadHtml*<notextile></notextile> <notextile></notextile>%{color: #993300;}(Multipart-Form)% 

 *3. uploadEventZip*<notextile></notextile> <notextile></notextile>%{color: #993300;}(Multipart-Form)% 

 *4. uploadAdvertizeZip*<notextile></notextile> <notextile></notextile>%{color: #993300;}(Multipart-Form)% 

 *5. uploadDsiclaimer* 

 *6. registerConfig* 

 *7. uploadEventList* 

 *8. uploadResource*<notextile></notextile> <notextile></notextile>%{color: #993300;}(Multipart-Form)% 

 *9. uploadZip* %{color: #993300;}(Multipart-Form)% 

 h2. SettlementResolver 

 h2. MessageResolver 

 h2. AuthResolver
클립보드 이미지 추가 (최대 크기: 97.7 MB)