pub struct SyncExternalsystemsJobConfigsResource<'a> { /* private fields */ }Expand description
client.sync().externalsystems().job_configs()
Implementations§
Source§impl<'a> SyncExternalsystemsJobConfigsResource<'a>
impl<'a> SyncExternalsystemsJobConfigsResource<'a>
pub fn executions(&self) -> SyncExternalsystemsJobConfigsExecutionsResource<'a>
Sourcepub fn create(
&self,
external_system_id: impl Display,
body: &SyncJobConfigurationCreate,
) -> Result<JobConfigurationReturn>
pub fn create( &self, external_system_id: impl Display, body: &SyncJobConfigurationCreate, ) -> Result<JobConfigurationReturn>
Create a sync job configuration
POST /sync/externalsystems/{externalSystemId}/jobconfigs
Selected fields and record filters are managed through the properties and filter endpoints.
§Example
let body = models::SyncJobConfigurationCreate {
auto_schedule_enabled: false,
domain_type: "person".into(),
name: "Synchronize people".into(),
..Default::default()
};
let result = client.sync().externalsystems().job_configs().create(1, &body)?;
println!("{}", result.name);Sourcepub fn delete(
&self,
external_system_id: impl Display,
job_id: impl Display,
) -> Result<()>
pub fn delete( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<()>
Delete a sync job configuration
DELETE /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}
Deletes the configuration together with selected properties, filters, logs and associated background executions. Missing jobs also return 204.
§Example
client.sync().externalsystems().job_configs().delete(1, 1)?;Sourcepub fn delete_filter(
&self,
external_system_id: impl Display,
job_id: impl Display,
) -> Result<()>
pub fn delete_filter( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<()>
Clear sync job record filters
DELETE /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/filter
Deletes all record filters; the job configuration remains.
§Example
client.sync().externalsystems().job_configs().delete_filter(1, 1)?;Sourcepub fn delete_properties(
&self,
external_system_id: impl Display,
job_id: impl Display,
) -> Result<()>
pub fn delete_properties( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<()>
Clear sync job selected fields
DELETE /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/properties
Deletes all selected fields; the job configuration remains.
§Example
client.sync().externalsystems().job_configs().delete_properties(1, 1)?;Sourcepub fn get(
&self,
external_system_id: impl Display,
job_id: impl Display,
) -> Result<Vec<JobConfigurationReturn>>
pub fn get( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<Vec<JobConfigurationReturn>>
Find a sync job configuration
GET /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}
Returns configurations matching the job and external connection IDs.
§Example
for job_config in client.sync().externalsystems().job_configs().get(1, 1)? {
println!("{}", job_config.name);
}Sourcepub fn get_filter(
&self,
external_system_id: impl Display,
job_id: impl Display,
) -> Result<SyncJobFilters>
pub fn get_filter( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<SyncJobFilters>
Get sync job record filters
GET /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/filter
Returns record filters grouped by direction.
§Example
let filter = client.sync().externalsystems().job_configs().get_filter(1, 1)?;
println!("{:?}", filter);Sourcepub fn get_properties(
&self,
external_system_id: impl Display,
job_id: impl Display,
) -> Result<SyncJobProperties>
pub fn get_properties( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<SyncJobProperties>
Get sync job selected fields
GET /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/properties
Returns selected fields grouped by direction.
§Example
let property = client.sync().externalsystems().job_configs().get_properties(1, 1)?;
println!("{}", property.domain_type);Sourcepub fn list(
&self,
external_system_id: impl Display,
) -> Result<Vec<JobConfigurationReturn>>
pub fn list( &self, external_system_id: impl Display, ) -> Result<Vec<JobConfigurationReturn>>
List jobs for an external connection
GET /sync/externalsystems/{externalSystemId}/jobconfigs
Lists job configurations belonging to the external connection.
§Example
for job_config in client.sync().externalsystems().job_configs().list(1)? {
println!("{}", job_config.name);
}Sourcepub fn start(
&self,
external_system_id: impl Display,
job_id: impl Display,
body: &SyncExecutionCreate,
) -> Result<()>
pub fn start( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncExecutionCreate, ) -> Result<()>
Schedule a sync execution
POST /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/start
Schedules the configuration as a background job. A 204 response confirms scheduling, not successful synchronization. Inspect /sync/executions and /sync/logs for progress. Requires an enabled license or active trial.
§Example
let body = models::SyncExecutionCreate {
is_dry_run: Some(true),
..Default::default()
};
client.sync().externalsystems().job_configs().start(1, 1, &body)?;Sourcepub fn update(
&self,
external_system_id: impl Display,
job_id: impl Display,
body: &SyncJobConfigurationUpdate,
) -> Result<JobConfigurationReturn>
pub fn update( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncJobConfigurationUpdate, ) -> Result<JobConfigurationReturn>
Update a sync job configuration
PUT /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}
Updates the job configuration for the external connection.
§Example
let body = models::SyncJobConfigurationUpdate {
auto_schedule_enabled: false,
domain_type: "person".into(),
name: "Synchronize people".into(),
id: 1,
..Default::default()
};
let result = client.sync().externalsystems().job_configs().update(1, 1, &body)?;
println!("{}", result.name);Sourcepub fn update_filter(
&self,
external_system_id: impl Display,
job_id: impl Display,
body: &SyncJobFiltersUpdate,
) -> Result<SyncJobFilters>
pub fn update_filter( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncJobFiltersUpdate, ) -> Result<SyncJobFilters>
Replace sync job record filters
PUT /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/filter
Filter operators and values are interpreted by the adapter.
§Example
let body = models::SyncJobFiltersUpdate {
es: vec![models::SyncJobFilterCreate {
field: "statusId".into(),
system: "master".into(),
values: serde_json::json!({}),
..Default::default()
}],
master: vec![models::SyncJobFilterCreate {
field: "statusId".into(),
system: "master".into(),
values: serde_json::json!({}),
..Default::default()
}],
..Default::default()
};
let result = client.sync().externalsystems().job_configs().update_filter(1, 1, &body)?;
println!("{:?}", result);Sourcepub fn update_properties(
&self,
external_system_id: impl Display,
job_id: impl Display,
body: &SyncJobPropertiesUpdate,
) -> Result<SyncJobProperties>
pub fn update_properties( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncJobPropertiesUpdate, ) -> Result<SyncJobProperties>
Replace sync job selected fields
PUT /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/properties
Value mappings and adapter options are inherited from the referenced mapping.
§Example
let body = models::SyncJobPropertiesUpdate {
property_mappings_es_to_master: vec![models::SyncJobPropertyCreate {
field_mapping_id: 1,
from: "firstName".into(),
from_filter: "".into(),
system: "master".into(),
to: "firstName".into(),
to_filter: "".into(),
..Default::default()
}],
property_mappings_master_to_es: vec![models::SyncJobPropertyCreate {
field_mapping_id: 1,
from: "firstName".into(),
from_filter: "".into(),
system: "master".into(),
to: "firstName".into(),
to_filter: "".into(),
..Default::default()
}],
..Default::default()
};
let result = client.sync().externalsystems().job_configs().update_properties(1, 1, &body)?;
println!("{}", result.domain_type);