Authentication

For customers in a OneStream-hosted environment, see the Identity and Access Management Guide for information about authentication with OneStream IdentityServer and using personal access tokens (PATs).

To secure REST API with OAuth 2.0 for customers in a self-hosted environment, configure authentication with one of these supported external providers:

Access tokens from the any of the above providers have short expiration times. To avoid copying the entire token value to the Authorization/Token text box, create a variable that holds the value. For every call to the external provider, the value of the access token returned will be copied to the variable.

  • Create a global variable in Postman, name it appropriately, for instance webapi_access_token.

  • In the Tests tab of the POST request to the external provider copy the script below:

               var data = pm.response.json();
               pm.environment.set("
webapi_access_token", data.access_token);

Authentication API

Method Endpoint Description
Post Authentication/Logon Logs on and returns a SessionInfo (SI) object for use with other Rest API calls that accept an SI as an argument. This endpoint performs a logon only and does not open an application. This is the equivalent of entering login credentials in the Desktop App before selecting and opening an application.
Authentication/Logon

POST https://{BaseWebServer}/Onestreamapi/api/Authentication/Logon?api-version=7.2.0

Query Parameters
Key Value Required
api-version 7.2.0 Yes
Authorization
Type Value Required
Bearer Token (your access token) Yes
Headers
Key Value Required
Content-Type application/json Yes
Request Body
Key Type Description Required
BaseWebServerURL string Your URL for the web service Yes
Sample Request
Copy
{
 "BaseWebServerUrl": "https:// golfstream.onestreamcloud.com/OneStreamWeb"
}
Sample Response
Copy
{
 "Message": "Logon succeeded.",
 "Logon SessionInfo": {
 "XfBytes": " QB8AACNodHRwOi8vbG9jYWxob3N0OjUwMDAxL09uZVN0cm
 VhbVdlYhQAAAB7izp1jCP3BUVr8bjD2f6KmmL5BKzhOVWUzU1MikEYOVekO
 ZUIT0tUQV9NMk27tnn6+VZaR544CKlYPCFeWSBWCTmQ2ggAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAFZW4tVVMAAAAAAAAAAAAAAAAAAAAAAAAAAP/////////
 /////////////////8P//////////////AwAAABn8//8Z/P//Gfz//xn8//
 8Z/P//Gfz//xn8//8Z/P//Gfz//xn8//8Z/P//Gfz//w==""
 },
 "Authorized applications": [
 "GolfStreamDemo_2022",
 "OFC_ECA_ProductMgmt",
 "OneStream_GolfStream"
 ]
}