Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:Update OpenAPI Specification for Instill AI API Pipeline Metrics Endpoints #50

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public partial interface IMetricsClient
/// Returns a timeline of Instill Credit consumption for a given owner. The<br/>
/// response will contain one set of records (datapoints) per consumption<br/>
/// source (e.g. "pipeline", "model"). Each datapoint represents the amount<br/>
/// consumed in a time bucket.
/// consumed in a time bucket.<br/>
/// This endpoint is only exposed on Instill Cloud.
/// </summary>
/// <param name="namespaceId"></param>
/// <param name="aggregationWindow"></param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ public partial interface IMetricsClient
{
/// <summary>
/// List pipeline trigger time charts<br/>
/// Returns a timeline of pipline trigger counts for the pipelines of a given<br/>
/// owner.<br/>
/// NOTE: This method will soon return the trigger counts of a given requester.
/// Returns a timeline of pipline trigger counts for a given requester. The<br/>
/// response will contain one set of records (datapoints), representing the<br/>
/// amount of triggers in a time bucket.
/// </summary>
/// <param name="requesterId"></param>
/// <param name="aggregationWindow"></param>
/// <param name="filter"></param>
/// <param name="start"></param>
/// <param name="stop"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Instill.ApiException"></exception>
[global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "INSTILL_BETA_001")]
global::System.Threading.Tasks.Task<global::Instill.ListPipelineTriggerChartRecordsResponse> ListPipelineTriggerChartRecordsAsync(
int? aggregationWindow = default,
string? filter = default,
string requesterId,
string? aggregationWindow = default,
global::System.DateTime? start = default,
global::System.DateTime? stop = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ partial void ProcessListCreditConsumptionChartRecordsResponseContent(
/// Returns a timeline of Instill Credit consumption for a given owner. The<br/>
/// response will contain one set of records (datapoints) per consumption<br/>
/// source (e.g. "pipeline", "model"). Each datapoint represents the amount<br/>
/// consumed in a time bucket.
/// consumed in a time bucket.<br/>
/// This endpoint is only exposed on Instill Cloud.
/// </summary>
/// <param name="namespaceId"></param>
/// <param name="aggregationWindow"></param>
Expand All @@ -58,7 +59,7 @@ partial void ProcessListCreditConsumptionChartRecordsResponseContent(
stop: ref stop);

var __pathBuilder = new PathBuilder(
path: "/v1beta/metrics/credit/charts",
path: "/v1beta/credit/query-charts",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddRequiredParameter("namespaceId", namespaceId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ public partial class MetricsClient
{
partial void PrepareListPipelineTriggerChartRecordsArguments(
global::System.Net.Http.HttpClient httpClient,
ref int? aggregationWindow,
ref string? filter);
ref string requesterId,
ref string? aggregationWindow,
ref global::System.DateTime? start,
ref global::System.DateTime? stop);
partial void PrepareListPipelineTriggerChartRecordsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
int? aggregationWindow,
string? filter);
string requesterId,
string? aggregationWindow,
global::System.DateTime? start,
global::System.DateTime? stop);
partial void ProcessListPipelineTriggerChartRecordsResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -25,33 +29,41 @@ partial void ProcessListPipelineTriggerChartRecordsResponseContent(

/// <summary>
/// List pipeline trigger time charts<br/>
/// Returns a timeline of pipline trigger counts for the pipelines of a given<br/>
/// owner.<br/>
/// NOTE: This method will soon return the trigger counts of a given requester.
/// Returns a timeline of pipline trigger counts for a given requester. The<br/>
/// response will contain one set of records (datapoints), representing the<br/>
/// amount of triggers in a time bucket.
/// </summary>
/// <param name="requesterId"></param>
/// <param name="aggregationWindow"></param>
/// <param name="filter"></param>
/// <param name="start"></param>
/// <param name="stop"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Instill.ApiException"></exception>
[global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "INSTILL_BETA_001")]
public async global::System.Threading.Tasks.Task<global::Instill.ListPipelineTriggerChartRecordsResponse> ListPipelineTriggerChartRecordsAsync(
int? aggregationWindow = default,
string? filter = default,
string requesterId,
string? aggregationWindow = default,
global::System.DateTime? start = default,
global::System.DateTime? stop = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
PrepareListPipelineTriggerChartRecordsArguments(
httpClient: HttpClient,
requesterId: ref requesterId,
aggregationWindow: ref aggregationWindow,
filter: ref filter);
start: ref start,
stop: ref stop);

var __pathBuilder = new PathBuilder(
path: "/v1beta/metrics/vdp/pipeline/charts",
path: "/v1beta/pipeline-runs/query-charts",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("aggregationWindow", aggregationWindow?.ToString())
.AddOptionalParameter("filter", filter)
.AddRequiredParameter("requesterId", requesterId)
.AddOptionalParameter("aggregationWindow", aggregationWindow)
.AddOptionalParameter("start", start?.ToString("yyyy-MM-ddTHH:mm:ssZ"))
.AddOptionalParameter("stop", stop?.ToString("yyyy-MM-ddTHH:mm:ssZ"))
;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
Expand Down Expand Up @@ -80,8 +92,10 @@ partial void ProcessListPipelineTriggerChartRecordsResponseContent(
PrepareListPipelineTriggerChartRecordsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
requesterId: requesterId,
aggregationWindow: aggregationWindow,
filter: filter);
start: start,
stop: stop);

using var __response = await HttpClient.SendAsync(
request: __httpRequest,
Expand Down

This file was deleted.

Loading
Loading