From 31bf313284d5e7c6673fa8bb2bf78129b129c272 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 | 33 ++++++++++++++----- 1 file changed, 25 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..7d3cadb0 100644 --- a/docs/specs/servers/blockchain/blockchain-permissions-api.md +++ b/docs/specs/servers/blockchain/blockchain-permissions-api.md @@ -23,24 +23,41 @@ 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, + "expiration": number, + "createdAt": number, + "permissions": [permission] + "policies": [policy], } ```