Show / Hide Table of Contents

Class EthosConfigurationClient

A client that can be used to call configuration endpoints in the Ethos Integration API.

Inheritance
System.Object
EthosClient
EthosConfigurationClient
Inherited Members
EthosClient.ApiKey
EthosClient.expirationMinutes
EthosClient.ExpirationMinutes
EthosClient.AutoRefresh
EthosClient.Token
EthosClient.Region
EthosClient.HttpProtocolClientBuilder
EthosClient.EthosResponseBuilder
EthosClient.ResponseHandlerAsync(HttpResponseMessage)
EthosClient.AttachHeaders(HttpClient, Dictionary<String, String>)
EthosClient.GetAccessTokenAsync()
EthosClient.GetNewTokenAsync()
EthosClient.GetHttpClient()
EthosClient.GetStringAsync(Dictionary<String, String>, String)
EthosClient.GetAsync(Dictionary<String, String>, String)
EthosClient.GetAsync(String)
EthosClient.HeadAsync(String)
EthosClient.PostAsync(Dictionary<String, String>, String, String)
EthosClient.PutAsync(Dictionary<String, String>, String, String)
EthosClient.DeleteAsync(Dictionary<String, String>, String)
EthosClient.AddAccessTokenAuthHeaderAsync(Dictionary<String, String>)
Namespace: Ellucian.Ethos.Integration.Config
Assembly: Ellucian.Ethos.Integration.dll
Syntax
public class EthosConfigurationClient : EthosClient

Constructors

EthosConfigurationClient(String, HttpClient)

Public constructor taking a api key and http client parameter.

Note that the preferred way to instantiate this class is through the EthosClientBuilder

Declaration
public EthosConfigurationClient(string apiKey, HttpClient httpClient)
Parameters
Type Name Description
System.String apiKey

A valid API key from Ethos Integration. This is required to be a valid 36 character GUID string. If it is null or empty, an will be thrown or not in a valid GUID format, then a will be thrown.

HttpClient httpClient

The http client required to make calls through the Ethos Proxy API.

Fields

FULL_VERSION

Pattern used to provide the full version of a given resource.

Declaration
public static readonly string FULL_VERSION
Field Value
Type Description
System.String

FULL_VERSION_TAG

The tag used as a placeholder for the version value in the FULL_VERSION string.

Declaration
public static readonly string FULL_VERSION_TAG
Field Value
Type Description
System.String

JSON_APPICATIONID

Constant used when accessing an applicationId property from a json.

Declaration
public static readonly string JSON_APPICATIONID
Field Value
Type Description
System.String

JSON_APPID

Constant used when accessing an appId property from a json.

Declaration
public static readonly string JSON_APPID
Field Value
Type Description
System.String

JSON_APPLICATION_JSON

Constant used when accessing application/json property from a json.

Declaration
public static readonly string JSON_APPLICATION_JSON
Field Value
Type Description
System.String

JSON_APPNAME

Constant used when accessing an appName property from a json.

Declaration
public static string JSON_APPNAME
Field Value
Type Description
System.String

JSON_FILTERS

Constant used when accessing Filters.

Declaration
public static readonly string JSON_FILTERS
Field Value
Type Description
System.String

JSON_ID

Constant used when accessing an id property from a json.

Declaration
public static readonly string JSON_ID
Field Value
Type Description
System.String

JSON_NAME

Constant used when accessing a name property from a json.

Declaration
public static readonly string JSON_NAME
Field Value
Type Description
System.String

JSON_NAMED_QUERIES

Constant used when accessing Named Queries.

Declaration
public static readonly string JSON_NAMED_QUERIES
Field Value
Type Description
System.String

JSON_NON_SEMANTIC_LIST

Constant used when accessing non semantic version list name.

Declaration
static readonly string JSON_NON_SEMANTIC_LIST
Field Value
Type Description
System.String

JSON_REPRESENTATIONS

Constant used when accessing a representations property path from a json.

Declaration
public static string JSON_REPRESENTATIONS
Field Value
Type Description
System.String

JSON_RESOURCE

Constant used when accessing a resource property from a json.

Declaration
public static readonly string JSON_RESOURCE
Field Value
Type Description
System.String

JSON_RESOURCE_NAME

Constant used when accessing a resource.name property path from a json.

Declaration
public static readonly string JSON_RESOURCE_NAME
Field Value
Type Description
System.String

JSON_RESOURCENAME

Constant used when accessing a resourceName property on a json.

Declaration
public static readonly string JSON_RESOURCENAME
Field Value
Type Description
System.String

JSON_RESOURCES

Constant used when accessing a resources property from a json.

Declaration
public static readonly string JSON_RESOURCES
Field Value
Type Description
System.String

JSON_SEMANTIC_LIST

Constant used when accessing list of semantic version name.

Declaration
static readonly string JSON_SEMANTIC_LIST
Field Value
Type Description
System.String

JSON_VERSION

Constant used when accessing a version property from a json.

Declaration
public static readonly string JSON_VERSION
Field Value
Type Description
System.String

JSON_VERSIONS

Constant used when accessing versions property from a json.

Declaration
public static readonly string JSON_VERSIONS
Field Value
Type Description
System.String

JSON_XMEDIATYPE

Constant used when accessing an X-Media-Type property from a json.

Declaration
public static readonly string JSON_XMEDIATYPE
Field Value
Type Description
System.String

Properties

EthosResponseConverter

EthosResponseConverter used to convert from EthosResponses to string or Json formats.

Declaration
EthosResponseConverter EthosResponseConverter { }
Property Value
Type Description
EthosResponseConverter

Methods

FilterAvailableResources(JArray, JArray)

Filter the given list of available resources by the list of desired resources. The expected formats are:

  • availableResources - JSON response from calling the /admin/available-resources endpoint in Ethos Integration
  • desiredResources - JSON array containing objects with 'applicationId' and 'resourceName' properties. This is the format of the 'ownerOverrides' array from calling the /appConfig endpoint in Ethos Integration.
Declaration
public JArray FilterAvailableResources(JArray availableResources, JArray desiredResources)
Parameters
Type Name Description
JArray availableResources

The entire list of available resources from Ethos Integration.

JArray desiredResources

The target list of specific app resources that you want returned.

Returns
Type Description
JArray

A filtered list of available resources.

FilterAvailableResources(JArray, String)

Filter the given list of available resources by the name of the resource. The expected format of the available resources list is the JSON response from calling the /admin/available-resources endpoint in Ethos Integration. This returns an array containing the details of the given resource from each owning application in the available resources list.

Declaration
public JArray FilterAvailableResources(JArray availableResources, string resourceName)
Parameters
Type Name Description
JArray availableResources

The entire list of available resources from Ethos Integration

System.String resourceName

The name of the resource for which you want details

Returns
Type Description
JArray

A filtered list of available resources.

FilterMajorVersions(IEnumerable<String>)

Intended to be used internally within the SDK.

Filters the given versionList to remove duplicate versions and ensure each version in the returned list a major whole number version only.

Declaration
protected List<string> FilterMajorVersions(IEnumerable<string> versionList)
Parameters
Type Name Description
IEnumerable<System.String> versionList

A list of versions from a given resource.

Returns
Type Description
List<System.String>

A list of filtered versions containing no duplicates where each version in the list is a major whole version only.

GetAllAvailableResourcesAsJsonAsync()

Get the details about all the available resources in the tenant associate with this client's access token as a JSON array.

Declaration
public async Task<JArray> GetAllAvailableResourcesAsJsonAsync()
Returns
Type Description
Task<JArray>

The available resources details in a .

GetAllAvailableResourcesAsync()

Get the details about all the available resources in the tenant associated with this client's access token.

Declaration
public async Task<string> GetAllAvailableResourcesAsync()
Returns
Type Description
Task<System.String>

The available resources details in string format.

GetAppConfigAsync()

Get application's configuration info from Ethos Integration. This returns the config data for the application that this client's access token belongs to.

Declaration
public async Task<string> GetAppConfigAsync()
Returns
Type Description
Task<System.String>

The config info for your app in string format.

GetAppConfigJsonAsync()

Get application's configuration as a JSON object from Ethos Integration. This returns the config data for the application that this client's access token belongs to.

Declaration
public async Task<JObject> GetAppConfigJsonAsync()
Returns
Type Description
Task<JObject>

The config info for your app in a .

GetAvailableResourcesForAppAsJsonAsync()

Get the details about the available resources your application points to, from the tenant associated with this client's session token. The results will be filtered based on the 'ownerOverrides' array from the access token application's config data.

Declaration
public async Task<JArray> GetAvailableResourcesForAppAsJsonAsync()
Returns
Type Description
Task<JArray>

The available resources details in a .

GetAvailableResourcesForAppAsync()

Get the details about the available resources your application points to, from the tenant associated with this client's access token. The results will be filtered based on the 'ownerOverrides' array from the access token application's config data.

Declaration
public async Task<string> GetAvailableResourcesForAppAsync()
Returns
Type Description
Task<System.String>

The available resources details in a string format.

GetFiltersAndNamedQueriesAsync(String, String)

Gets a JObject containing the supported filters and named queries for the given resource and version header. If the given versionHeader is null or empty, the latest version will be used.
The following is an example of the JSON data structure within the returned JObject:

{
  "resourceName" : "persons",
  "version" : "application/vnd.hedtech.integration.v12.3.0+json",
  "namedQueries" : [
      {
          "filters" : [ "personFilter" ],
          "name" : "personFilter"
      }
  ],
  "filters" : [
      "names.title",
      "names.firstName",
      "names.middleName",
      "names.lastNamePrefix",
      "names.lastName",
      "names.pedigree",
      "roles.role",
      "credentials.type",
      "credentials.value",
      "alternativeCredentials.type.id",
      "alternativeCredentials.value",
      "emails.address"
  ]
}

Throws an EthosResourceNotFoundException (Runtime) if the given resourceName is not found in the available-resource response.

Declaration
public async Task<JObject> GetFiltersAndNamedQueriesAsync(string resourceName, string versionHeader = "")
Parameters
Type Name Description
System.String resourceName

The name of the resource to get available filters and named queries for.

System.String versionHeader

The version header value used to retrieve available filters and/or named queries for the resource. If null or empty, the latest version header value will be used.

Returns
Type Description
Task<JObject>

A JObject containing the name of the resource and version header, with filters if they exist for the given resource and version, and/or named queries if they exist for the given resource and version.

GetFiltersAsync(String, String)

Gets a list of filters for the given resource name. The latest version of the given resource is used to obtain the list of filters.

Declaration
public async Task<IEnumerable<string>> GetFiltersAsync(string resourceName, string versionHeader = "")
Parameters
Type Name Description
System.String resourceName

The name of the Ethos resource for which to get a list of filters.

System.String versionHeader

The full version header value for which to get a list of filters for the given resource.

Returns
Type Description
Task<IEnumerable<System.String>>

A list of filter values (strings) which the given resource supports, or an empty list if none found.

GetLatestVersionAsync(String)

Gets the latest version of the given resource. Could return either a Semantic version (e.g. 12.0.0), or a non-semantic version (e.g. 12), as a string value.

Declaration
async Task<string> GetLatestVersionAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The name of the resource to get the latest version of.

Returns
Type Description
Task<System.String>

The latest version of the given resource, either a semantic version, or a non-semantic whole number value, as a string.

GetLatestVersionHeaderAsync(String)

Gets the latest version header of the given resource.

Declaration
public async Task<string> GetLatestVersionHeaderAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The name of the resource to get the latest version header for.

Returns
Type Description
Task<System.String>

The latest full version header value of the given resource.

GetMajorVersionsOfResourceAsync(String)

Gets only the major version headers as a List of strings for the given resource name. Gets the entire version header string of the resource also found in the Accept Header of the request containing only the major versioning notation: e.g.application/vnd.hedtech.integration.v12+json

The following table shows examples given various supported versions. Supported resource versions and versions returned by the SDK:-

  • Resource Supports Versions SDK Returns Version
  • v12.2.1, v12, v12.0.0, v13.1.0
  • application/vnd.hedtech.integration.v12+json, application/vnd.hedtech.integration.v13+json
  • v3, v4.5.0, v5.0.1
  • application/vnd.hedtech.integration.v3+json, application/vnd.hedtech.integration.v4+json, application/vnd.hedtech.integration.v5+json
  • v2.0.1, v3.2.0, v3.0.0
  • application/vnd.hedtech.integration.v2+json, application/vnd.hedtech.integration.v3+json, application/vnd.hedtech.integration.v10+json, application/vnd.hedtech.integration.v11+json
  • v10.0.0, v11.12.0, v11.12.3

Also throws an ArgumentNullException (Runtime) if the given resourceName is null or empty.

Declaration
public async Task<IEnumerable<string>> GetMajorVersionsOfResourceAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

Returns
Type Description
Task<IEnumerable<System.String>>

A List of Strings where each item in the list is a major version supported by the given resource.

GetNamedQueriesAsync(String, String)

Gets named queries for the given resource name and version header value. If the given version header is null or empty, the latest version of the given resource will be used.

Declaration
public async Task<Dictionary<string, IEnumerable<string>>> GetNamedQueriesAsync(string resourceName, string versionHeader = "")
Parameters
Type Name Description
System.String resourceName

The name of the Ethos resource for which to get a map of named queries.

System.String versionHeader

The full version header value for which to get a map of named queries for the given resource.

Returns
Type Description
Task<Dictionary<System.String, IEnumerable<System.String>>>

A map of named query values (strings) which the given resource supports, or an empty map if none found. Each key in the map is the name of a named query, with a corresponding value which is a string list of filter values.

GetResourceDetailsAsJsonAsync(String)

Get the details of a single resource from the tenant associated with this client's access token. The results will include details from each application in the tenant that owns the resource.

The format of the response will be a JSON array with each object containing the following properties:

  • appId - the ID of an owning application.
  • appName - the name of an owning application.
  • resource - the details of the resource.

Declaration
public async Task<JArray> GetResourceDetailsAsJsonAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The name of the resource for which you want details.

Returns
Type Description
Task<JArray>

The resource details in a JSON array.

GetResourceDetailsAsync(String)

Get the details of a single resource from the tenant associated with this client's access token. The results will include details from each application in the tenant that owns the resource.

The format of the response will be a JSON array with each object containing the following properties:

  • appId - the ID of an owning application
  • appName - the name of an owning application
  • resource - the details of the resource.

Declaration
public async Task<string> GetResourceDetailsAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The name of the resource for which you want details.

Returns
Type Description
Task<System.String>

The resource details in string format.

GetResourceDetailsJsonAsync(String)

Get the details of a single resource from the tenant associated with this client's access token. The results will include details from each application in the tenant that owns the resource.

The format of the response will be a JSON array with each object containing the following properties:

  • appId - the ID of an owning application
  • appName - the name of an owning application
  • resource - the details of the resource

Declaration
public async Task<JArray> GetResourceDetailsJsonAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The name of the resource for which you want details.

Returns
Type Description
Task<JArray>

The resource details in a JSON array.

GetResourceVersionsByRepresentationTypeAsync(String, String)

Intended to be used internally within the SDK.

Gets an ArrayNode containing a list of objects with each element in the list having this structure:

  • appId - the application ID of the app in Ethos Integration
  • appName - the name of the application in Ethos Integration
  • resourceName - the name of the Ethos resource
  • versions - a list of versions based on the representationType

Gets a list of versions of the given resource name from the available-resources API. Uses the representationType param to return either a list of version headers, or a list of version values. Version values are prefixed with the char 'v', e.g.v4.5.0. To return a list of version headers, the representationType must be '/X-Media-Type'. To return a list of version values, the representationType must be '/version'. A runtime ArgumentNullException will be thrown if the resourceName param is null or empty, or if the representationType param is not one of those two supported values. Each version in the list is from the /resource/representations/X-Media-Type or the /resource/representations/version property of the available-resources response for the given resource across all Ethos applications for the tenant in the access token. The returned list may contain duplicate version values.

Declaration
protected async Task<JArray> GetResourceVersionsByRepresentationTypeAsync(string resourceName, string representationType)
Parameters
Type Name Description
System.String resourceName

The resource for which to get a list of versions.

System.String representationType

The jsonLabel in the available-resources response used to access the version or version header value. Expected to only be 'version' or 'X-Media-Type', otherwise an ArgumentException will be thrown.

Returns
Type Description
Task<JArray>

A list of supported version values for the given resource according to the given representationType. If the representationType is 'X-Media-Type' a list of full version headers will be returned. If the representationType is 'version' a list of version values where each version value is prefixed with the 'v' char will be returned.

GetVersionHeaderAsync(String, SemVer)

Gets the full version header string for the given resource and SemVer if the resource supports the given version contained within the SemVer. If the resource does not support the SemVer version, an UnsupportedVersionException is thrown, which is a RuntimeException.

Also throws an IllegalArgumentException (Runtime) if the given resourceName is null or empty or the given semVer is null.

NOTE: This method should only be used when the complete semVer notation of a version is known.For example, using the SemVer version when only the major.minor version is provided will result in a patch version of 0, which may or may not be desired.

Declaration
public async Task<string> GetVersionHeaderAsync(string resourceName, SemVer semVer)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

SemVer semVer

The SemVer containing the requested version of the resource.

Returns
Type Description
Task<System.String>

Gets the full version header string for the given resource and SemVer.

GetVersionHeaderAsync(String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Gets the full version header string for the given resource, major, minor, and patch version if the resource supports the given major.minor.patch version. If the resource does not support the major.minor.patch version, an UnsupportedVersionException is thrown, which is a RuntimeException.

Also throws an IllegalArgumentException (Runtime) if the given resourceName is null or empty.

Declaration
public async Task<string> GetVersionHeaderAsync(string resourceName, int? majorVersion = null, int? minorVersion = null, int? patchVersion = null)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

System.Nullable<System.Int32> majorVersion

The major version of the resource to check.

System.Nullable<System.Int32> minorVersion

The minor version of the resource to check.

System.Nullable<System.Int32> patchVersion

The patch version of the resource to check.

Returns
Type Description
Task<System.String>

The full version string for the given resource and major.minor.patch version: e.g. application/vnd.hedtech.integration.v12.1.3+json

GetVersionHeadersForAppAsync(String)

Returns a list of version headers for the given resourceName filtered by the ownerOverrides property from appConfig. Returns a simple list of version headers because each resource is only listed once under ownerOverrides. The results will be filtered based on the resources available in the 'ownerOverrides' array from the session token application's configuration data. If resourceName not found in ownerOverrides, returns an empty List.

Declaration
public async Task<IEnumerable<string>> GetVersionHeadersForAppAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

Returns
Type Description
Task<IEnumerable<System.String>>

A list of version headers according to whether the given resource is found in the ownerOverrides property of appConfig, or an empty list if not found.

GetVersionHeadersOfResourceAsStringsAsync(String)

Gets a list of version header string values from the versions json property of the ArrayNode returned from {@link #getVersionHeadersOfResource(string) getVersionHeadersOfResource()}.

Declaration
public async Task<IEnumerable<string>> GetVersionHeadersOfResourceAsStringsAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

Returns
Type Description
Task<IEnumerable<System.String>>

A list of version header strings.

GetVersionHeadersOfResourceAsync(String)

Gets a list of full version headers of the given resource name from the available-resources API. Each version in the list is from the /resource/representations/X-Media-Type property of the available-resources response for the given resource across all Ethos applications for the tenant in the access token.An example of a full version header returned in the list is "application/vnd.hedtech.integration.v8+json". The returned list may contain duplicate version header values.

Each element in the returned ArrayNode contains the following properties:

  • appId - The GUID applicationId.
  • appName - The name of the application in Ethos Integration.
  • resourceName - The name of the Ethos resource.
  • versions - An array of version header values: e.g. [ "application/vnd.hedtech.integration.v8+json", "application/vnd.hedtech.integration.v12.1.0+json" ]

The following is an example of the JSON data structure contained within the returned ArrayNode:

[
    {
       "appId" : "11111111-1111-1111-1111-111111111111",
       "appName" : "Banner Integration API",
       "resourceName" : "general-ledger-transactions",
       "versions" : [
       "application/vnd.hedtech.integration.v6+json",
       "application/vnd.hedtech.integration.v8+json",
       "application/vnd.hedtech.integration.v12.1.0+json",
       "application/vnd.hedtech.integration.v12.0.0+json",
       "application/vnd.hedtech.integration.v12+json",
       "application/json"
        ]
    }
]

Declaration
public async Task<JArray> GetVersionHeadersOfResourceAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

Returns
Type Description
Task<JArray>

A list of supported version headers for the given resource.

GetVersionList(JArray, String)

Intended to be used internally by the SDK.

Reads the given application/resource arrayNode and returns a simple list of version strings from that node. The given arrayNode is expected to contain an array of the following properties:

  • appId - the application ID of the app in Ethos Integration
  • appName - the name of the application in Ethos Integration
  • resourceName - the name of the Ethos resource
  • versions - a list of versions based on the representationType
Declaration
protected IEnumerable<string> GetVersionList(JArray arrayNode, string representationType)
Parameters
Type Name Description
JArray arrayNode

The arrayNode containing application/resource info with a list of versions per resource.

System.String representationType

The JSON property to use, expected to be "/versions" when the array node contains both version values (v2, v3.0.4, etc.) and version header strings.

Returns
Type Description
IEnumerable<System.String>

A list of the versions as strings.

GetVersionListForOwnerOverrides(JArray, String)

Intended to be used internally by the SDK.

Extracts a list of versions as either a list of version headers or a list of version values depending on the representationType.

Declaration
protected IEnumerable<string> GetVersionListForOwnerOverrides(JArray resourcesArrayNode, string representationType)
Parameters
Type Name Description
JArray resourcesArrayNode

The ArrayNode containing a list of resources per the ownerOverrides configuration from appConfig.

System.String representationType

The type of version representation to extract, either "/version" for the version value, or "/X-Media-Type" for the version header value.

Returns
Type Description
IEnumerable<System.String>

A list of either version values or version headers per the representationType.

GetVersionsForAppAsync(String)

Returns a list of versions for the given resourceName filtered by the ownerOverrides property from appConfig. Returns a simple list of versions because each resource is only listed once under ownerOverrides. The results will be filtered based on the resources available in the 'ownerOverrides' array from the session token application's configuration data. If resourceName not found in ownerOverrides, returns an empty List.

Declaration
public async Task<IEnumerable<string>> GetVersionsForAppAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

Returns
Type Description
Task<IEnumerable<System.String>>

A list of versions according to whether the given resource is found in the ownerOverrides property of appConfig, or an empty list if not found.Each version in the list will be prefixed with the 'v' char, e.g. "v4.5".

GetVersionsOfResourceAsStringsAsync(String)

Gets a list of version string values from the /versions json property of the JArray returned from {@link #getVersionsOfResource(string) getVersionsOfResource()}. Version values are gathered from across Ethos Integration applications for the given tenant(access token) and resource name, and should not contain duplicate values.

Declaration
public async Task<IEnumerable<string>> GetVersionsOfResourceAsStringsAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The name of the Ethos resource to get a list of versions for.

Returns
Type Description
Task<IEnumerable<System.String>>

A list of version strings. Each element in the list is prefixed with the 'v' char, e.g. "v4.5".

GetVersionsOfResourceAsync(String)

Gets a list of versions of the given resource name from the available-resources API. Each version in the list is from the /resource/representations/version property of the available-resources response for the given resource across all Ethos applications for the tenant in the access token.Each version value in the returned list is prefixed with the 'v' char, e.g. 'v4.5.1'. The returned list may contain duplicate version values.

Each element in the returned ArrayNode contains the following properties:

  • appId - The GUID applicationId.
  • appName - The name of the application in Ethos Integration.
  • resourceName - The name of the Ethos resource.
  • versions - An array of version values, each prefixed with the 'v' char: e.g. [ 'v6', 'v8', 'v12.1.0' ]

The following is an example of the JSON data structure contained within the returned ArrayNode:

[
   {
      "appId" : "11111111-1111-1111-1111-111111111111",
      "appName" : "Banner Integration API",
      "resourceName" : "general-ledger-transactions",
      "versions" : [ "v6", "v8", "v12.1.0", "v12.0.0", "v12" ]
   }
]

Declaration
async Task<JArray> GetVersionsOfResourceAsync(string resourceName)
Parameters
Type Name Description
System.String resourceName

The resource for which to get a list of versions.

Returns
Type Description
Task<JArray>

A list of supported version values for the given resource.

IsResourceVersionSupportedAsync(String, SemVer)

Indicates if the requested Ethos resource supports a version represented by the given SemVer object. SemVer objects are to be used where a version is truly a semantic version, and not when any of the major, minor, or patch versions of the semantic version notation are missing or not known.For example, this method should not be used when trying to determine if version 12.2 is supported because the given SemVer will translate 12.2 into 12.2.0 which is different.

Also throws an ArgumentNullException (Runtime) if the given resourceName is null or empty or the given semVer is null.

Declaration
public async Task<bool> IsResourceVersionSupportedAsync(string resourceName, SemVer semVer)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

SemVer semVer

The SemVer object containing the full semantic version to check for the resource.

Returns
Type Description
Task<System.Boolean>

True if the given resource supports the specified full version header, false otherwise.

IsResourceVersionSupportedAsync(String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Indicates if the given resource supports the given major version. For example, if the resource supports this version:
application/vnd.hedtech.integration.v12+json

this method will return true if the major version is 12. However, if the resource only supports these versions:

application/vnd.hedtech.integration.v12.0+json ORapplication/vnd.hedtech.integration.v12.0.0+json

this method will return false.

Also throws an ArgumentNullException (Runtime) if the given resourceName is null or empty.

Declaration
public async Task<bool> IsResourceVersionSupportedAsync(string resourceName, int? majorVersion = null, int? minorVersion = null, int? patchVersion = null)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

System.Nullable<System.Int32> majorVersion

The major version of the resource to check.

System.Nullable<System.Int32> minorVersion

The minor version of the resource to check.

System.Nullable<System.Int32> patchVersion

The patch version of the resource to check.

Returns
Type Description
Task<System.Boolean>

True if the given resource supports the given major version, false otherwise.

IsResourceVersionSupportedAsync(String, String)

Indicates if the given resource supports the given full version header. The full version header should be in the following format: application/vnd.hedtech.integration.vSEMVER+json, where SEMVER is the semantic version of the requested resource.

Also throws an ArgumentNullException( Runtime) if the given resourceName or fullVersionHeader is null or empty.

Declaration
public async Task<bool> IsResourceVersionSupportedAsync(string resourceName, string fullVersionHeader)
Parameters
Type Name Description
System.String resourceName

The resource name for which to get a list of supported version headers.

System.String fullVersionHeader

The full version header of the Ethos resource as described above.

Returns
Type Description
Task<System.Boolean>

True if the given resource supports the specified full version header, false otherwise.

SplitVersionList(IEnumerable<String>)

Used internally by the SDK.

The given versionList could contain both semantic and non-semantic version values. Splits the versionList into 2 lists: 1 with SemVer values, and 1 with non-semantic Integer version values.

Any null or blank version values in the versionList will be filtered out and not processed.

Declaration
Dictionary<string, IEnumerable<object>> SplitVersionList(IEnumerable<string> versionList)
Parameters
Type Name Description
IEnumerable<System.String> versionList
Returns
Type Description
Dictionary<System.String, IEnumerable<System.Object>>

Dictionary containing splits versionList into two.

ValidateResourceNameNotNull(String, String)

Used internally by the SDK.

Validates the given resourceName to ensure it is not null or empty( blank). Throws an ArgumentNullException with the given errorMessage if the resourceName is null or empty.

Declaration
static void ValidateResourceNameNotNull(string resourceName, string errorMessage)
Parameters
Type Name Description
System.String resourceName

The name of the resource for which you want details.

System.String errorMessage

The error message.

In This Article
Back to top Generated by DocFX