Skip to main content

Class XBRApiUtilities

Namespace: Workspace.XBR.Xperiflow.SubApis

Assembly: Xperiflow.dll

Declaration
public class XBRApiUtilities

Methods

GetHttpClientManager(SessionInfo)

Retrieves the singleton instance of HttpClientManager.

Declaration
public IHttpClientManager GetHttpClientManager(SessionInfo si)
Returns

Workspace.XBR.Xperiflow.Utilities.Http.IHttpClientManager

An Workspace.XBR.Xperiflow.Utilities.Http.IHttpClientManager

Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosiThe SessionInfo object

GetHttpClient(SessionInfo, string, bool)

Get an instance of HttpClient for the specified baseUri.

Declaration
public HttpClient GetHttpClient(SessionInfo si, string baseUri, bool useShortTimeout = true)
Returns

System.Net.Http.HttpClient

An instance of System.Net.Http.HttpClient

Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosiThe SessionInfo object
System.StringbaseUriThe base address to communicate with
System.BooleanuseShortTimeoutA 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.

Declaration
public string GetXperiflowBaseUrl(SessionInfo si)
Remarks

Example:

Returns

System.String

The base URL with a guaranteed trailing slash.

Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosiThe 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.

Declaration
public string GetXperiflowBaseUrlForApplication(SessionInfo si, string applicationName)
Remarks

Example:

Returns

System.String

The base URL with a guaranteed trailing slash.

Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosiThe current session info.
System.StringapplicationNameThe 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.

Declaration
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
TypeNameDescription
OneStream.Shared.Common.SessionInfosiThe current session info.

Inherited Members

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.ToString

Was this page helpful?