diff --git a/Tranga/Server/Server.cs b/Tranga/Server/Server.cs index 818a6c9..acc5644 100644 --- a/Tranga/Server/Server.cs +++ b/Tranga/Server/Server.cs @@ -39,6 +39,7 @@ public Server(Tranga parent) : base(parent) new ("GET", @"/v2/Jobs/Running", GetV2JobsRunning), new ("GET", @"/v2/Jobs/Waiting", GetV2JobsWaiting), new ("GET", @"/v2/Jobs/Monitoring", GetV2JobsMonitoring), + new ("GET", @"/v2/Jobs/Standby", GetV2JobsStandby), new ("GET", @"/v2/Job/Types", GetV2JobTypes), new ("POST", @"/v2/Job/Create/([a-zA-Z]+)", PostV2JobCreateType), new ("GET", @"/v2/Job", GetV2Job), diff --git a/Tranga/Server/v2Jobs.cs b/Tranga/Server/v2Jobs.cs index 1146612..a0eb9b4 100644 --- a/Tranga/Server/v2Jobs.cs +++ b/Tranga/Server/v2Jobs.cs @@ -26,6 +26,13 @@ public partial class Server .Select(job => job.id)); } + private ValueTuple GetV2JobsStandby(GroupCollection groups, Dictionary requestParameters) + { + return new ValueTuple(HttpStatusCode.OK, _parent.jobBoss.jobs + .Where(job => job.progressToken.state is ProgressToken.State.Standby) + .Select(job => job.id)); + } + private ValueTuple GetV2JobsMonitoring(GroupCollection groups, Dictionary requestParameters) { return new ValueTuple(HttpStatusCode.OK, _parent.jobBoss.jobs diff --git a/docs/API_Calls_v2.md b/docs/API_Calls_v2.md index e5048e2..bdd3cde 100644 --- a/docs/API_Calls_v2.md +++ b/docs/API_Calls_v2.md @@ -333,6 +333,16 @@ Returns all Waiting Jobs as IDs. List of JobIds. +### ![GET](https://img.shields.io/badge/GET-0f0) `/v2/Jobs/Standby` + +Returns all Standby Jobs as IDs. + +
+ Returns + +List of JobIds. +
+ ### ![GET](https://img.shields.io/badge/GET-0f0) `/v2/Jobs/Monitoring` Returns all Monitoring Jobs as IDs.