feat(core): add pipeline API routes
This commit is contained in:
@@ -121,4 +121,32 @@ public static class ApiRoutes
|
||||
/// <summary>Route to upload part operations.</summary>
|
||||
public const string UploadPartOperations = "api/fileio/partoperations/upload";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Routes for pipeline configuration API endpoints.
|
||||
/// </summary>
|
||||
public static class Pipelines
|
||||
{
|
||||
/// <summary>Base route for pipeline endpoints.</summary>
|
||||
public const string Base = "api/pipelines";
|
||||
|
||||
/// <summary>Route template for getting a pipeline by name.</summary>
|
||||
public const string ByName = "{name}";
|
||||
|
||||
/// <summary>Route template for getting pipeline status.</summary>
|
||||
public const string Status = "{name}/status";
|
||||
|
||||
/// <summary>Route template for getting pipeline executions.</summary>
|
||||
public const string Executions = "{name}/executions";
|
||||
|
||||
/// <summary>Builds the route to get a specific pipeline config.</summary>
|
||||
public static string GetByName(string name) => $"api/pipelines/{Uri.EscapeDataString(name)}";
|
||||
|
||||
/// <summary>Builds the route to get pipeline status.</summary>
|
||||
public static string GetStatus(string name) => $"api/pipelines/{Uri.EscapeDataString(name)}/status";
|
||||
|
||||
/// <summary>Builds the route to get pipeline executions.</summary>
|
||||
public static string GetExecutions(string name, int count = 10) =>
|
||||
$"api/pipelines/{Uri.EscapeDataString(name)}/executions?count={count}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user