Session API
Session - Create
Scope
Ensure that a file processing session is created, which is then used to refer to the processes it takes.
Description
SignAPI creates a session folder that uses the session ID as folder name
Request
The Service provider's application sends the following GET request using TLS:
GET /api-session/v1.0/start
Authorization
The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.
Query parameters
Property | Type | Usage | Description |
---|---|---|---|
amount | Number | Optional | Amount of sessions to be created. Accepted values 1-100. |
Example
GET /api-session/v1.0/start HTTP/1.1 Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603 Host: signapi-prep.eparaksts.lv
Example with query parameters
GET /api-session/v1.0/start?amount=3 HTTP/1.1 Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603 Host: signapi-prep.eparaksts.lv
Response
JSON object:
{ "data": { "sessionId": {string} } }
Property | Type | Description |
---|---|---|
sessionId | String (64) | File processing session identifier. |
Example
{ "data": { "sessionId": "5a1ef5321d1bd9a2966d673c84c7ded630a1923965e3efcfc1787260cbe8223d" } }
Example with amount query parameter (multiple session creation)
{ "data": { "sessionIds": [ "daa88ba31deedbd02a56af404c88b982c208b92185b061d6c4311e71c2d591ed", "123464f4c82d167c7302c7d600b4b0d82b5db73da6c414b8e9d544f1d77e97b9", "3444a69fa828f93ac4b1d53a446220c21c62fc3bb966d1469cc4b93c57c62ca9" ] } }
Session - Close
Scope
Delete file processing session and related documents from memory.
Description
- Deleting files stored and created in the file processing session.
- Deleting the file processing session directory.
Request
The Service provider's application sends the following GET request using TLS:
GET /api-session/v1.0/{sessionId}/close
Ploperty | Type | Usage | Description |
---|---|---|---|
sessionId | String (64) | Mandatory | Session identifier |
Authorization
The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.
Example
GET /api-session/v1.0/77740b301f0880ef498cb1e474e8060b3e538cfeea8ebf508c2bad4b72b56a87/close HTTP/1.1 Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603 Host: signapi-prep.eparaksts.lv
Response
JSON object:
{ "data": "Session {sessionId} closed" }
Property | Type | Description |
---|---|---|
sessionId | String | File processing session identifier |
Example
{ "data": "Session 77740b301f0880ef498cb1e474e8060b3e538cfeea8ebf508c2bad4b72b56a87 closed" }