-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update description of use cases
- Loading branch information
Showing
28 changed files
with
160 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 18 additions & 13 deletions
31
_includes/use-cases/use-case-consumption-accept-incoming-request.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
Attempts to accept an incoming request by it's Id. | ||
{{properties.description}} | ||
|
||
A [request](/integrate/data-model-overview#request) consists of [RequestItems](/integrate/data-model-overview#requestitem) | ||
and/or [RequestItemGroups](/integrate/data-model-overview#requestitemgroup). To accept the request | ||
the body has to contain a items array that indicates the decisions made for each request item. | ||
The decision are expressed through [ResponseItems](/integrate/data-model-overview#responseitem) whose | ||
structure is dependent on the corresponding RequestItem. | ||
{% include properties_list.html %} | ||
|
||
## Example Body | ||
This use-case attempts to accept an incomming [Request](/integrate/data-model-overview#request). | ||
It is advised to [check if incoming request can be accepted](/use-case-consumption-check-if-incoming-request-can-be-accepted) | ||
in advance. | ||
|
||
```json | ||
{ | ||
"items": [{ "accept": true }, { "accept": false }] | ||
} | ||
``` | ||
## Parameters | ||
|
||
{% include rapidoc api_route_regex="^put /api/v2/Requests/Incoming/{id}/Accept$" title="API docs" %} | ||
- The `id` of the incomming request. | ||
- The decision for each individual [RequestItem](/integrate/data-model-overview#request) | ||
expressed as the appropriate [Parameters defined in the Data Model](/integrate/requests-and-requestitems). | ||
|
||
## On Success | ||
|
||
- The request is processed according to the decisions made. | ||
- The sending peer is informed about your decisions. | ||
|
||
## On Failure | ||
|
||
- The decisions do not match the request items. | ||
- An item that has the mustBeAccepted field set was declined. |
29 changes: 16 additions & 13 deletions
29
...des/use-cases/use-case-consumption-check-if-incoming-request-can-be-accepted.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
Checks if an incoming request can be successfully accepted. | ||
{{properties.description}} | ||
|
||
A [request](/integrate/data-model-overview#request) consists of [RequestItems](/integrate/data-model-overview#requestitem) | ||
and/or [RequestItemGroups](/integrate/data-model-overview#requestitemgroup). To accept the request | ||
the body has to contain a items array that indicates the decisions made for each request item. | ||
The decision are expressed through [ResponseItems](/integrate/data-model-overview#responseitem) whose | ||
structure is dependent on the corresponding RequestItem. | ||
{% include properties_list.html %} | ||
|
||
## Example Body | ||
This use-case tests if an incomming [Request](/integrate/data-model-overview#request) | ||
can be accepted with the given parameters without actually accepting it. | ||
|
||
```json | ||
{ | ||
"items": [{ "accept": true }, { "accept": false }] | ||
} | ||
``` | ||
## Parameters | ||
|
||
{% include rapidoc api_route_regex="^put /api/v2/Requests/Incoming/{id}/CanAccept$" title="API docs" %} | ||
- The `id` of the incomming request. | ||
- The decision for each individual [RequestItem](/integrate/data-model-overview#request) | ||
expressed as the appropriate [Parameters defined in the Data Model](/integrate/requests-and-requestitems). | ||
|
||
## On Success | ||
|
||
- The request can be accepted with the given parameters. | ||
|
||
## On Failure | ||
|
||
- The request can not be accepted. | ||
- A detailed error describes the problem. |
29 changes: 16 additions & 13 deletions
29
...des/use-cases/use-case-consumption-check-if-incoming-request-can-be-rejected.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
Checks if an incoming request can be successfully rejected. | ||
{{properties.description}} | ||
|
||
A [request](/integrate/data-model-overview#request) consists of [RequestItems](/integrate/data-model-overview#requestitem) | ||
and/or [RequestItemGroups](/integrate/data-model-overview#requestitemgroup). To reject the request | ||
the body has to contain a items array that indicates the decisions made for each request item. | ||
The decision are expressed through [ResponseItems](/integrate/data-model-overview#responseitem) whose | ||
structure is dependent on the corresponding RequestItem. | ||
{% include properties_list.html %} | ||
|
||
## Example Body | ||
This use-case tests if an incomming [Request](/integrate/data-model-overview#request) | ||
can be rejected with the given parameters without actually rejecting it. | ||
|
||
```json | ||
{ | ||
"items": [{ "accept": false }, { "accept": false }] | ||
} | ||
``` | ||
## Parameters | ||
|
||
{% include rapidoc api_route_regex="^put /api/v2/Requests/Incoming/{id}/CanReject$" title="API docs" %} | ||
- The `id` of the incomming request. | ||
- The decision for each individual [RequestItem](/integrate/data-model-overview#request) | ||
expressed as the appropriate [Parameters defined in the Data Model](/integrate/requests-and-requestitems). | ||
|
||
## On Success | ||
|
||
- The request can be requected with the given parameters. | ||
|
||
## On Failure | ||
|
||
- The request can not be rejected with the given parameters. | ||
- A detailed error describes the problem. |
41 changes: 14 additions & 27 deletions
41
...udes/use-cases/use-case-consumption-check-if-outgoing-request-can-be-created.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,21 @@ | ||
Validates an outgoing request without creating it. | ||
{{properties.description}} | ||
|
||
{% include properties_list.html %} | ||
|
||
The content is the to be created request defined in the [data model](/integrate/data-model-overview#request). | ||
This use-case is intended to check if a [LocalRequest](integrate/data-model-overview#localrequest) can be created | ||
based on a given `request` (as a [Request](integrate/data-model-overview#localrequest) datastructure) for a given `peer`. | ||
|
||
## Example Body | ||
## Parameters | ||
|
||
```json | ||
{ | ||
"content": { | ||
"expiresAt": "2024-01-01T00:00:00.000Z", | ||
"items": [ | ||
{ | ||
"@type": "ShareAttributeRequestItem", | ||
"mustBeAccepted": true, | ||
"attribute": { | ||
"@type": "IdentityAttribute", | ||
"owner": "", | ||
"value": { | ||
"@type": "DisplayName", | ||
"value": "Example" | ||
} | ||
}, | ||
"sourceAttributeId": "<id of attribute above, generated on creation>" | ||
} | ||
] | ||
}, | ||
"peer": "peerId" | ||
} | ||
``` | ||
- The `content` for the to be created request is described in the [data model](integrate/data-model-overview#request). | ||
- The `peer` is the address of the recipient of this request. There can only be one peer per request. | ||
|
||
{% include rapidoc api_route_regex="^post /api/v2/Requests/Outgoing/Validate$" title="API docs" %} | ||
## On Success | ||
Please [check if the outgoing request can be created](use-case-consumption-check-if-outgoing-request-can-be-created) for more details. | ||
- A [LocalRequest](integrate/data-model-overview#localrequest) for the given parameters can be created. | ||
|
||
## On Failure | ||
|
||
- The request cannot be created if the peer is unknown. | ||
- The request cannot be created if the request content is malformed. | ||
- The response contains a detailed error message. |
31 changes: 14 additions & 17 deletions
31
_includes/use-cases/use-case-consumption-create-an-attribute.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
Create an attribute. | ||
{{properties.description}} | ||
|
||
The content is the to be created attribute, either an 'IdentityAttribute' or an | ||
'RelationshipAttribute', defined in the [data model](/integrate/data-model-overview#attributes). | ||
{% include properties_list.html %} | ||
|
||
## Example Body | ||
This use-case is intended to create an [LocalAttribute](/integrate/data-model-overview#localattribute) | ||
based on a given `attribute` (as a [Attribute](/integrate/data-model-overview#attributes) datastructure). | ||
|
||
```json | ||
{ | ||
"content": { | ||
"@type": "IdentityAttribute", | ||
"owner": "<your address>", | ||
"value": { | ||
"@type": "DisplayName", | ||
"value": "Example" | ||
} | ||
} | ||
} | ||
``` | ||
## Parameters | ||
|
||
{% include rapidoc api_route_regex="^post /api/v2/Attributes$" %} | ||
- The `content` for the to be created attribute is described in the [data model](/integrate/data-model-overview#attributes) | ||
|
||
## On Success | ||
|
||
- A [LocalAttribute](/integrate/data-model-overview#localattribute) is created according to the paramter. | ||
|
||
## On Failure | ||
|
||
- The attribute cannot be created if the parameter is malformed. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 17 additions & 27 deletions
44
_includes/use-cases/use-case-consumption-execute-a-relationshipattributequery.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,18 @@ | ||
Execute relationship attribute query. | ||
|
||
[Relationship attributes](/integrate/data-model-overview#relationshipattribute) are all attributes that are shared within a | ||
relationship of the identity. This endpoint is used to query the realationship attributes of a peer. | ||
|
||
The structure of the query is defined in the [data model](/integrate/data-model-overview#attributequeries). | ||
|
||
## Example Body | ||
|
||
```json | ||
{ | ||
"query": { | ||
"key": "ElectricMeterNumber", | ||
"owner": "enmeshedAddressOfOwner", | ||
"attributeCreationHints": { | ||
"confidentiality": "public", | ||
"title": "electric meter number", | ||
"valueType": "ProprietaryString", | ||
"valueHints": { | ||
"@type": "Proprietary" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
{% include rapidoc api_route_regex="^post /api/v2/attributes/ExecuteRelationshipAttributeQuery$" title="API docs" %} | ||
{{properties.description}} | ||
|
||
{% include properties_list.html %} | ||
|
||
This use-case is intended to query a peer's [relationship attributes](/integrate/data-model-overview#relationshipattribute). | ||
|
||
## Parameters | ||
|
||
- The `query` for the searched relationship attribute is described in the [data model](/integrate/data-model-overview#relationshipattributequery). | ||
|
||
## On Success | ||
|
||
- Returns the relationship attribute that matches the query. | ||
|
||
## On Failure | ||
|
||
- No corresponding attributes could be found. | ||
- The query was malformed. Please make sure it complies to the [data model](/integrate/data-model-overview#relationshipattributequery). |
Oops, something went wrong.