프로젝트

일반

사용자정보

B2B » 이력 » 버전 11

이름없음, 2021/06/04 01:28

1 9 이름없음
h2. B2B
2 2 이름없음
3 10 이름없음
b2b에서 수행할 수 있는 api입니다. @issueDid@ (second party유형의 did를 새로 발급) 요청을 제외한 모든 헤더에 토큰을 포함합니다.
4 1 이름없음
5 9 이름없음
{{collapse(토큰 발급 방법)
6 1 이름없음
7 4 이름없음
1. signin 요청을 통해 토큰을 발급받습니다.
8
9
2. 요청 헤더에 아래 key를 적용해 토큰 값을 넣어줍니다.
10
11
| key | value | description |
12
| X-Auth-Token | 발급 받아 사용 | did마다 인증을 위한 고유한 토큰을 가지며 최대 6시간 유효합니다. |
13
14
}}
15
16 11 이름없음
h1. UploadResolver
17
18
GraphQL Multipart-Form으로 파일 업로드 시 *operations* 키 값으로 "이 형식":https://graphql-kr.github.io/learn/serving-over-http/#post-request<notextile></notextile>의 JSON 인코딩 바디를 포함하여 요청을 보냅니다.
19
20
operations 내부의 *variables* 문법 사용 방법은 "이 문서":https://graphql.org/learn/queries/#variables<notextile></notextile>를 참고할 수 있습니다.
21
22
h2. *UploadImage* %{color: #993300;}(Multipart-Form) @api 요청 링크 추가@%
23
24
Martipart-Form 요청 형식
25
26
| key | type | description |
27
| file | File | 업로드 할 파일 %{color: #ff0000;}(확장자 표시해주기)% |
28
| operations | Text(one-line) | 표준 GraphQL Post 요청 형식에 따른 쿼리를 작성합니다. |
29
30
요청 필드
31
32
| field | type | description |
33
| did | String | b2b의 did |
34
35
요청 예시
36
37
<pre>
38
{"query":"mutation($did: String){uploadImage(did: $did){command result{originalFilename fullUrlPath}}}","variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"}}
39
</pre>
40
41
{{collapse(beautify)
42
43
<pre>
44
{"query": "mutation($did: String){
45
uploadImage(did: $did){ 
46
  command             
47
  result{ 
48
    originalFilename  
49
    fullUrlPath      
50
  } } }",
51
"variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"}
52
}
53
</pre>
54
55
}}
56
57
응답 필드
58
59
| field | type | description |
60
| command | String | 응답 Command 종류 |
61
| originalFilename | String | 업로드 한 파일 이름 |
62
| fullUrlPath | String | 저장된 경로 |
63
64
응답 예시
65
66
<pre>
67
{
68
    "data": {
69
        "uploadImage": {
70
            "command": "uploadImage",
71
            "result": [
72
                {
73
                    "originalFilename": "100.jpg",
74
                    "fullUrlPath": "https://cdn.myd.world/6f9b5a50b175e81cf2892b6da61d21af/images/GTfQBO/100.jpg" 
75
                }
76
            ]
77
        }
78
    }
79
}
80
</pre>
81
82
h2. *uploadHtml* %{color: #993300;}(Multipart-Form)%
83
84
h2. *uploadEventZip* %{color: #993300;}(Multipart-Form)%
85
86
h2. *uploadAdvertizeZip* %{color: #993300;}(Multipart-Form)%
87
88
h2. *uploadDsiclaimer*
89
90
h2. *registerConfig*
91
92
h2. *uploadEventList*
93
94
h2. *uploadResource* %{color: #993300;}(Multipart-Form)%
95
96
h2. *uploadZip* %{color: #993300;}(Multipart-Form)%
97 4 이름없음
98 9 이름없음
h2. "SettlementResolver":https://developers.myd.world/projects/server-api-version-2/wiki/SettlementResolver
99 4 이름없음
100 9 이름없음
h2. "MessageResolver":https://developers.myd.world/projects/server-api-version-2/wiki/MessageResolver
101 4 이름없음
102 9 이름없음
h2. "AuthResolver":https://developers.myd.world/projects/server-api-version-2/wiki/AuthResolver
클립보드 이미지 추가 (최대 크기: 97.7 MB)