Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add termiantion endpoint for consumer and improve text #112

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions negotiation/contract.negotiation.binding.https.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The OpenAPI definitions for this specification can be accessed [here](TBD).

### 2.2 Contract Negotiation Error

In the event of a client request error, the connector must return an appropriate HTTP 4xxx client error code. If an error body is returned it must be
In the event of a client request error, the connector must return an appropriate HTTP 4xx client error code. If an error body is returned it must be
a [ContractNegotiationError](./message/contract-negotiation-error.json) with the following properties:

| Field | Type | Description |
Expand Down Expand Up @@ -52,7 +52,7 @@ the [ContractNegotiation](./message/contract-negotiation.json):

```
{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:ContractNegotiation"
"@id": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3",
"dspace:state" :"REQUESTED"
Expand All @@ -76,12 +76,12 @@ POST https://connector.provider.com/negotiations/request
Authorization: ...

{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:ContractRequest"
"@id": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3",
"dspace:dataSet": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"dspace:offerId": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88",
"dspace:callbackAddress": "https://......"
"dspace:callbackAddress": "https://..."
}
```

Expand All @@ -100,7 +100,7 @@ the [ContractNegotiation](./message/contract-negotiation.json) message:
Location: /negotiations/urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3

{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:ContractNegotiation"
"@id": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3",
"dspace:state" :"REQUESTED"
Expand All @@ -121,7 +121,7 @@ POST https://connector.provider.com/negotiations/urn:uuid:dcbf434c-eacf-4582-9a0
Authorization: ...

{
"@context": "https://w3id.org/dspace/v0.8/context.jsonn",
"@context": "https://w3id.org/dspace/v0.8/context.jsonn",
"@type": "dspace:ContractRequestMessage",
"dspace:processId": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3",
"dspace:offer": {
Expand Down Expand Up @@ -160,12 +160,12 @@ POST https://connector.provider.com/negotiations/urn:uuid:a343fcbf-99fc-4ce8-8e9
Authorization: ...

{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:ContractAgreementVerificationMessage",
"dspace:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerSignature": {
"timestamp": 121212,
"hash": "....",
"hash": "...",
"signature": ""
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ POST https://connector.consumer.com/callback/negotiations/urn:uuid:dcbf434c-eacf
Authorization: ...

{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:ContractOfferMessage",
"dspace:processId": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3",
"dspace:offer": {
Expand All @@ -226,7 +226,7 @@ POST https://connector.consumer.com/negotiations/urn:uuid:a343fcbf-99fc-4ce8-8e9
Authorization: ...

{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:ContractAgreementMessage",
"dspace:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:agreement": {
Expand All @@ -244,7 +244,12 @@ Authorization: ...
#### 3.4.1 POST

A provider can POST a [ContractNegotiationEventMessage](./message/contract-negotiation-event-message.json) to the `negotiations/:id/events` callback with an `eventType`
of `finalized` to finalize a contract agreement. If the negotiation state is successfully transitioned, the consumer must return HTTP code 200 (OK). The response body is not
of `FINALIZED` to finalize a contract agreement. If the negotiation state is successfully transitioned, the consumer must return HTTP code 200 (OK). The response body is not
specified and clients are not required to process it.

### 3.5 The consumer `negotiations/:id/termination` resource

#### 3.5.1 POST

The provider connector can POST a [ContractNegotiationTerminationMessage](./message/contract-negotiation-termination-message.json) to terminate a negotiation. If the negotiation
state is successfully transitioned, the consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.