pub struct Client { /* private fields */ }Expand description
Client for brokkr-broker
Brokkr broker: the central control-plane API server for distributing Kubernetes objects across clusters.
Version: 0.8.1
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str) -> Self
pub fn new(baseurl: &str) -> Self
Create a new client.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(baseurl: &str, client: Client) -> Self
pub fn new_with_client(baseurl: &str, client: Client) -> Self
Construct a new client with an existing reqwest::Client,
allowing more control over its configuration.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Source§impl Client
impl Client
Sourcepub fn list_audit_logs(&self) -> ListAuditLogs<'_>
pub fn list_audit_logs(&self) -> ListAuditLogs<'_>
Lists audit logs with optional filtering and pagination
Returns audit log entries matching the specified filters, ordered by timestamp descending (most recent first).
§Authentication
Requires admin PAK authentication.
§Query Parameters
actor_type: Filter by actor type (admin, agent, generator, system).actor_id: Filter by actor UUID.action: Filter by action (exact match or prefix with *).resource_type: Filter by resource type.resource_id: Filter by resource UUID.from: Filter by start time (inclusive).to: Filter by end time (exclusive).limit: Maximum results (default 100, max 1000).offset: Number of results to skip.
§Returns
200 OK: List of audit logs with pagination info.401 UNAUTHORIZED: Missing or invalid authentication.403 FORBIDDEN: Authenticated but not an admin.500 INTERNAL_SERVER_ERROR: Database error.
Sends a GET request to /admin/audit-logs
Arguments:
action: Filter by action (exact match or prefix with *).actor_id: Filter by actor ID.actor_type: Filter by actor type (admin, agent, generator, system).from: Filter by start time (inclusive, ISO 8601).limit: Maximum number of results (default 100, max 1000).offset: Number of results to skip.resource_id: Filter by resource ID.resource_type: Filter by resource type.to: Filter by end time (exclusive, ISO 8601).
let response = client.list_audit_logs()
.action(action)
.actor_id(actor_id)
.actor_type(actor_type)
.from(from)
.limit(limit)
.offset(offset)
.resource_id(resource_id)
.resource_type(resource_type)
.to(to)
.send()
.await;Sourcepub fn reload_config(&self) -> ReloadConfig<'_>
pub fn reload_config(&self) -> ReloadConfig<'_>
Reloads the broker configuration from disk
This endpoint triggers a hot-reload of configurable settings without requiring a broker restart. Only settings marked as “dynamic” can be reloaded; static settings (like database URL) require a restart.
§Authentication
Requires admin PAK authentication.
§Returns
200 OK: Configuration reloaded successfully with list of changes.401 UNAUTHORIZED: Missing or invalid authentication.403 FORBIDDEN: Authenticated but not an admin.500 INTERNAL_SERVER_ERROR: Failed to reload configuration.
Sends a POST request to /admin/config/reload
let response = client.reload_config()
.send()
.await;Sourcepub fn list_ws_connections(&self) -> ListWsConnections<'_>
pub fn list_ws_connections(&self) -> ListWsConnections<'_>
Sends a GET request to /admin/ws/connections
let response = client.list_ws_connections()
.send()
.await;Sourcepub fn list_agent_events(&self) -> ListAgentEvents<'_>
pub fn list_agent_events(&self) -> ListAgentEvents<'_>
Sends a GET request to /agent-events
let response = client.list_agent_events()
.send()
.await;Sourcepub fn get_agent_event(&self) -> GetAgentEvent<'_>
pub fn get_agent_event(&self) -> GetAgentEvent<'_>
Sends a GET request to /agent-events/{id}
Arguments:
id: Agent event id
let response = client.get_agent_event()
.id(id)
.send()
.await;Sourcepub fn list_agents(&self) -> ListAgents<'_>
pub fn list_agents(&self) -> ListAgents<'_>
Sends a GET request to /agents
let response = client.list_agents()
.send()
.await;Sourcepub fn create_agent(&self) -> CreateAgent<'_>
pub fn create_agent(&self) -> CreateAgent<'_>
Sends a POST request to /agents
let response = client.create_agent()
.body(body)
.send()
.await;Sourcepub fn search_agent(&self) -> SearchAgent<'_>
pub fn search_agent(&self) -> SearchAgent<'_>
Sends a GET request to /agents/
Arguments:
cluster_name: Name of the cluster to search inname: Name of the agent to search for
let response = client.search_agent()
.cluster_name(cluster_name)
.name(name)
.send()
.await;Sourcepub fn get_pending_agent_webhooks(&self) -> GetPendingAgentWebhooks<'_>
pub fn get_pending_agent_webhooks(&self) -> GetPendingAgentWebhooks<'_>
Sends a GET request to /agents/{agent_id}/webhooks/pending
Arguments:
agent_id: Agent ID
let response = client.get_pending_agent_webhooks()
.agent_id(agent_id)
.send()
.await;Sourcepub fn list_pending_for_agent(&self) -> ListPendingForAgent<'_>
pub fn list_pending_for_agent(&self) -> ListPendingForAgent<'_>
Sends a GET request to /agents/{agent_id}/work-orders/pending
Arguments:
agent_id: Agent IDwork_type: Filter by work type
let response = client.list_pending_for_agent()
.agent_id(agent_id)
.work_type(work_type)
.send()
.await;Sourcepub fn get_agent(&self) -> GetAgent<'_>
pub fn get_agent(&self) -> GetAgent<'_>
Sends a GET request to /agents/{id}
Arguments:
id: ID of the agent to retrieve
let response = client.get_agent()
.id(id)
.send()
.await;Sourcepub fn update_agent(&self) -> UpdateAgent<'_>
pub fn update_agent(&self) -> UpdateAgent<'_>
Sends a PUT request to /agents/{id}
Arguments:
id: ID of the agent to updatebody
let response = client.update_agent()
.id(id)
.body(body)
.send()
.await;Sourcepub fn delete_agent(&self) -> DeleteAgent<'_>
pub fn delete_agent(&self) -> DeleteAgent<'_>
Sends a DELETE request to /agents/{id}
Arguments:
id: ID of the agent to delete
let response = client.delete_agent()
.id(id)
.send()
.await;Sourcepub fn agents_list_annotations(&self) -> AgentsListAnnotations<'_>
pub fn agents_list_annotations(&self) -> AgentsListAnnotations<'_>
Sends a GET request to /agents/{id}/annotations
Arguments:
id: ID of the agent
let response = client.agents_list_annotations()
.id(id)
.send()
.await;Sourcepub fn agents_add_annotation(&self) -> AgentsAddAnnotation<'_>
pub fn agents_add_annotation(&self) -> AgentsAddAnnotation<'_>
Sends a POST request to /agents/{id}/annotations
Arguments:
id: ID of the agentbody
let response = client.agents_add_annotation()
.id(id)
.body(body)
.send()
.await;Sourcepub fn agents_remove_annotation(&self) -> AgentsRemoveAnnotation<'_>
pub fn agents_remove_annotation(&self) -> AgentsRemoveAnnotation<'_>
Sends a DELETE request to /agents/{id}/annotations/{key}
Arguments:
id: ID of the agentkey: Annotation key to remove
let response = client.agents_remove_annotation()
.id(id)
.key(key)
.send()
.await;Sourcepub fn get_pending_diagnostics(&self) -> GetPendingDiagnostics<'_>
pub fn get_pending_diagnostics(&self) -> GetPendingDiagnostics<'_>
Sends a GET request to /agents/{id}/diagnostics/pending
Arguments:
id: ID of the agent
let response = client.get_pending_diagnostics()
.id(id)
.send()
.await;Sourcepub fn list_events(&self) -> ListEvents<'_>
pub fn list_events(&self) -> ListEvents<'_>
Sends a GET request to /agents/{id}/events
Arguments:
id: ID of the agent to list events for
let response = client.list_events()
.id(id)
.send()
.await;Sourcepub fn create_event(&self) -> CreateEvent<'_>
pub fn create_event(&self) -> CreateEvent<'_>
Sends a POST request to /agents/{id}/events
Arguments:
id: ID of the agent to create an event forbody
let response = client.create_event()
.id(id)
.body(body)
.send()
.await;Sourcepub fn get_agent_fleet_status(&self) -> GetAgentFleetStatus<'_>
pub fn get_agent_fleet_status(&self) -> GetAgentFleetStatus<'_>
Sends a GET request to /agents/{id}/fleet-status
Arguments:
id: ID of the agent
let response = client.get_agent_fleet_status()
.id(id)
.send()
.await;Sourcepub fn update_health_status(&self) -> UpdateHealthStatus<'_>
pub fn update_health_status(&self) -> UpdateHealthStatus<'_>
Sourcepub fn record_heartbeat(&self) -> RecordHeartbeat<'_>
pub fn record_heartbeat(&self) -> RecordHeartbeat<'_>
Sends a POST request to /agents/{id}/heartbeat
Arguments:
id: ID of the agentbody: Optional agent-reported K8s connectivity
let response = client.record_heartbeat()
.id(id)
.body(body)
.send()
.await;Sourcepub fn agents_list_labels(&self) -> AgentsListLabels<'_>
pub fn agents_list_labels(&self) -> AgentsListLabels<'_>
Sends a GET request to /agents/{id}/labels
Arguments:
id: ID of the agent
let response = client.agents_list_labels()
.id(id)
.send()
.await;Sourcepub fn agents_add_label(&self) -> AgentsAddLabel<'_>
pub fn agents_add_label(&self) -> AgentsAddLabel<'_>
Sends a POST request to /agents/{id}/labels
Arguments:
id: ID of the agentbody
let response = client.agents_add_label()
.id(id)
.body(body)
.send()
.await;Sourcepub fn agents_remove_label(&self) -> AgentsRemoveLabel<'_>
pub fn agents_remove_label(&self) -> AgentsRemoveLabel<'_>
Sends a DELETE request to /agents/{id}/labels/{label}
Arguments:
id: ID of the agentlabel: The label to remove
let response = client.agents_remove_label()
.id(id)
.label(label)
.send()
.await;Sourcepub fn rotate_agent_pak(&self) -> RotateAgentPak<'_>
pub fn rotate_agent_pak(&self) -> RotateAgentPak<'_>
Sends a POST request to /agents/{id}/rotate-pak
Arguments:
id: Agent id
let response = client.rotate_agent_pak()
.id(id)
.send()
.await;Sourcepub fn get_associated_stacks(&self) -> GetAssociatedStacks<'_>
pub fn get_associated_stacks(&self) -> GetAssociatedStacks<'_>
Sends a GET request to /agents/{id}/stacks
Arguments:
id: ID of the agent
let response = client.get_associated_stacks()
.id(id)
.send()
.await;Sourcepub fn get_target_state(&self) -> GetTargetState<'_>
pub fn get_target_state(&self) -> GetTargetState<'_>
Sends a GET request to /agents/{id}/target-state
Arguments:
id: ID of the agentmode: Mode of operation: ‘incremental’ (default) or ‘full’
let response = client.get_target_state()
.id(id)
.mode(mode)
.send()
.await;Sourcepub fn list_targets(&self) -> ListTargets<'_>
pub fn list_targets(&self) -> ListTargets<'_>
Sends a GET request to /agents/{id}/targets
Arguments:
id: ID of the agent
let response = client.list_targets()
.id(id)
.send()
.await;Sourcepub fn add_target(&self) -> AddTarget<'_>
pub fn add_target(&self) -> AddTarget<'_>
Sends a POST request to /agents/{id}/targets
Arguments:
id: ID of the agentbody
let response = client.add_target()
.id(id)
.body(body)
.send()
.await;Sourcepub fn remove_target(&self) -> RemoveTarget<'_>
pub fn remove_target(&self) -> RemoveTarget<'_>
Sends a DELETE request to /agents/{id}/targets/{stack_id}
Arguments:
id: ID of the agentstack_id: ID of the stack
let response = client.remove_target()
.id(id)
.stack_id(stack_id)
.send()
.await;Sourcepub fn verify_pak(&self) -> VerifyPak<'_>
pub fn verify_pak(&self) -> VerifyPak<'_>
Verifies a PAK (Personal Access Key) and returns an AuthResponse
This function handles the authentication process for both admin and agent PAKs.
Sends a POST request to /auth/pak
let response = client.verify_pak()
.send()
.await;Sourcepub fn get_deployment_object(&self) -> GetDeploymentObject<'_>
pub fn get_deployment_object(&self) -> GetDeploymentObject<'_>
Retrieves a deployment object by ID, with access control based on user role
§Authorization
Requires either:
- Admin privileges
- Agent associated with the deployment object’s stack
- Generator that owns the deployment object’s stack
Sends a GET request to /deployment-objects/{id}
Arguments:
id: ID of the deployment object to retrieve
let response = client.get_deployment_object()
.id(id)
.send()
.await;Sourcepub fn create_diagnostic_request(&self) -> CreateDiagnosticRequest<'_>
pub fn create_diagnostic_request(&self) -> CreateDiagnosticRequest<'_>
Sends a POST request to /deployment-objects/{id}/diagnostics
Arguments:
id: ID of the deployment objectbody
let response = client.create_diagnostic_request()
.id(id)
.body(body)
.send()
.await;Sourcepub fn get_deployment_health(&self) -> GetDeploymentHealth<'_>
pub fn get_deployment_health(&self) -> GetDeploymentHealth<'_>
Sourcepub fn get_diagnostic(&self) -> GetDiagnostic<'_>
pub fn get_diagnostic(&self) -> GetDiagnostic<'_>
Sends a GET request to /diagnostics/{id}
Arguments:
id: ID of the diagnostic request
let response = client.get_diagnostic()
.id(id)
.send()
.await;Sourcepub fn claim_diagnostic(&self) -> ClaimDiagnostic<'_>
pub fn claim_diagnostic(&self) -> ClaimDiagnostic<'_>
Sends a POST request to /diagnostics/{id}/claim
Arguments:
id: ID of the diagnostic request to claim
let response = client.claim_diagnostic()
.id(id)
.send()
.await;Sourcepub fn submit_diagnostic_result(&self) -> SubmitDiagnosticResult<'_>
pub fn submit_diagnostic_result(&self) -> SubmitDiagnosticResult<'_>
Sends a POST request to /diagnostics/{id}/result
Arguments:
id: ID of the diagnostic requestbody
let response = client.submit_diagnostic_result()
.id(id)
.body(body)
.send()
.await;Sourcepub fn list_fleet(&self) -> ListFleet<'_>
pub fn list_fleet(&self) -> ListFleet<'_>
Sends a GET request to /fleet
let response = client.list_fleet()
.send()
.await;Sourcepub fn list_generators(&self) -> ListGenerators<'_>
pub fn list_generators(&self) -> ListGenerators<'_>
Sends a GET request to /generators
let response = client.list_generators()
.send()
.await;Sourcepub fn create_generator(&self) -> CreateGenerator<'_>
pub fn create_generator(&self) -> CreateGenerator<'_>
Sends a POST request to /generators
let response = client.create_generator()
.body(body)
.send()
.await;Sourcepub fn get_generator(&self) -> GetGenerator<'_>
pub fn get_generator(&self) -> GetGenerator<'_>
Sends a GET request to /generators/{id}
Arguments:
id: Generator id
let response = client.get_generator()
.id(id)
.send()
.await;Sourcepub fn update_generator(&self) -> UpdateGenerator<'_>
pub fn update_generator(&self) -> UpdateGenerator<'_>
Sends a PUT request to /generators/{id}
Arguments:
id: Generator idbody
let response = client.update_generator()
.id(id)
.body(body)
.send()
.await;Sourcepub fn delete_generator(&self) -> DeleteGenerator<'_>
pub fn delete_generator(&self) -> DeleteGenerator<'_>
Sends a DELETE request to /generators/{id}
Arguments:
id: Generator id
let response = client.delete_generator()
.id(id)
.send()
.await;Sourcepub fn rotate_generator_pak(&self) -> RotateGeneratorPak<'_>
pub fn rotate_generator_pak(&self) -> RotateGeneratorPak<'_>
Sends a POST request to /generators/{id}/rotate-pak
Arguments:
id: Generator id
let response = client.rotate_generator_pak()
.id(id)
.send()
.await;Sourcepub fn list_stacks(&self) -> ListStacks<'_>
pub fn list_stacks(&self) -> ListStacks<'_>
Sends a GET request to /stacks
let response = client.list_stacks()
.send()
.await;Sourcepub fn create_stack(&self) -> CreateStack<'_>
pub fn create_stack(&self) -> CreateStack<'_>
Sends a POST request to /stacks
let response = client.create_stack()
.body(body)
.send()
.await;Sourcepub fn get_stack(&self) -> GetStack<'_>
pub fn get_stack(&self) -> GetStack<'_>
Sends a GET request to /stacks/{id}
Arguments:
id: Stack ID
let response = client.get_stack()
.id(id)
.send()
.await;Sourcepub fn update_stack(&self) -> UpdateStack<'_>
pub fn update_stack(&self) -> UpdateStack<'_>
Sends a PUT request to /stacks/{id}
Arguments:
id: Stack IDbody
let response = client.update_stack()
.id(id)
.body(body)
.send()
.await;Sourcepub fn delete_stack(&self) -> DeleteStack<'_>
pub fn delete_stack(&self) -> DeleteStack<'_>
Sends a DELETE request to /stacks/{id}
Arguments:
id: Stack ID
let response = client.delete_stack()
.id(id)
.send()
.await;Sourcepub fn stacks_list_annotations(&self) -> StacksListAnnotations<'_>
pub fn stacks_list_annotations(&self) -> StacksListAnnotations<'_>
Sends a GET request to /stacks/{id}/annotations
Arguments:
id: Stack ID
let response = client.stacks_list_annotations()
.id(id)
.send()
.await;Sourcepub fn stacks_add_annotation(&self) -> StacksAddAnnotation<'_>
pub fn stacks_add_annotation(&self) -> StacksAddAnnotation<'_>
Sends a POST request to /stacks/{id}/annotations
Arguments:
id: Stack IDbody
let response = client.stacks_add_annotation()
.id(id)
.body(body)
.send()
.await;Sourcepub fn stacks_remove_annotation(&self) -> StacksRemoveAnnotation<'_>
pub fn stacks_remove_annotation(&self) -> StacksRemoveAnnotation<'_>
Sends a DELETE request to /stacks/{id}/annotations/{key}
Arguments:
id: Stack IDkey: Annotation key to remove
let response = client.stacks_remove_annotation()
.id(id)
.key(key)
.send()
.await;Sourcepub fn list_deployment_objects(&self) -> ListDeploymentObjects<'_>
pub fn list_deployment_objects(&self) -> ListDeploymentObjects<'_>
Sends a GET request to /stacks/{id}/deployment-objects
Arguments:
id: Stack ID
let response = client.list_deployment_objects()
.id(id)
.send()
.await;Sourcepub fn create_deployment_object(&self) -> CreateDeploymentObject<'_>
pub fn create_deployment_object(&self) -> CreateDeploymentObject<'_>
Sends a POST request to /stacks/{id}/deployment-objects
Arguments:
id: Stack IDdeletion_marker: Marks the submission as a deletion marker. Only consulted on the raw-YAML path; on the JSON path the body field wins.body
let response = client.create_deployment_object()
.id(id)
.deletion_marker(deletion_marker)
.body(body)
.send()
.await;Sourcepub fn list_telemetry_events(&self) -> ListTelemetryEvents<'_>
pub fn list_telemetry_events(&self) -> ListTelemetryEvents<'_>
Sends a GET request to /stacks/{id}/events
Arguments:
id: Stack IDlimit: Maximum rows to return. Defaults to 500; capped at 5000.since: Earliestcreated_atto include (ISO-8601). Defaults tonow - retention_ceiling_seconds. Values older than the ceiling are silently clamped: only the retained window can be returned.
let response = client.list_telemetry_events()
.id(id)
.limit(limit)
.since(since)
.send()
.await;Sourcepub fn get_stack_health(&self) -> GetStackHealth<'_>
pub fn get_stack_health(&self) -> GetStackHealth<'_>
Sourcepub fn stacks_list_labels(&self) -> StacksListLabels<'_>
pub fn stacks_list_labels(&self) -> StacksListLabels<'_>
Sends a GET request to /stacks/{id}/labels
Arguments:
id: Stack ID
let response = client.stacks_list_labels()
.id(id)
.send()
.await;Sourcepub fn stacks_add_label(&self) -> StacksAddLabel<'_>
pub fn stacks_add_label(&self) -> StacksAddLabel<'_>
Sends a POST request to /stacks/{id}/labels
Arguments:
id: Stack IDbody: JSON-encoded label string, e.g. “mylabel”
let response = client.stacks_add_label()
.id(id)
.body(body)
.send()
.await;Sourcepub fn stacks_remove_label(&self) -> StacksRemoveLabel<'_>
pub fn stacks_remove_label(&self) -> StacksRemoveLabel<'_>
Sends a DELETE request to /stacks/{id}/labels/{label}
Arguments:
id: Stack IDlabel: Label to remove
let response = client.stacks_remove_label()
.id(id)
.label(label)
.send()
.await;Sourcepub fn list_telemetry_logs(&self) -> ListTelemetryLogs<'_>
pub fn list_telemetry_logs(&self) -> ListTelemetryLogs<'_>
Sends a GET request to /stacks/{id}/logs
Arguments:
id: Stack IDlimit: Maximum rows to return. Defaults to 500; capped at 5000.since: Earliestcreated_atto include (ISO-8601). Defaults tonow - retention_ceiling_seconds. Values older than the ceiling are silently clamped: only the retained window can be returned.
let response = client.list_telemetry_logs()
.id(id)
.limit(limit)
.since(since)
.send()
.await;Sourcepub fn instantiate_template(&self) -> InstantiateTemplate<'_>
pub fn instantiate_template(&self) -> InstantiateTemplate<'_>
Sends a POST request to /stacks/{stack_id}/deployment-objects/from-template
Arguments:
stack_id: Stack IDbody
let response = client.instantiate_template()
.stack_id(stack_id)
.body(body)
.send()
.await;Sourcepub fn list_templates(&self) -> ListTemplates<'_>
pub fn list_templates(&self) -> ListTemplates<'_>
Sends a GET request to /templates
let response = client.list_templates()
.send()
.await;Sourcepub fn create_template(&self) -> CreateTemplate<'_>
pub fn create_template(&self) -> CreateTemplate<'_>
Sends a POST request to /templates
let response = client.create_template()
.body(body)
.send()
.await;Sourcepub fn get_template(&self) -> GetTemplate<'_>
pub fn get_template(&self) -> GetTemplate<'_>
Sends a GET request to /templates/{id}
Arguments:
id: Template ID
let response = client.get_template()
.id(id)
.send()
.await;Sourcepub fn update_template(&self) -> UpdateTemplate<'_>
pub fn update_template(&self) -> UpdateTemplate<'_>
Sends a PUT request to /templates/{id}
Arguments:
id: Template IDbody
let response = client.update_template()
.id(id)
.body(body)
.send()
.await;Sourcepub fn delete_template(&self) -> DeleteTemplate<'_>
pub fn delete_template(&self) -> DeleteTemplate<'_>
Sends a DELETE request to /templates/{id}
Arguments:
id: Template ID
let response = client.delete_template()
.id(id)
.send()
.await;Sourcepub fn templates_list_annotations(&self) -> TemplatesListAnnotations<'_>
pub fn templates_list_annotations(&self) -> TemplatesListAnnotations<'_>
Sends a GET request to /templates/{id}/annotations
Arguments:
id: Template ID
let response = client.templates_list_annotations()
.id(id)
.send()
.await;Sourcepub fn templates_add_annotation(&self) -> TemplatesAddAnnotation<'_>
pub fn templates_add_annotation(&self) -> TemplatesAddAnnotation<'_>
Sends a POST request to /templates/{id}/annotations
Arguments:
id: Template IDbody
let response = client.templates_add_annotation()
.id(id)
.body(body)
.send()
.await;Sourcepub fn templates_remove_annotation(&self) -> TemplatesRemoveAnnotation<'_>
pub fn templates_remove_annotation(&self) -> TemplatesRemoveAnnotation<'_>
Sends a DELETE request to /templates/{id}/annotations/{key}
Arguments:
id: Template IDkey: Annotation key to remove
let response = client.templates_remove_annotation()
.id(id)
.key(key)
.send()
.await;Sourcepub fn templates_list_labels(&self) -> TemplatesListLabels<'_>
pub fn templates_list_labels(&self) -> TemplatesListLabels<'_>
Sends a GET request to /templates/{id}/labels
Arguments:
id: Template ID
let response = client.templates_list_labels()
.id(id)
.send()
.await;Sourcepub fn templates_add_label(&self) -> TemplatesAddLabel<'_>
pub fn templates_add_label(&self) -> TemplatesAddLabel<'_>
Sends a POST request to /templates/{id}/labels
Arguments:
id: Template IDbody: JSON-encoded label string, e.g. “mylabel”
let response = client.templates_add_label()
.id(id)
.body(body)
.send()
.await;Sourcepub fn templates_remove_label(&self) -> TemplatesRemoveLabel<'_>
pub fn templates_remove_label(&self) -> TemplatesRemoveLabel<'_>
Sends a DELETE request to /templates/{id}/labels/{label}
Arguments:
id: Template IDlabel: Label to remove
let response = client.templates_remove_label()
.id(id)
.label(label)
.send()
.await;Sourcepub fn report_delivery_result(&self) -> ReportDeliveryResult<'_>
pub fn report_delivery_result(&self) -> ReportDeliveryResult<'_>
Sends a POST request to /webhook-deliveries/{id}/result
Arguments:
id: Delivery IDbody
let response = client.report_delivery_result()
.id(id)
.body(body)
.send()
.await;Sourcepub fn list_webhooks(&self) -> ListWebhooks<'_>
pub fn list_webhooks(&self) -> ListWebhooks<'_>
Sends a GET request to /webhooks
let response = client.list_webhooks()
.send()
.await;Sourcepub fn create_webhook(&self) -> CreateWebhook<'_>
pub fn create_webhook(&self) -> CreateWebhook<'_>
Sends a POST request to /webhooks
let response = client.create_webhook()
.body(body)
.send()
.await;Sourcepub fn list_event_types(&self) -> ListEventTypes<'_>
pub fn list_event_types(&self) -> ListEventTypes<'_>
Sends a GET request to /webhooks/event-types
let response = client.list_event_types()
.send()
.await;Sourcepub fn get_webhook(&self) -> GetWebhook<'_>
pub fn get_webhook(&self) -> GetWebhook<'_>
Sends a GET request to /webhooks/{id}
Arguments:
id: Webhook subscription ID
let response = client.get_webhook()
.id(id)
.send()
.await;Sourcepub fn update_webhook(&self) -> UpdateWebhook<'_>
pub fn update_webhook(&self) -> UpdateWebhook<'_>
Sends a PUT request to /webhooks/{id}
Arguments:
id: Webhook subscription IDbody
let response = client.update_webhook()
.id(id)
.body(body)
.send()
.await;Sourcepub fn delete_webhook(&self) -> DeleteWebhook<'_>
pub fn delete_webhook(&self) -> DeleteWebhook<'_>
Sends a DELETE request to /webhooks/{id}
Arguments:
id: Webhook subscription ID
let response = client.delete_webhook()
.id(id)
.send()
.await;Sourcepub fn list_deliveries(&self) -> ListDeliveries<'_>
pub fn list_deliveries(&self) -> ListDeliveries<'_>
Sends a GET request to /webhooks/{id}/deliveries
Arguments:
id: Webhook subscription IDlimit: Maximum number of resultsoffset: Offset for paginationstatus: Filter by delivery status
let response = client.list_deliveries()
.id(id)
.limit(limit)
.offset(offset)
.status(status)
.send()
.await;Sourcepub fn test_webhook(&self) -> TestWebhook<'_>
pub fn test_webhook(&self) -> TestWebhook<'_>
Sends a POST request to /webhooks/{id}/test
Arguments:
id: Webhook subscription ID
let response = client.test_webhook()
.id(id)
.send()
.await;Sourcepub fn list_work_order_log(&self) -> ListWorkOrderLog<'_>
pub fn list_work_order_log(&self) -> ListWorkOrderLog<'_>
Sends a GET request to /work-order-log
Arguments:
agent_id: Filter by agent IDlimit: Limit number of resultssuccess: Filter by success statuswork_type: Filter by work type
let response = client.list_work_order_log()
.agent_id(agent_id)
.limit(limit)
.success(success)
.work_type(work_type)
.send()
.await;Sourcepub fn get_work_order_log(&self) -> GetWorkOrderLog<'_>
pub fn get_work_order_log(&self) -> GetWorkOrderLog<'_>
Sends a GET request to /work-order-log/{id}
Arguments:
id: Work order log ID
let response = client.get_work_order_log()
.id(id)
.send()
.await;Sourcepub fn list_work_orders(&self) -> ListWorkOrders<'_>
pub fn list_work_orders(&self) -> ListWorkOrders<'_>
Sends a GET request to /work-orders
Arguments:
status: Filter by statuswork_type: Filter by work type
let response = client.list_work_orders()
.status(status)
.work_type(work_type)
.send()
.await;Sourcepub fn create_work_order(&self) -> CreateWorkOrder<'_>
pub fn create_work_order(&self) -> CreateWorkOrder<'_>
Sends a POST request to /work-orders
let response = client.create_work_order()
.body(body)
.send()
.await;Sourcepub fn get_work_order(&self) -> GetWorkOrder<'_>
pub fn get_work_order(&self) -> GetWorkOrder<'_>
Sends a GET request to /work-orders/{id}
Arguments:
id: Work order ID
let response = client.get_work_order()
.id(id)
.send()
.await;Sourcepub fn delete_work_order(&self) -> DeleteWorkOrder<'_>
pub fn delete_work_order(&self) -> DeleteWorkOrder<'_>
Sends a DELETE request to /work-orders/{id}
Arguments:
id: Work order ID
let response = client.delete_work_order()
.id(id)
.send()
.await;Sourcepub fn claim_work_order(&self) -> ClaimWorkOrder<'_>
pub fn claim_work_order(&self) -> ClaimWorkOrder<'_>
Sends a POST request to /work-orders/{id}/claim
Arguments:
id: Work order IDbody
let response = client.claim_work_order()
.id(id)
.body(body)
.send()
.await;Sourcepub fn complete_work_order(&self) -> CompleteWorkOrder<'_>
pub fn complete_work_order(&self) -> CompleteWorkOrder<'_>
Sends a POST request to /work-orders/{id}/complete
Arguments:
id: Work order IDbody
let response = client.complete_work_order()
.id(id)
.body(body)
.send()
.await;