-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:panoramicdata/LogicMonitor.Api
- Loading branch information
Showing
33 changed files
with
240 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace LogicMonitor.Api.Data; | ||
|
||
/// <summary> | ||
/// A run report request | ||
/// </summary> | ||
[DataContract] | ||
public class RunReportRequest | ||
{ | ||
/// <summary> | ||
/// The With Admin ID | ||
/// </summary> | ||
[DataMember(Name = "withAdminId")] | ||
public int WithAdminId { get; set; } = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace LogicMonitor.Api.Data; | ||
|
||
/// <summary> | ||
/// A run report response | ||
/// </summary> | ||
[DataContract] | ||
public class RunReportResponse | ||
{ | ||
/// <summary> | ||
/// The report ID | ||
/// </summary> | ||
[DataMember(Name = "reportId")] | ||
public int ReportId { get; set; } | ||
|
||
/// <summary> | ||
/// The task ID | ||
/// </summary> | ||
[DataMember(Name = "taskId")] | ||
public long TaskId { get; set; } | ||
|
||
/// <summary> | ||
/// The result URL | ||
/// </summary> | ||
[DataMember(Name = "resulturl")] | ||
public string ResultUrl { get; set; } = string.Empty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace LogicMonitor.Api; | ||
/// <summary> | ||
/// An object that has a Description | ||
/// </summary> | ||
public interface IHasDescription | ||
{ | ||
/// <summary> | ||
/// The Description | ||
/// </summary> | ||
public string Description { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace LogicMonitor.Api; | ||
/// <summary> | ||
/// Defines that the object has a Name property | ||
/// </summary> | ||
public interface IHasName | ||
{ | ||
/// <summary> | ||
/// The name | ||
/// </summary> | ||
public string Name { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace LogicMonitor.Api; | ||
|
||
/// <summary> | ||
/// Report interaction | ||
/// </summary> | ||
public partial class LogicMonitorClient | ||
{ | ||
/// <summary> | ||
/// Runs a Report by ID and returns | ||
/// </summary> | ||
/// <param name="reportId">The report ID to run</param> | ||
/// <param name="cancellationToken">An optional cancellation token</param> | ||
/// <returns>The website</returns> | ||
public Task<RunReportResponse> RunReportById(int reportId, CancellationToken cancellationToken = default) | ||
=> PostAsync<RunReportRequest, RunReportResponse>(new RunReportRequest(), $"report/reports/{reportId}/executions", cancellationToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
namespace LogicMonitor.Api.Reports; | ||
|
||
/// <summary> | ||
/// A ReportGroup creation DTO. This is incomplete i.e. does not yet include properties to set a schedule or recipients | ||
/// </summary> | ||
[DataContract] | ||
public class ReportCreationDto : CreationDto<ReportBase> | ||
{ | ||
/// <summary> | ||
/// The type, e.g Dashboard | ||
/// </summary> | ||
[DataMember(Name = "type")] | ||
public string Type { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// The Group ID | ||
/// </summary> | ||
[DataMember(Name = "groupId")] | ||
public int GroupId { get; set; } | ||
|
||
/// <summary> | ||
/// The name | ||
/// </summary> | ||
[DataMember(Name = "name")] | ||
public string Name { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// The description | ||
/// </summary> | ||
[DataMember(Name = "description")] | ||
public string Description { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// The format - HTML or PDF | ||
/// </summary> | ||
[DataMember(Name = "format")] | ||
public string Format { get; set; } = "HTML"; | ||
|
||
/// <summary> | ||
/// The expiry type - High Flexibiilty or High Security | ||
/// </summary> | ||
[DataMember(Name = "reportLinkExpire")] | ||
public string ReportLinkExpire { get; set; } = "High Flexibility"; | ||
|
||
/// <summary> | ||
/// The date range | ||
/// </summary> | ||
[DataMember(Name = "dateRange")] | ||
public string DateRange { get; set; } = "Default"; | ||
|
||
/// <summary> | ||
/// The Dashboard ID | ||
/// </summary> | ||
[DataMember(Name = "dashboardId")] | ||
public int DashboardId { get; set; } | ||
|
||
/// <summary> | ||
/// The display name used in the generated report (when run) | ||
/// </summary> | ||
[DataMember(Name = "displayName")] | ||
public string DisplayName { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Whether to display the generated report's URL on the output | ||
/// </summary> | ||
[DataMember(Name = "displayLink")] | ||
public bool DisplayLink { get; set; } | ||
|
||
/// <summary> | ||
/// Whether to display the generated report's URL on the output | ||
/// </summary> | ||
[DataMember(Name = "delivery")] | ||
public string Delivery { get; set; } = "none"; | ||
|
||
/// <summary> | ||
/// ToString override | ||
/// </summary> | ||
/// <returns>Name</returns> | ||
public override string ToString() => Name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.