REST API Job Examples
The Flight Deck API can be used to invoke any job on the Manager using the list of Job Templates in the Jobs > Template menu.
File transfer operations use:
- Media Mover to transfer files between Agent file systems
- Object Mover to transfer files between Agents and object storage
Once the Manager receives a valid request to create a Media Mover or Object Mover job, the API responds with the the job names and IDs created or invoked using the API request.
{
"creator": "UserName",
"jobs": [
{
"id": 12345678,
"jobName": "MyJobName"
}
]
}
Media Mover
Media Mover allows data transfer between Agents using file storage. Media Mover jobs fall under four general workflows:
MediaDropBox
In this example, MediaDropBox watches for files on a Linux Agent and transfers new files to a Windows Agent every 5 minutes.
Request Body
[
{
"job": {
"jobName": "APIMediaDropBox",
"fields": {
"jobGroupName": "MediaDropBox",
"jobTemplateLibraryName": "Media_Mover_Workflows",
"jobTemplateName": "MediaDropBox",
"jobArgs": {
"MediaDropBox.Source.DropBoxAgent": "your.source.agent",
"MediaDropBox.Source.DropBoxDirectory": "/source/directory",
"MediaDropBox.Target.TargetAgents": "your.target.agent",
"MediaDropBox.Target.TargetDirectory": "c:\\path\\to\\target",
"MediaDropBox.Schedule._sp_frequency": "5"
}
}
}
}
]
MediaAggregator
In this example, MediaAggregator collects files from a Windows and a Linux Agent to another Linux Agent.
Request Body
[
{
"job": {
"jobName": "APIMediaAggregator",
"fields": {
"jobGroupName": "MediaAggregator",
"jobTemplateLibraryName": "Media_Mover_Workflows",
"jobTemplateName": "MediaAggregator",
"jobArgs": {
"MediaAggregator.Source.SourceAgents": "your.windows.source.agent your.linux.source.agent",
"MediaAggregator.Source.SourceData": "<siglist type=\"filedir\"><el v=\"c:\\path\\to\\source\\data\" t=\"d\"></el><el v=\"/source/directory\" t=\"d\"></el></siglist>",
"MediaAggregator.Target.TargetAgent": "your.target.agent",
"MediaAggregator.Target.TargetDirectory": "/target/directory",
"MediaAggregator.Schedule._sp_frequency": "once"
}
}
}
}
]
MediaDistributor
In this example, MediaDistributor sends files from several directories on a Linux Agent to multiple Linux Agents.
Note: All destination Agents must have target directories with the same name.
Request Body
[
{
"job": {
"jobName": "APIMediaDistributor",
"fields": {
"jobGroupName": "MediaDistributor",
"jobTemplateLibraryName": "Media_Mover_Workflows",
"jobTemplateName": "MediaDistributor",
"jobArgs": {
"MediaDistributor.Source.SourceAgent": "your.source.agent",
"MediaDistributor.Source.SourceData": "<siglist type=\"filedir\"><el v=\"/path/to/source/A\" t=\"d\"></el><el v=\"/path/to/source/B\" t=\"d\"></el><el v=\"/path/to/source/C\" t=\"d\"></el></siglist>",
"MediaDistributor.Target.TargetAgents": "target.agent.one target.agent.two",
"MediaDistributor.Target.TargetDirectory": "/target/directory",
"MediaDistributor.Schedule._sp_frequency": "once"
}
}
}
}
]
MediaReplicator
In this example, MediaReplicator transfers files from a Windows Agent to a Linux Agent.
Request Body
[
{
"job": {
"jobName": "MyJobName",
"fields": {
"jobGroupName": "MyJobGroupName",
"jobTemplateLibraryName": "Media_Mover_Workflows",
"jobTemplateName": "MediaReplicator",
"jobArgs": {
"MediaReplicator.Source.SourceAgent": "your.source.agent",
"MediaReplicator.Source.SourceData": "c:\\path\\to\\source\\data",
"MediaReplicator.Target.TargetAgents": "your.target.agent",
"MediaReplicator.Target.TargetDirectory": "/target/directory",
"MediaReplicator.Schedule._sp_frequency": "once"
}
}
}
}
]
Object Mover
Object Mover allows data transfer to cloud or on-premises object storage. Object Mover jobs fall under four general workflows:
ObjectDropBox
In this example, ObjectDropBox watches for files on a Linux Agent and transfers new files to object storage every 5 minutes.
Request Body
[
{
"job": {
"jobName": "MyJobName",
"fields": {
"jobGroupName": "MyJobGroupName",
"jobTemplateLibraryName": "Object_Mover_Workflows",
"jobTemplateName": "ObjectDropBox",
"jobArgs": {
"ObjectDropBox.Source.DropBoxAgent": "source-agent-url",
"ObjectDropBox.Source.DropBoxDirectory": "/source-directory",
"ObjectDropBox.Target.targetAgent": "target-agent-url",
"ObjectDropBox.Target.targetObjectStorage": "{\"name\":\"Profile Name\"}",
"ObjectDropBox.Schedule._sp_frequency": "5"
}
}
}
}
]
ObjectUploader
In this example, ObjectUploader transfers files from a Linux Agent to object storage.
Request Body
[
{
"job": {
"jobName": "MyJobName",
"fields": {
"jobGroupName": "MyJobGroupName",
"jobTemplateLibraryName": "Object_Mover_Workflows",
"jobTemplateName": "ObjectUploader",
"jobArgs": {
"ObjectUploader.Source.SourceAgent": "source-agent-url",
"ObjectUploader.Source.SourceData": "/source-directory",
"ObjectUploader.Target.targetAgent": "target-agent-url",
"ObjectUploader.Target.targetObjectStorage": "{\"name\":\"Profile Name\"}",
"ObjectUploader.Schedule._sp_frequency": "once"
}
}
}
}
]
ObjectDownloader
In this example, ObjectDownloader transfers files from object storage to a Linux Agent.
Request Body
[
{
"job": {
"jobName": "MyJobName",
"fields": {
"jobGroupName": "MyJobGroupName",
"jobTemplateLibraryName": "Object_Mover_Workflows",
"jobTemplateName": "ObjectDownloader",
"jobArgs": {
"ObjectDownloader.Source.sourceAgent": "source-agent-url",
"ObjectDownloader.Source.sourceObjectStorage": "{\"name\":\"Profile Name\"}",
"ObjectDownloader.Source.sourceData": "/source-directory",
"ObjectDownloader.Target.TargetAgent": "target-agent-url",
"ObjectDownloader.Target.TargetDirectory": "/target-directory",
"ObjectDownloader.Schedule._sp_frequency": "once"
}
}
}
}
]
ObjectReplicator
In this example, ObjectReplicator transfers specific files between two object storage locations.
Request Body
[
{
"job": {
"jobName": "ObjectReplicatorAPI",
"fields": {
"jobGroupName": "ObjectReplicator",
"jobTemplateLibraryName": "Object_Mover_Workflows",
"jobTemplateName": "ObjectReplicator",
"jobArgs": {
"ObjectReplicator.Source.SourceAgent": "your.source.agent",
"ObjectReplicator.Source.sourceData": "<siglist type=\"multilineval\"><el v=\"file-1.mp4\"></el><el v=\"file-2.mp4\"></el></siglist>",
"ObjectReplicator.Source.sourceObjectStorage": "{\"name\":\"Source Profile Name\"}",
"ObjectReplicator.Target.targetAgent": "your.target.agent",
"ObjectReplicator.Target.targetObjectStorage": "{\"name\":\"Target Profile Name\"}",
"ObjectReplicator.Schedule._sp_frequency": "once"
}
}
}
}
]