Skip to main content
POST
/
daemon
/
e2e
/
sessions
Create decrypt session
curl --request POST \
  --url https://apigcp.trynia.ai/v2/daemon/e2e/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "local_folder_id": "<string>",
  "ttl_seconds": 300,
  "max_chunks": 50,
  "allowed_operations": [
    "search"
  ]
}
'
{
  "id": "<string>",
  "local_folder_id": "<string>",
  "status": "active",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "chunks_used": 123,
  "max_chunks": 123,
  "allowed_operations": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json

Create a scoped decrypt session.

local_folder_id
string
required

E2E source to create session for

ttl_seconds
integer
default:300

Session time-to-live in seconds (30s to 1h)

Required range: 30 <= x <= 3600
max_chunks
integer
default:50

Maximum number of chunks that can be decrypted in this session

Required range: 1 <= x <= 1000
allowed_operations
enum<string>[]

Operations permitted in this session

Available options:
search,
read,
list

Response

Successful Response

id
string
required

Session identifier

local_folder_id
string
required
status
enum<string>
required

Session status: active, expired, or exhausted

Available options:
active,
expired,
exhausted
created_at
string<date-time>
required
expires_at
string<date-time>
required
chunks_used
integer
required

Number of chunks decrypted so far

max_chunks
integer
required
allowed_operations
string[]