Class XBRApiUtilities
Namespace: Workspace.XBR.Xperiflow.SubApis
Assembly: Xperiflow.dll
public class XBRApiUtilities
Methods
GetHttpClientManager(SessionInfo)
Retrieves the singleton instance of HttpClientManager.
public IHttpClientManager GetHttpClientManager(SessionInfo si)
Returns
Workspace.XBR.Xperiflow.Utilities.Http.IHttpClientManager
An Workspace.XBR.Xperiflow.Utilities.Http.IHttpClientManager
Parameters
| Type | Name | Description |
|---|---|---|
OneStream.Shared.Common.SessionInfo | si | The SessionInfo object |
GetHttpClient(SessionInfo, string, bool)
Get an instance of HttpClient for the specified baseUri.
public HttpClient GetHttpClient(SessionInfo si, string baseUri, bool useShortTimeout = true)
Returns
System.Net.Http.HttpClient
An instance of System.Net.Http.HttpClient
Parameters
| Type | Name | Description |
|---|---|---|
OneStream.Shared.Common.SessionInfo | si | The SessionInfo object |
System.String | baseUri | The base address to communicate with |
System.Boolean | useShortTimeout | A bool to determine whether to use a short (80s) timeout or long (2h) timeout |
GetXperiflowBaseUrl(SessionInfo)
Gets the Xperiflow base URL for the current OneStream application.
public string GetXperiflowBaseUrl(SessionInfo si)
Remarks
Example:
Returns
System.String
The base URL with a guaranteed trailing slash.
Parameters
| Type | Name | Description |
|---|---|---|
OneStream.Shared.Common.SessionInfo | si | The current session info. |
Exceptions
OneStream.Shared.Common.XFException
Thrown when the workspace cannot be found or the base URL parameter is not configured.
GetXperiflowBaseUrlForApplication(SessionInfo, string)
Gets the Xperiflow base URL for a specific OneStream application.
public string GetXperiflowBaseUrlForApplication(SessionInfo si, string applicationName)
Remarks
Example:
Returns
System.String
The base URL with a guaranteed trailing slash.
Parameters
| Type | Name | Description |
|---|---|---|
OneStream.Shared.Common.SessionInfo | si | The current session info. |
System.String | applicationName | The OneStream application name to look up. |
Exceptions
OneStream.Shared.Common.XFException
Thrown when the application cannot be opened or the base URL parameter is not configured.
GetXperiflowBaseUrls(SessionInfo)
Returns a mapping of all OneStream application names to their Xperiflow base URLs. Applications without a configured URL are silently excluded.
public Dictionary<string, string> GetXperiflowBaseUrls(SessionInfo si)
Remarks
Example:
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
A dictionary keyed by application name with base-URL values (trailing slash guaranteed).
Parameters
| Type | Name | Description |
|---|---|---|
OneStream.Shared.Common.SessionInfo | si | The current session info. |
Inherited Members
System.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)System.Object.ToString