pub struct ApiRequest {
pub type: Type,
pub method: Method,
pub url: String,
pub headers: Option<JsonSchema>,
pub body: Option<JsonSchema>,
pub mode: Mode,
pub hooks: Option<Vec<Hook>>,
pub output: Option<JsonSchema>,
pub name: String,
pub metadata: Option<Value>,
}
Fields§
§type: Type
§method: Method
§url: String
Api endpoint to send requests to.
headers: Option<JsonSchema>
These are the custom headers to include in the Api Request sent. Each key-value pair represents a header name and its value.
body: Option<JsonSchema>
This defined the JSON body of your Api Request. For example, if body_schema
included "my_field": "my_gather_statement.user_age", then the json body sent to the server would have that particular value assign to it. Right now, only data from gather statements are supported.
mode: Mode
This is the mode of the Api Request. We only support BLOCKING and BACKGROUND for now.
hooks: Option<Vec<Hook>>
This is a list of hooks for a task. Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc). Only Say is supported for now.
output: Option<JsonSchema>
This is the schema for the outputs of the Api Request.
name: String
§metadata: Option<Value>
This is for metadata you want to store on the task.
Implementations§
Trait Implementations§
Source§impl Clone for ApiRequest
impl Clone for ApiRequest
Source§fn clone(&self) -> ApiRequest
fn clone(&self) -> ApiRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more