Skip to content

Host Migration

The Host Migration service collection provides operations for creating and managing device migration jobs in your CrowdStrike Falcon environment. Aggregate host migration and migration data, perform actions on host migrations and migration jobs, retrieve host migration details, get migration destinations, create migrations, and query migration IDs.

LanguageLast Update
Pythonv1.5.2
PowerShellv2.2.9
Gov0.20.0
TypeScriptv0.6.0
Rustv0.7.0
Rubyv1.2.0
OperationDescription
HostMigrationAggregatesV1
aggregate_host_migration
Get host migration aggregates as specified via json in request body.
MigrationAggregatesV1
aggregate_migration
Get migration aggregates as specified via json in request body.
HostMigrationsActionsV1
perform_host_migration_action
Perform an action on host migrations.
GetHostMigrationsV1
get_host_migration_details
Get host migration details.
GetMigrationDestinationsV1
get_migration_destination
Get destinations for a migration.
MigrationsActionsV1
perform_migration_job_action
Perform an action on a migration job.
GetMigrationsV1
get_migration_job_details
Get migration job details.
CreateMigrationV1
create_migration
Create a device migration job.
GetHostMigrationIDsV1
query_host_migration_ids
Query host migration IDs.
GetMigrationIDsV1
query_migration_jobs
Query migration jobs.

Get host migration aggregates as specified via json in request body.

POST /host-migration/aggregates/host-migrations/v1
Scope Host Migration: WRITE Consumes · Produces application/json
PEP 8 aggregate_host_migration
NameTypeData typeDescription
bodybodylist of dictionariesFull body payload in JSON format.
date_rangesbodylist of dictionariesApplies to date_range aggregations. Example: [{“from”: “2016-05-28T09:00:31Z”, “to”: “2016-05-30T09:00:31Z”}, {“from”: “2016-06-01T09:00:31Z”, “to”: “2016-06-10T09:00:31Z”}]
excludebodystringElements to exclude.
fieldbodystringThe field on which to compute the aggregation.
filterbodystringFQL syntax formatted string to use to filter the results.
frombodyintegerStarting position.
includebodystringElements to include.
intervalbodystringTime interval for date histogram aggregations. Valid values: year, month, week, day, hour, minute
max_doc_countbodyintegerOnly return buckets if values are less than or equal to the value here.
min_doc_countbodyintegerOnly return buckets if values are greater than or equal to the value here.
missingbodystringMissing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value.
namebodystringName of the aggregate query, as chosen by the user. Used to identify the results returned to you.
qbodystringFull text search across all metadata fields.
rangesbodylist of dictionariesApplies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [{“From”: 0, “To”: 70}, {“From”: 70, “To”: 100}]
sizebodyintegerThe max number of term buckets to be returned.
sub_aggregatesbodylist of dictionariesA nested aggregation, such as: [{“name”: “max_first_behavior”, “type”: “max”, “field”: “first_behavior”}]. There is a maximum of 3 nested aggregations per request.
sortbodystringFQL syntax string to sort bucket results. _count - sort by document count. _term - sort by the string value alphabetically. Supports asc and desc using | format. Example: _count|desc
time_zonebodystringTime zone for bucket results.
typebodystringType of aggregation. Valid values: date_histogram, date_range, terms, range, cardinality, max, min, avg, sum, percentiles
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "string",
"to": "string"
}
]
extended_bounds = {
"max": "string",
"min": "string"
}
filters_spec = {
"filters": {},
"other_bucket": boolean,
"other_bucket_key": "string"
}
ranges = [
{
"from": integer,
"to": integer
}
]
sub_aggregates = [
{
"date_ranges": [
{
"from": "string",
"to": "string"
}
],
"exclude": "string",
"extended_bounds": {
"max": "string",
"min": "string"
},
"field": "string",
"filter": "string",
"filters_spec": {
"filters": {},
"other_bucket": boolean,
"other_bucket_key": "string"
},
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"percents": ["string"],
"q": "string",
"ranges": [
{
"from": integer,
"to": integer
}
],
"size": integer,
"sort": "string",
"sub_aggregates": [
{
"date_ranges": ["string"],
"exclude": "string",
"extended_bounds": {},
"field": "string",
"filter": "string",
"filters_spec": {},
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"percents": ["string"],
"q": "string",
"ranges": ["string"],
"size": integer,
"sort": "string",
"sub_aggregates": ["string"],
"time_zone": "string",
"type": "string"
}
],
"time_zone": "string",
"type": "string"
}
]
response = falcon.aggregate_host_migration(date_ranges=date_ranges,
exclude="string",
extended_bounds=extended_bounds,
field="string",
filter="string",
filters_spec=filters_spec,
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
percents=["string"],
q="string",
ranges=ranges,
size=integer,
sort="string",
sub_aggregates=sub_aggregates,
time_zone="string",
type="string")
print(response)

Get migration aggregates as specified via json in request body.

POST /host-migration/aggregates/migrations/v1
Scope Host Migration: WRITE Consumes · Produces application/json
PEP 8 aggregate_migration
NameTypeData typeDescription
bodybodylist of dictionariesFull body payload in JSON format.
date_rangesbodylist of dictionariesApplies to date_range aggregations. Example: [{“from”: “2016-05-28T09:00:31Z”, “to”: “2016-05-30T09:00:31Z”}, {“from”: “2016-06-01T09:00:31Z”, “to”: “2016-06-10T09:00:31Z”}]
excludebodystringElements to exclude.
fieldbodystringThe field on which to compute the aggregation.
filterbodystringFQL syntax formatted string to use to filter the results.
frombodyintegerStarting position.
includebodystringElements to include.
intervalbodystringTime interval for date histogram aggregations. Valid values: year, month, week, day, hour, minute
max_doc_countbodyintegerOnly return buckets if values are less than or equal to the value here.
min_doc_countbodyintegerOnly return buckets if values are greater than or equal to the value here.
missingbodystringMissing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value.
namebodystringName of the aggregate query, as chosen by the user. Used to identify the results returned to you.
qbodystringFull text search across all metadata fields.
rangesbodylist of dictionariesApplies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [{“From”: 0, “To”: 70}, {“From”: 70, “To”: 100}]
sizebodyintegerThe max number of term buckets to be returned.
sub_aggregatesbodylist of dictionariesA nested aggregation, such as: [{“name”: “max_first_behavior”, “type”: “max”, “field”: “first_behavior”}]. There is a maximum of 3 nested aggregations per request.
sortbodystringFQL syntax string to sort bucket results. _count - sort by document count. _term - sort by the string value alphabetically. Supports asc and desc using | format. Example: _count|desc
time_zonebodystringTime zone for bucket results.
typebodystringType of aggregation. Valid values: date_histogram, date_range, terms, range, cardinality, max, min, avg, sum, percentiles
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "string",
"to": "string"
}
]
extended_bounds = {
"max": "string",
"min": "string"
}
filters_spec = {
"filters": {},
"other_bucket": boolean,
"other_bucket_key": "string"
}
ranges = [
{
"from": integer,
"to": integer
}
]
sub_aggregates = [
{
"date_ranges": [
{
"from": "string",
"to": "string"
}
],
"exclude": "string",
"extended_bounds": {
"max": "string",
"min": "string"
},
"field": "string",
"filter": "string",
"filters_spec": {
"filters": {},
"other_bucket": boolean,
"other_bucket_key": "string"
},
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"percents": ["string"],
"q": "string",
"ranges": [
{
"from": integer,
"to": integer
}
],
"size": integer,
"sort": "string",
"sub_aggregates": [
{
"date_ranges": ["string"],
"exclude": "string",
"extended_bounds": {},
"field": "string",
"filter": "string",
"filters_spec": {},
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"percents": ["string"],
"q": "string",
"ranges": ["string"],
"size": integer,
"sort": "string",
"sub_aggregates": ["string"],
"time_zone": "string",
"type": "string"
}
],
"time_zone": "string",
"type": "string"
}
]
response = falcon.aggregate_migration(date_ranges=date_ranges,
exclude="string",
extended_bounds=extended_bounds,
field="string",
filter="string",
filters_spec=filters_spec,
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
percents=["string"],
q="string",
ranges=ranges,
size=integer,
sort="string",
sub_aggregates=sub_aggregates,
time_zone="string",
type="string")
print(response)

Perform an action on host migrations.

POST /host-migration/entities/host-migrations-actions/v1
Scope Host Migration: WRITE Consumes · Produces application/json
PEP 8 perform_host_migration_action
NameTypeData typeDescription
action_namequerystringThe action to perform. Allowed actions: remove_hosts, remove_host_groups, add_host_groups.
action_parametersbodydictionaryAction parameters payload to execute.
bodybodystringFull body payload as a JSON formatted dictionary. Not required if using other keyword arguments.
filterbodystringFQL formatted filter to use to identify migration IDs to target. Allowed filters: groups, hostgroups, static_host_groups, hostname, status, target_cid, source_cid, migration_id, id, host_migration_id, and created_time.
idquerystringThe migration job to perform actions on.
idsbodystring or list of stringsMigration IDs to target.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.perform_host_migration_action(id="string",
action_name="string")
print(response)

Get host migration details.

POST /host-migration/entities/host-migrations/GET/v1
Scope Host Migration: READ Consumes · Produces application/json
PEP 8 get_host_migration_details
NameTypeData typeDescription
bodybodydictionaryFull body payload in JSON format. Not required when using other keywords.
idsbodystring or list of stringsMigration IDs to retrieve.
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.get_host_migration_details(ids=["string"])
print(response)

Get destinations for a migration.

POST /host-migration/entities/migration-destinations/GET/v1
Scope Host Migration: READ Consumes · Produces application/json
PEP 8 get_migration_destination
NameTypeData typeDescription
bodybodystringFull body payload as a JSON formatted dictionary. Not required if using other keyword arguments.
filterbodystringFQL formatted filter to use to identify migration IDs to target. Allowed filters: groups, hostgroups, static_host_groups, hostname, status, target_cid, source_cid, migration_id, id, host_migration_id, and created_time.
device_idsbodystring or list of stringsDevice IDs to target.
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.get_migration_destination(device_ids=["string"],
filter="string")
print(response)

Perform an action on a migration job.

POST /host-migration/entities/migrations-actions/v1
Scope Host Migration: WRITE Consumes · Produces application/json
PEP 8 perform_migration_job_action
NameTypeData typeDescription
action_namequerystringThe action to perform. Allowed actions: start_migration, cancel_migration, rename_migration, and delete_migration.
action_parametersbodydictionaryAction parameters payload to execute.
bodybodystringFull body payload as a JSON formatted dictionary. Not required if using other keyword arguments.
filterbodystringFQL formatted filter to use to identify migration IDs to target. Allowed filters: groups, hostgroups, static_host_groups, hostname, status, target_cid, source_cid, migration_id, id, host_migration_id, and created_time.
idsbodystring or list of stringsMigration ID to target.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.perform_migration_job_action(action_name="string")
print(response)

Get migration job details.

GET /host-migration/entities/migrations/v1
Scope Host Migration: READ Consumes · Produces application/json
PEP 8 get_migration_job_details
NameTypeData typeDescription
idsquerystring or list of stringsThe migration jobs of interest.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_migration_job_details(ids=id_list)
print(response)

Create a device migration job.

POST /host-migration/entities/migrations/v1
Scope Host Migration: WRITE Consumes · Produces application/json
PEP 8 create_migration

The device_ids and filter arguments are mutually exclusive. When both are provided, the filter argument takes precedence.

NameTypeData typeDescription
bodybodystringFull body payload as a JSON formatted dictionary. Not required if using other keyword arguments.
device_idsbodystring or list of stringsDevice ID for the migration.
filterbodystringFQL formatted filter to identify devices for the migration.
namebodystringName of the migration job.
target_cidbodystringCID the migration job targets.
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.create_migration(device_ids=["string"],
filter="string",
name="string",
target_cid="string")
print(response)

Query host migration IDs.

GET /host-migration/queries/host-migrations/v1
Scope Host Migration: READ Consumes · Produces application/json
PEP 8 query_host_migration_ids
NameTypeData typeDescription
idquerystringThe migration job to query
filterquerystringThe filter expression that should be used to limit the results. Valid fields: static_host_groups, source_cid, migration_id, groups, hostgroups, target_cid, id, created_time, host_migration_id, hostname, and status
limitqueryintegerThe maximum records to return. [1-10000]
offsetqueryintegerThe offset to start retrieving records from
parametersquerydictionaryFull query string parameters payload in JSON format.
sortquerystringThe property to sort by. Available fields: source_cid, id, created_time, static_host_groups, hostname, status, target_cid, groups, hostgroups, migration_id, and host_migration_id
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_host_migration_ids(filter="string",
id="string",
limit="string",
offset="string",
sort="string")
print(response)

Query migration jobs.

GET /host-migration/queries/migrations/v1
Scope Host Migration: READ Consumes · Produces application/json
PEP 8 query_migration_jobs
NameTypeData typeDescription
filterquerystringThe filter expression that should be used to limit the results. Valid fields: status, migration_status, created_by, created_time, name, id, migration_id, and target_cid
limitqueryintegerThe maximum records to return. [1-10000]
offsetqueryintegerThe offset to start retrieving records from
parametersquerydictionaryFull query string parameters payload in JSON format.
sortquerystringThe property to sort by. Valid fields: migration_id, target_cid, status, migration_status, created_by, created_time, name, and id
from falconpy import HostMigration
falcon = HostMigration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_migration_jobs(filter="string",
limit="string",
offset="string",
sort="string")
print(response)