eCMRhub.docs
API referenceConnections

Who am I

POST
/rest/v1/rpc/whoami

The kind of caller (user, apikey or connection), its company, permissions and, for a connection or an API key, whether its writes wait for a person's approval.

Authorization

apikeybearerAuth
headerapikey<token>
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body

Response Body

Success

application/json
  1. response
kind*string
Value in"user""apikey""connection"
tenantId*string
Formatuuid
role?string
Value in"owner""member"
keyId?string
Formatuuid
name?string
permissions*array<>
expiresAt?|null
connectionId?|null
clientId?string
requireApproval?boolean
Example Request
curl -X POST 'https://api-ecmr-dev.lucaspiera.com/rest/v1/rpc/whoami' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "kind": "user",  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",  "role": "owner",  "keyId": "468bcefd-6536-4844-8249-aff3ecb2ef7b",  "name": "string",  "permissions": [    "documents:read"  ],  "expiresAt": "2019-08-24T14:15:22Z",  "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d",  "clientId": "string",  "requireApproval": true}