summaryrefslogtreecommitdiff
path: root/makima/src/daemon/api
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/daemon/api')
-rw-r--r--makima/src/daemon/api/directive.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/makima/src/daemon/api/directive.rs b/makima/src/daemon/api/directive.rs
index 3589e78..c51882b 100644
--- a/makima/src/daemon/api/directive.rs
+++ b/makima/src/daemon/api/directive.rs
@@ -71,6 +71,26 @@ impl ApiClient {
.await
}
+ /// Submit a chain plan for a directive.
+ pub async fn directive_submit_plan(
+ &self,
+ directive_id: Uuid,
+ plan_json: &str,
+ ) -> Result<JsonValue, ApiError> {
+ #[derive(serde::Serialize)]
+ #[serde(rename_all = "camelCase")]
+ struct SubmitPlanBody {
+ plan: String,
+ }
+ self.post(
+ &format!("/api/v1/directives/{}/submit-plan", directive_id),
+ &SubmitPlanBody {
+ plan: plan_json.to_string(),
+ },
+ )
+ .await
+ }
+
/// List evaluations for a step.
pub async fn directive_evaluations(
&self,