Skip to content

Commit

Permalink
feature: add use case descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kojofl committed Oct 10, 2023
1 parent 58010a4 commit 4852117
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Execute relationship attribute query.

Relationship attributes are all attributes that are shared within a
relationship of the identity.

## Example Body

```json
{
"query": {
"key": "KeyOfRelAttribute",
"owner": "enmeshedAddressOfOwner",
"attributeCreationHints": {
"confidentiality": "public",
"title": "My display name",
"valueHints": {
"@type": "ProprietaryBoolean"
}
}
}
}
```
{% include rapidoc api_route_regex="^post /api/v2/attributes/ExecuteRelationshipAttributeQuery$" %}

## Example

```shell
curl --location --request POST 'http://{connector_url}/api/v2/Attributes/ExecuteRelationshipAttributeQuery' \
--header 'X-API-KEY: xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": {
"key": "KeyOfRelAttribute",
"owner": "enmeshedAddressOfOwner",
"attributeCreationHints": {
"confidentiality": "public",
"title": "My display name",
"valueHints": {
"@type": "ProprietaryBoolean"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Query identity attributes.

[Identity attributes](/integrate/data-model-overview#identityattribute) are attributes that describe an identity.

## Example Body

```json
{
"query": {
"valueType": "DisplayName"
}
}
```

{% include rapidoc api_route_regex="^post /api/v2/Attributes/ExecuteIdentityAttributeQuery$" %}

## Example

```shell
curl --location --request POST 'http://{connector_url}/api/v2/Attributes/ExecuteRelationshipAttributeQuery' \
--header 'X-API-KEY: xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": {
"valueType": "DisplayName"
}
}
```
6 changes: 3 additions & 3 deletions _includes/use-cases/use-case-consumption-get-attribute.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Query all attributes.
Get attribute by id

## Example Body

Expand All @@ -8,12 +8,12 @@ Query all attributes.
}
```

{% include rapidoc api_route_regex="^get /api/v2/Attributes$" %}
{% include rapidoc api_route_regex="^get /api/v2/Attributes/{id}$" %}

## Example

```shell
curl --location --request GET 'http://{connector_url}/api/v2/Attributes' \
curl --location --request GET 'http://{connector_url}/api/v2/Attributes/ATT_' \
--header 'X-API-KEY: xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
Expand Down
13 changes: 6 additions & 7 deletions _includes/use-cases/use-case-consumption-query-attributes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

Query all attributes.

## Example Body
Since this api uses a GET request the query has to be properly formated in the query-string,
see the example below for reference.

## Example Query

```json
{
Expand All @@ -14,10 +16,7 @@ Query all attributes.
## Example

```shell
curl --location --request GET 'http://{connector_url}/api/v2/Attributes' \
curl --location --request GET 'http://{connector_url}/api/v2/Attributes?content.value.%40type=DisplayName' \
--header 'X-API-KEY: xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"content.value.@type": "DisplayName"
}'
--header 'Content-Type: application/json'
```

0 comments on commit 4852117

Please sign in to comment.