@@ -41,20 +41,18 @@ authorization.
41
41
42
42
## Provider Path Bindings
43
43
44
- | Endpoint | Method | Description |
45
- | :---------------------------------------------------------------------- | :-------| :-------- ----------------------------------------------------|
46
- | https://provider.com/ negotiations/:providerPid | ` GET ` | [[[ #negotiations-get-provider ]]] |
47
- | https://provider.com/ negotiations/ request | ` POST ` | [[[ # negotiations- request-post ]]] |
48
- | https://provider.com/ negotiations/:providerPid/ request | ` POST ` | [[[ # negotiations-providerpid- request-post ]]] |
49
- | https://provider.com/ negotiations/:providerPid/ events | ` POST ` | [[[ # negotiations-providerpid- events-post ]]] |
50
- | https://provider.com/negotiations/:providerPid/agreement/verification | ` POST ` | [[[ #negotiations-providerpid-agreement-verification-post]]] |
51
- | https://provider.com/ negotiations/:providerPid/ termination | ` POST ` | [[[ # negotiations-providerpid- termination-post ]]] |
44
+ | Endpoint | Method | Path |
45
+ | :------------------------------------------------------------| :-------| :----------------------------------------------------|
46
+ | [[[ # negotiations-get-provider ]]] | ` GET ` | ` /negotiations/:providerPid ` |
47
+ | [[[ # negotiations- request-post ]]] | ` POST ` | ` / negotiations/ request` |
48
+ | [[[ # negotiations-providerpid- request-post ]]] | ` POST ` | ` / negotiations/:providerPid/ request` |
49
+ | [[[ # negotiations-providerpid- events-post ]]] | ` POST ` | ` / negotiations/:providerPid/ events` |
50
+ | [[[ #negotiations-providerpid-agreement-verification-post]]] | ` POST ` | ` /negotiations/:providerPid/agreement/verification ` |
51
+ | [[[ # negotiations-providerpid- termination-post ]]] | ` POST ` | ` / negotiations/:providerPid/ termination` |
52
52
53
- ### The ` negotiations ` Endpoint _ (Provider-side) _
53
+ ### Contract Negotiation Endpoint {#negotiations-get-provider}
54
54
55
- #### GET {#negotiations-get-provider}
56
-
57
- ##### Request
55
+ ** Request**
58
56
59
57
A CN can be accessed by a [ =Consumer=] sending a GET request to ` negotiations/:providerPid ` :
60
58
@@ -65,7 +63,7 @@ Authorization: ...</pre>
65
63
</aside >
66
64
67
65
68
- ##### Response
66
+ ** Response**
69
67
70
68
If the CN is found and the client is authorized, the [ =Provider=] must return an HTTP 200 (OK) response and a body
71
69
containing the [ Contract Negotiation] ( #ack-contract-negotiation ) :
@@ -80,11 +78,9 @@ containing the [Contract Negotiation](#ack-contract-negotiation):
80
78
Predefined states are: ` REQUESTED ` , ` OFFERED ` , ` ACCEPTED ` , ` AGREED ` , ` VERIFIED ` , ` FINALIZED ` , and ` TERMINATED ` (
81
79
see [[[ #contract-negotiation-states]]] ).
82
80
83
- ### The ` negotiations/request ` Endpoint _ (Provider-side)_
84
-
85
- #### POST {#negotiations-request-post}
81
+ ### Contract Request Endpoint (init) {#negotiations-request-post}
86
82
87
- ##### Request
83
+ ** Request**
88
84
89
85
A CN is started and placed in the ` REQUESTED ` state when a [ =Consumer=] POSTs an
90
86
initiating [ Contract Request Message] ( #contract-request-message )
@@ -104,7 +100,7 @@ Authorization: ...</pre>
104
100
that [ =Providers=] should properly handle the cases where a trailing ` / ` is included
105
101
with or absent from the ` callbackAddress ` when resolving full URL.
106
102
107
- ##### Response
103
+ ** Response**
108
104
109
105
The [ =Provider=] must return an HTTP 201 (Created) response with a body containing
110
106
the [ Contract Negotiation] ( #ack-contract-negotiation ) :
@@ -114,11 +110,9 @@ the [Contract Negotiation](#ack-contract-negotiation):
114
110
</pre>
115
111
</aside >
116
112
117
- ### The ` negotiations/:providerPid/request ` Endpoint _ (Provider-side) _
113
+ ### Contract Request Endpoint {#negotiations-providerpid-request-post}
118
114
119
- #### POST {#negotiations-providerpid-request-post}
120
-
121
- ##### Request
115
+ ** Request**
122
116
123
117
A [ =Consumer=] may make an [ =Offer=] by POSTing
124
118
a [ Contract Request Message] ( #contract-request-message )
@@ -131,16 +125,14 @@ Authorization: ...</pre>
131
125
</pre >
132
126
</aside >
133
127
134
- ##### Response
128
+ ** Response**
135
129
136
130
If the message is successfully processed, the [ =Provider=] must return an HTTP 200 (OK) response. The response body is
137
131
not specified and clients are not required to process it.
138
132
139
- ### The ` negotiations/:providerPid/events ` Endpoint _ (Provider-side)_
140
-
141
- #### POST {#negotiations-providerpid-events-post}
133
+ ### Contract Negotiation Event Endpoint {#negotiations-providerpid-events-post}
142
134
143
- ##### Request
135
+ ** Request**
144
136
145
137
A [ =Consumer=] can POST
146
138
a [ Contract Negotiation Event Message] ( #contract-negotiation-event-message )
@@ -153,7 +145,7 @@ Authorization: ...</pre>
153
145
</pre >
154
146
</aside >
155
147
156
- ##### Response
148
+ ** Response**
157
149
158
150
If the CN's state is successfully transitioned, the [ =Provider=] must return an HTTP code 200 (OK). The response body is
159
151
not specified and clients are not required to process it.
@@ -162,11 +154,9 @@ If the current [=Offer=] was created by the [=Consumer=], the [=Provider=] must
162
154
with a [ Contract Negotiation Error] ( #error-contract-negotiation-error ) in the
163
155
response body.
164
156
165
- ### The ` negotiations/:providerPid/agreement/verification ` Endpoint _ (Provider-side) _
157
+ ### Contract Agreement Verification Endpoint {#negotiations-providerpid-agreement-verification-post}
166
158
167
- #### POST {#negotiations-providerpid-agreement-verification-post}
168
-
169
- ##### Request
159
+ ** Request**
170
160
171
161
The [ =Consumer=] can POST
172
162
a [ Contract Agreement Verification Message] ( #contract-agreement-verification-message )
@@ -179,16 +169,14 @@ Authorization: ...</pre>
179
169
</pre >
180
170
</aside >
181
171
182
- ##### Response
172
+ ** Response**
183
173
184
174
If the CN's state is successfully transitioned, the [ =Provider=] must return an HTTP code 200 (OK). The response body is
185
175
not specified and clients are not required to process it.
186
176
187
- ### The ` negotiations/:providerPid/termination ` Endpoint _ (Provider-side)_
188
-
189
- #### POST {#negotiations-providerpid-termination-post}
177
+ ### Contract Negotiation Termination Endpoint {#negotiations-providerpid-termination-post}
190
178
191
- ##### Request
179
+ ** Request**
192
180
193
181
The [ =Consumer=] can POST
194
182
a [ Contract Negotiation Termination Message] ( #contract-negotiation-termination-message )
@@ -201,36 +189,34 @@ Authorization: ...</pre>
201
189
</pre >
202
190
</aside >
203
191
204
- ##### Response
192
+ ** Response**
205
193
206
194
If the CN's state is successfully transitioned, the [ =Provider=] must return HTTP code 200 (OK). The response body is
207
195
not specified and clients are not required to process it.
208
196
209
- ## Consumer Callback Path Bindings
210
-
211
- | Endpoint | Method | Description |
212
- | :---------------------------------------------------------------------| :-------| :-------------------------------------------------|
213
- | https://consumer.com/negotiations/offers | ` POST ` | [[[ #negotiations-offers-post]]] |
214
- | https://consumer.com/:callback/negotiations/:consumerPid | ` GET ` | [[[ #negotiations-get-consumer]]] |
215
- | https://consumer.com/:callback/negotiations/:consumerPid/offers | ` POST ` | [[[ #negotiations-consumerpid-offers-post]]] |
216
- | https://consumer.com/:callback/negotiations/:consumerPid/agreement | ` POST ` | [[[ #negotiations-consumerpid-agreement-post]]] |
217
- | https://consumer.com/:callback/negotiations/:consumerPid/events | ` POST ` | [[[ #negotiations-consumerpid-events-post]]] |
218
- | https://consumer.com/:callback/negotiations/:consumerPid/termination | ` POST ` | [[[ #negotiations-consumerpid-termination-post]]] |
197
+ ## Consumer Path Bindings
219
198
220
- ** _ Note:_ ** The ` :callback ` can be chosen freely by the implementations.
199
+ | Endpoint | Method | Path |
200
+ | :-------------------------------------------------| :-------| :---------------------------------------------------|
201
+ | [[[ #negotiations-get-consumer]]] | ` GET ` | ` /:callback/negotiations/:consumerPid ` |
202
+ | [[[ #negotiations-offers-post]]] | ` POST ` | ` /negotiations/offers ` |
203
+ | [[[ #negotiations-consumerpid-offers-post]]] | ` POST ` | ` /:callback/negotiations/:consumerPid/offers ` |
204
+ | [[[ #negotiations-consumerpid-agreement-post]]] | ` POST ` | ` /:callback/negotiations/:consumerPid/agreement ` |
205
+ | [[[ #negotiations-consumerpid-events-post]]] | ` POST ` | ` /:callback/negotiations/:consumerPid/events ` |
206
+ | [[[ #negotiations-consumerpid-termination-post]]] | ` POST ` | ` /:callback/negotiations/:consumerPid/termination ` |
221
207
222
208
### Prerequisites
223
209
224
210
All callback paths are relative to the ` callbackAddress ` base URL specified in
225
211
the [ Contract Request Message] ( #contract-request-message ) that initiated a CN. For example, if the ` callbackAddress ` is
226
- specified as ` https://consumer.com/callback ` and a callback path binding is ` negotiations/:consumerPid/offers ` , the
227
- resolved URL will be ` https://consumer.com/callback/negotiations/:consumerPid/offers ` .
212
+ specified as ` https://consumer.com/: callback ` and a callback path binding is ` negotiations/:consumerPid/offers ` , the
213
+ resolved URL will be ` https://consumer.com/: callback/negotiations/:consumerPid/offers ` .
228
214
229
- ### The ` negotiations ` Endpoint _ (Consumer-side) _
215
+ ** _ Note: _ ** The ` :callback ` can be chosen freely by the implementations.
230
216
231
- #### GET {#negotiations-get-consumer}
217
+ ### Contract Negotiation Endpoint {#negotiations-get-consumer}
232
218
233
- ##### Request
219
+ ** Request**
234
220
235
221
A CN can be accessed by a [ =Provider=] sending a GET request to the ` negotiations/:consumerPid ` callback:
236
222
@@ -241,7 +227,7 @@ Authorization: ...</pre>
241
227
</aside >
242
228
243
229
244
- ##### Response
230
+ ** Response**
245
231
246
232
If the CN is found and the client is authorized, the [ =Consumer=] must return an HTTP 200 (OK) response and a body
247
233
containing the [ Contract Negotiation] ( #ack-contract-negotiation ) :
@@ -256,11 +242,9 @@ containing the [Contract Negotiation](#ack-contract-negotiation):
256
242
Predefined states are: ` REQUESTED ` , ` OFFERED ` , ` ACCEPTED ` , ` AGREED ` , ` VERIFIED ` , ` FINALIZED ` , and ` TERMINATED ` (
257
243
see [[[ #contract-negotiation-states]]] ).
258
244
259
- ### The ` negotiations/offers ` Endpoint _ (Consumer-side) _
245
+ ### Contract Offer Endpoint (init) {#negotiations-offers-post}
260
246
261
- #### POST {#negotiations-offers-post}
262
-
263
- ##### Request
247
+ ** Request**
264
248
265
249
A CN is started and placed in the ` OFFERED ` state when a [ =Provider=] POSTs
266
250
a [ Contract Offer Message] ( #contract-offer-message ) to ` negotiations/offers ` :
@@ -279,7 +263,7 @@ Authorization: ...</pre>
279
263
should properly handle the cases where a trailing / is included with or absent from the ` callbackAddress ` when
280
264
resolving full URL.
281
265
282
- ##### Response
266
+ ** Response**
283
267
284
268
The [ =Consumer=] must return an HTTP 201 (Created) response with a body containing
285
269
the [ Contract Negotiation] ( #ack-contract-negotiation ) :
@@ -289,11 +273,9 @@ the [Contract Negotiation](#ack-contract-negotiation):
289
273
</pre>
290
274
</aside >
291
275
292
- ### The ` negotiations/:consumerPid/offers ` Endpoint _ (Consumer-side)_
293
-
294
- #### POST {#negotiations-consumerpid-offers-post}
276
+ ### Contract Offer Endpoint {#negotiations-consumerpid-offers-post}
295
277
296
- ##### Request
278
+ ** Request**
297
279
298
280
A [ =Provider=] may make an [ =Offer=] by POSTing a [ Contract Offer Message] ( #contract-offer-message ) to
299
281
the ` negotiations/:consumerPid/offers ` callback:
@@ -305,16 +287,14 @@ Authorization: ...</pre>
305
287
</pre >
306
288
</aside >
307
289
308
- ##### Response
290
+ ** Response**
309
291
310
292
If the message is successfully processed, the [ =Consumer=] must return an HTTP 200 (OK) response. The response body is
311
293
not specified and clients are not required to process it.
312
294
313
- ### The ` negotiations/:consumerPid/agreement ` Endpoint _ (Consumer-side) _
295
+ ### Contract Agreement Endpoint {#negotiations-consumerpid-agreement-post}
314
296
315
- #### POST {#negotiations-consumerpid-agreement-post}
316
-
317
- ##### Request
297
+ ** Request**
318
298
319
299
The [ =Provider=] can POST a [ Contract Agreement Message] ( #contract-agreement-message ) to
320
300
the ` negotiations/:consumerPid/agreement ` callback to create an [ =Agreement=] .
@@ -326,16 +306,14 @@ Authorization: ...</pre>
326
306
</pre >
327
307
</aside >
328
308
329
- ##### Response
309
+ ** Response**
330
310
331
311
If the CN's state is successfully transitioned, the [ =Consumer=] must return an HTTP code 200 (OK). The response body is
332
312
not specified and clients are not required to process it.
333
313
334
- ### The ` negotiations/:consumerPid/events ` Endpoint _ (Consumer-side)_
335
-
336
- #### POST {#negotiations-consumerpid-events-post}
314
+ ### Contract Negotiation Event Endpoint {#negotiations-consumerpid-events-post}
337
315
338
- ##### Request
316
+ ** Request**
339
317
340
318
A [ =Provider=] can POST a [ Contract Negotiation Event Message] ( #contract-negotiation-event-message ) to
341
319
the ` negotiations/:consumerPid/events ` callback with an ` eventType ` of ` FINALIZED ` to finalize an [ =Agreement=] .
@@ -347,16 +325,14 @@ Authorization: ...</pre>
347
325
</pre >
348
326
</aside >
349
327
350
- ##### Response
328
+ ** Response**
351
329
352
330
If the CN's state is successfully transitioned, the [ =Consumer=] must return HTTP code 200 (OK). The response body is
353
331
not specified and clients are not required to process it.
354
332
355
- ### The ` negotiations/:consumerPid/termination ` Endpoint _ (Consumer-side)_
356
-
357
- #### POST {#negotiations-consumerpid-termination-post}
333
+ ### Contract Negotiation Termination Endpoint {#negotiations-consumerpid-termination-post}
358
334
359
- ##### Request
335
+ ** Request**
360
336
361
337
The [ =Provider=] can POST a [ Contract Negotiation Termination Message] ( #contract-negotiation-termination-message ) to
362
338
terminate a CN.
@@ -368,7 +344,7 @@ Authorization: ...</pre>
368
344
</pre >
369
345
</aside >
370
346
371
- ##### Response
347
+ ** Response**
372
348
373
349
If the CN's state is successfully transitioned, the [ =Consumer=] must return HTTP code 200 (OK). The response body is
374
350
not specified and clients are not required to process it.
0 commit comments