Skip to main content

Session Management

Link's API Proxies uses OAS (OpenAPI Specification) scheme file with sessions for Detail-Command RIOs and Login calls in order to execute multiple API calls in a single session for performance purposes - ensuring that various pieces of data remain in memory in SAP.

Session Body

The Session section of the body has 2 parameters:

Keep: boolean (default: false).

Keep determines if the session should remain open after the request. Passing Keep: true will allow SAP to keep the current session open after the request and return it as Session.Value. Passing Keep: false will end the current session if Session.Value is also provided. If no Session.Value is provided, no session will be created.

Value: string (default: "")

The Value is an encrypted representation of the current session values. This encrypted blob also contains a random salt value to create a random length to prevent against oracle attacks. To maintain a session, the Value from the previous response should be included as the Value of the next request.

Request body example:


{
"MaterialId": "string",
"MaterialConfig": {},
"Session": {
"Keep": true,
"Value": "string"
}
}

Response body example:

{
"Result": {
"MaterialId": "string",
"MaterialConfig": {}
},
"Session": {
"Keep": true,
"Value": "CfD-[[Shortened]]-o8Q"
}
}

Closing Session

To close a session, simply call the /sessionClose that is included in API Spec to close the session with SAP. This will end the session in SAP.