From 48521176d590a0e3813fccd884e60d9b2b94bebf Mon Sep 17 00:00:00 2001 From: korbinian Date: Tue, 10 Oct 2023 11:08:59 +0200 Subject: [PATCH] feature: add use case descriptions --- ...on-execute-a-relationshipattributequery.md | 44 +++++++++++++++++++ ...ption-execute-an-identityattributequery.md | 29 ++++++++++++ .../use-case-consumption-get-attribute.md | 6 +-- .../use-case-consumption-query-attributes.md | 13 +++--- 4 files changed, 82 insertions(+), 10 deletions(-) diff --git a/_includes/use-cases/use-case-consumption-execute-a-relationshipattributequery.md b/_includes/use-cases/use-case-consumption-execute-a-relationshipattributequery.md index e69de29bb..9afe516e4 100644 --- a/_includes/use-cases/use-case-consumption-execute-a-relationshipattributequery.md +++ b/_includes/use-cases/use-case-consumption-execute-a-relationshipattributequery.md @@ -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" + } + } + } +} +``` diff --git a/_includes/use-cases/use-case-consumption-execute-an-identityattributequery.md b/_includes/use-cases/use-case-consumption-execute-an-identityattributequery.md index e69de29bb..ed41e7e3e 100644 --- a/_includes/use-cases/use-case-consumption-execute-an-identityattributequery.md +++ b/_includes/use-cases/use-case-consumption-execute-an-identityattributequery.md @@ -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" + } +} +``` + diff --git a/_includes/use-cases/use-case-consumption-get-attribute.md b/_includes/use-cases/use-case-consumption-get-attribute.md index 3117d678e..94ff14e8b 100644 --- a/_includes/use-cases/use-case-consumption-get-attribute.md +++ b/_includes/use-cases/use-case-consumption-get-attribute.md @@ -1,4 +1,4 @@ -Query all attributes. +Get attribute by id ## Example Body @@ -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 '{ diff --git a/_includes/use-cases/use-case-consumption-query-attributes.md b/_includes/use-cases/use-case-consumption-query-attributes.md index ca52bd297..1a96c8326 100644 --- a/_includes/use-cases/use-case-consumption-query-attributes.md +++ b/_includes/use-cases/use-case-consumption-query-attributes.md @@ -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 { @@ -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' ```