From f89379c58585f2fd408329b436678b704566d8e8 Mon Sep 17 00:00:00 2001 From: Max Kalashnikoff Date: Thu, 3 Oct 2024 20:09:01 +0200 Subject: [PATCH] fix: return all permissions by address --- .../blockchain/blockchain-permissions-api.md | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/specs/servers/blockchain/blockchain-permissions-api.md b/docs/specs/servers/blockchain/blockchain-permissions-api.md index 855fdba6..5ff8affa 100644 --- a/docs/specs/servers/blockchain/blockchain-permissions-api.md +++ b/docs/specs/servers/blockchain/blockchain-permissions-api.md @@ -23,24 +23,40 @@ Used to get account list of active sessions * `400 Bad request` - Invalid requested address format. -### Get permission by PCI +### Get permissions by address -Used to get permission by PCI +Used to get permissions by address -`GET /v1/sessions/{address}/{pci}?projectId={projectId}` +`GET /v1/sessions/{address}?projectId={projectId}` * `address` - CAIP-10 address format. -* `pci` - Permission identifier. * `projectId` - Required. The project identifier. #### Success response body: +The response is a list of PCIs with permissions and policy: + ```typescript { - "permissionType": string, - "data": string, - "required": boolean, - "onChainValidated": boolean + "pcis": [pci] +} +``` + +The `pci` object: + +```typescript +{ + "project": + { + "id": string, + "name": string, + "url": string, + "iconUrl": string, + } + "pci": string, + "expiry": number, + "permissions": [pemrission] + "policies": [policy], } ```