Binding: HTTPS
Last updated
Last updated
This specification defines a RESTful API over HTTPS for the .
All request and response messages must use the application/json
media type. Derived media types, e.g., application/ld+json
may be exposed in addition.
https://provider.com/negotiations/:providerPid
GET
https://provider.com/negotiations/request
POST
https://provider.com/negotiations/:providerPid/request
POST
https://provider.com/negotiations/:providerPid/events
POST
https://provider.com/negotiations/:providerPid/agreement/verification
POST
https://provider.com/negotiations/:providerPid/termination
POST
negotiations
Endpoint (Provider-side)Request
Response
negotiations/request
Endpoint (Provider-side)Request
The callbackAddress
property specifies the base endpoint URL
where the client receives messages associated with the CN. Support for the HTTPS
scheme is required. Implementations may optionally support other URL schemes.
Response
negotiations/:providerPid/request
Endpoint (Provider-side)Request
Response
negotiations/:providerPid/events
Endpoint (Provider-side)Request
Response
negotiations/:providerPid/agreement/verification
Endpoint (Provider-side)Request
Response
negotiations/:providerPid/termination
Endpoint (Provider-side)Request
Response
https://consumer.com/negotiations/offers
POST
https://consumer.com/:callback/negotiations/:consumerPid/offers
POST
https://consumer.com/:callback/negotiations/:consumerPid/agreement
POST
https://consumer.com/:callback/negotiations/:consumerPid/events
POST
https://consumer.com/:callback/negotiations/:consumerPid/termination
POST
Note: The :callback
can be chosen freely by the implementations.
negotiations/offers
Endpoint (Consumer-side)Request
The callbackAddress
property specifies the base endpoint URL where the client receives messages associated with the CN. Support for the HTTPS scheme is required. Implementations may optionally support other URL schemes.
Response
negotiations/:consumerPid/offers
Endpoint (Consumer-side)Request
Response
negotiations/:consumerPid/agreement
Endpoint (Consumer-side)Request
Response
negotiations/:consumerPid/events
Endpoint (Consumer-side)Request
Response
negotiations/:consumerPid/termination
Endpoint (Consumer-side)Request
Response
The <base>
notation indicates the base URL for a endpoint. For example, if the base URL is connector.example.com
, the URL https://<base>/negotiations/request
will map to https//connector.example.com/negotiation/request
.
In the event of a client request error, the must return an appropriate HTTP 4xx client error code. If an error body is returned it must be a .
If a client makes a request that results in an invalid , it must return an HTTP code 400 (Bad Request) with a in the response body.
If the (CN) does not exist, the or must return an HTTP 404 (Not Found) response.
If the client is not authorized, the or must return an HTTP 404 (Not Found) response.
All requests should use the Authorization
header to include an authorization token. The semantics of such tokens are not part of this specification. The Authorization
HTTP header is optional if the does not require authorization.
Section
Section
Section
Section
Section
Section
A CN can be accessed by a or sending a GET request to negotiations/:providerPid
:
If the CN is found and the client is authorized, the must return an HTTP 200 (OK) response and a body containing the :
Predefined states are: REQUESTED
, OFFERED
, ACCEPTED
, AGREED
, VERIFIED
, FINALIZED
, and TERMINATED
(see .
A CN is started and placed in the REQUESTED
state when a POSTs an initiating to negotiations/request
:
Callback messages will be sent to paths under the base URL as described by this specification. Note that should properly handle the cases where a trailing /
is included with or absent from the callbackAddress
when resolving full URL.
The must return an HTTP 201 (Created) response with a body containing the :
A may make an by POSTing a to negotiations/:providerPid/request
:
If the message is successfully processed, the must return an HTTP 200 (OK) response. The response body is not specified and clients are not required to process it.
A can POST a to negotiations/:providerPid/events
to accept the current .
If the CN's state is successfully transitioned, the must return an HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
If the current was created by the , the must return an HTTP code 400 (Bad Request) with a in the response body.
The can POST a to verify an .
If the CN's state is successfully transitioned, the must return an HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The can POST a to terminate a CN.
If the CN's state is successfully transitioned, the must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
Section
Section
Section
Section
Section
All callback paths are relative to the callbackAddress
base URL specified in the that initiated a CN. For example, if the callbackAddress
is specified as https://consumer.com/callback
and a callback path binding is negotiations/:consumerPid/offers
, the resolved URL will be https://consumer.com/callback/negotiations/:consumerPid/offers
.
A CN is started and placed in the OFFERED
state when a POSTs a to negotiations/offers
:
Callback messages will be sent to paths under the base URL as described by this specification. Note that should properly handle the cases where a trailing / is included with or absent from the callbackAddress
when resolving full URL.
The must return an HTTP 201 (Created) response with a body containing the :
A may make an by POSTing a to the negotiations/:consumerPid/offers
callback:
If the message is successfully processed, the must return an HTTP 200 (OK) response. The response body is not specified and clients are not required to process it.
The can POST a to the negotiations/:consumerPid/agreement
callback to create an .
If the CN's state is successfully transitioned, the must return an HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
A can POST a to the negotiations/:consumerPid/events
callback with an eventType
of FINALIZED
to finalize an .
If the CN's state is successfully transitioned, the must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The can POST a to terminate a CN.
If the CN's state is successfully transitioned, the must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.