463c2997-8a6a-4688-9575-6549e5215f7b
true
D0011-SQL-01.sdt.local
StrataSphere
true
<ProgramFilesX64>\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll
Amazon.Lambda.S3Events
AWSSDK.Core
AWSSDK.S3
RestSharp
Amazon
Amazon.Auth.AccessControlPolicy
Amazon.Auth.AccessControlPolicy.ActionIdentifiers
Amazon.Internal
Amazon.Lambda.S3Events
Amazon.MissingTypes
Amazon.Runtime
Amazon.Runtime.CredentialManagement
Amazon.Runtime.CredentialManagement.Internal
Amazon.Runtime.EventStreams
Amazon.Runtime.EventStreams.Internal
Amazon.Runtime.Internal
Amazon.Runtime.Internal.Auth
Amazon.Runtime.Internal.Settings
Amazon.Runtime.Internal.Transform
Amazon.Runtime.Internal.Util
Amazon.Runtime.SharedInterfaces
Amazon.Runtime.SharedInterfaces.Internal
Amazon.S3
Amazon.S3.Encryption
Amazon.S3.Encryption.Internal
Amazon.S3.Internal
Amazon.S3.IO
Amazon.S3.Model
Amazon.S3.Model.Internal.MarshallTransformations
Amazon.S3.Transfer
Amazon.S3.Util
Amazon.Util
Amazon.Util.Internal
Amazon.Util.Internal.PlatformServices
Newtonsoft.Json
Newtonsoft.Json.Converters
Newtonsoft.Json.Linq
Newtonsoft.Json.Schema
Newtonsoft.Json.Serialization
System
System.Diagnostics
System.Diagnostics.Tracing
System.IO.Compression
ThirdParty.BouncyCastle.Asn1
ThirdParty.BouncyCastle.Asn1.Utilities
ThirdParty.BouncyCastle.Math
ThirdParty.BouncyCastle.OpenSsl
ThirdParty.BouncyCastle.Utilities.IO.Pem
ThirdParty.Ionic.Zlib
ThirdParty.Json.LitJson
ThirdParty.MD5
RestSharp
System.Dynamic
private string BaseUrl = "https://api-prod.sdt.local/starterset-api/api/v1/"; //"https://starterset-api.dev.k8s.sdt.local/api/v1/";
void Main()
{
RestClient client = new RestClient();
client.BaseUrl = new Uri(BaseUrl.Replace("/api/v1/", "/health"));
RestRequest request = new RestRequest();
request.Method = Method.GET;
client.Execute(request).Content.Dump("health");
var definitions = GetList(client, "Definitions");
definitions?
.OrderBy(d => d.Name).ThenBy(d => d.AttributeId)
.Dump(nameof(definitions));
var mdx = GetList(client, "MdxScoreToCube");
mdx?
.OrderBy(d => d.ScoreDimensionName).ThenBy(d => d.CubeDimensionName)
.Dump(nameof(mdx));
}
// Define other methods and classes here
dynamic GetList(RestClient client, string something)
{
client.BaseUrl = new Uri(BaseUrl + something);
RestRequest request = new RestRequest();
request.Method = Method.GET;
var converter = new ExpandoObjectConverter();
return JsonConvert.DeserializeObject(client.Execute(request).Content, converter);
}
IEnumerable GetList(RestClient client, string something)
{
return Get>(client, something);
}
T Get(RestClient client, string something)
{
client.BaseUrl = new Uri(BaseUrl + something);
RestRequest request = new RestRequest();
request.Method = Method.GET;
return JsonConvert.DeserializeObject(client.Execute(request).Content,
new JsonSerializerSettings
{
Error = delegate (object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args)
{
args.ErrorContext.Error.Message.Dump();
args.ErrorContext.Handled = true;
}
});
}
public class DefinitionDto
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public Guid HierarchyGuid { get; set; }
public Guid DimensionGuid { get; set; }
public Guid AttributeGuid { get; set; }
public string HierarchyId { get; set; }
public string DimensionId { get; set; }
public string AttributeId { get; set; }
public DateTime DateCreated { get; set; }
public DateTime DateLastModified { get; set; }
public DefinitionDto()
{
}
}