<a id=“SuperOffice_WebApi_Agents_ApiAgent”></a> Class ApiAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll API info: tenant status, API version, Client library version
Inheritance
object ← AgentBase ← ApiAgentImplements
IApiAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.CRM.WebApi.Client; using SuperOffice.CRM.WebApi.Client.Agents; WebApiOptions mySession = new WebApiOptions(“http://example.com/super/api”); using (ApiInfoAgent agent = new ApiInfoAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
<a id=“SuperOffice_WebApi_Agents_ApiAgent__ctor_System_Net_Http_HttpClient_”></a> ApiAgent(HttpClient)
Constructor: api status infoParameters
httpClient HttpClient
Use this HTTP client instead of making a new one. Client is disposed when agent is disposed.
<a id=“SuperOffice_WebApi_Agents_ApiAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> ApiAgent(WebApiOptions, HttpClient)
Constructor: api status infoParameters
configuration WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Use this HTTP client instead of making a new one. Client is disposed when agent is disposed.
Methods
<a id=“SuperOffice_WebApi_Agents_ApiAgent_GetApiVersionAsync_SuperOffice_WebApi_RequestOptions_”></a> GetApiVersionAsync(RequestOptions)
Gets version info from base URL.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StringDictionary> Dictionary containing meta-data: “NetServerVersion”, “Services”, “Version”<a id=“SuperOffice_WebApi_Agents_ApiAgent_GetClientFileVersion”></a> GetClientFileVersion()
Get the client assembly’s file version: ”#.#.###.###“Returns
string This assembly’s file version: ”#.#.###.###“<a id=“SuperOffice_WebApi_Agents_ApiAgent_GetTenantStatusAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetTenantStatusAsync(string, string, RequestOptions)
Returns the tenant status for a given customer, in a given environment. Does not need base URL to be set.Parameters
tenantCustId string
The Online customer id: “Cust1234”
subdomain string
“sod”, “qastage” or “online”. Default “online” (production). See <xref href=“SuperOffice.WebApi.SubDomain” data-throw-if-not-resolved=“false”></xref>
requestOptions RequestOptions
Override language/culture codes on this request.