Skip to main content

JSON example

This example fetches two files from a development server (http://[otto-dev-server]). It also performs a data migration with both files.

Example

{
"concurrency": 5,
"closeFileTimeoutSeconds": 120,
"tasks": [
{
"remote": {
"fileName": "Contacts.fmp12",
"url": "http://[otto-dev-server]:3030/api/file/download/Contacts",
"auth": {
"user": "admin",
"pass": "{pass}"
},
"fms": { "clone": true }
},
"local": {
"fileName": "Contacts.fmp12",
"key": "{encryptionKey}",
"folder": {
"fmsDBFolder": "other1",
"subfolder": "CRM"
}
},
"fmDataMigration": {
"source": {
"account": "geist",
"pwd": "{pass}",
"key": "{encryptionKey}"
},
"clone": {
"account": "geist",
"pwd": "{pass}",
"key": "{encryptionKey}"
}
}
},
{
"remote": {
"fileName": "Data.fmp12",
"url": "http://[otto-dev-server]:3030/api/file/download/Data",
"auth": {
"user": "admin",
"pass": "{pass}"
},
"fms": {
"clone": true,
"preCloneDelay": 241
}
},
"local": {
"fileName": "Data.fmp12"
},
"fmDataMigration": {
"source": {
"account": "geist",
"pwd": "{pass}"
},
"clone": {
"account": "geist",
"pwd": "{pass}"
},
"additionalOptions": ["-ignore_fonts", "-ignore_valuelists"]
}
}
],
"slack": {
"channelUrl": "https://hooks.slack.com/services/EXAMPLE-XXXXX"
}
}

Details

concurrency

”concurrency”: 5

This sets the number of tasks to be performed concurrently. The default is 5.

closeFileTimeoutSeconds

"closeFileTimeoutSeconds": 90

When Otto closes any open files, you can tell it what to use as a timeout, where 90 seconds is both the default and the minimum. Setting it to 0 or less will force the files to close immediately.

remote

{
"remote": {
"fileName": "Contacts.fmp12",
"key": "{encryptionKey}",
"url": "http://[otto-dev-server]:3030/api/file/download/Contacts",
"auth": {
"user": "admin",
"pass": "{pass}"
},
"fms": { "clone": true }
}

Here we set the information for getting the file from the remote server. The auth section requires the FileMaker Server Admin Console password for the remote Otto server. You must set clone to true if you want to complete a data migration.

You can access a previously saved copy or clone of the file by adding ?savedFolder=myVersion2 to the end of the URL. If the file doesn't already exist in that folder, it will be created.

"url": "http://[otto-dev-server]:3030/api/file/download/Contacts?savedFolder=myVersion2",

The remote server does not need to be an Otto server. The requested file does need to be available over HTTP. Note that the remote web server can be protected with basic auth.

local

{
//...
"local": {
"fileName": "Contacts.fmp12",
"key": "{encryptionKey}",
"folder": {
"fmsDBFolder": "other1",
"subfolder": "CRM"
}
}

In the local section, we set the local fileName. This does not need to be the same name as the file on the source server. You can change the name of the file on the destination server. For example, the development file might have the suffix " Beta," but you may want the production file to exclude that suffix.

key is the encryption key that you want to use to open the file. This is only required if you are not doing a migration, and the file is encrypted.

The folder section determines where the file is stored on the FileMaker server, but only if it does not yet exist on the local server. If the file already exists during a migration, or while moving a file, Otto ignores this section. This allows you to do an initial install on to a server to a known location.

The folder section is required, but it can be an empty json object , {}.

fmsDBFolder

This property can be set to "default", "other1", or "other2". These correspond to folder locations where files are hosted.

subfolder

This is the name of the subfolder where you want to install the file, if it doesn't already exist. As of FileMaker 17, "other2" cannot have a subfolder.

fmDataMigration

{
//...
"fmDataMigration": {
"source": {
"account": "geist",
"pwd": "{pass}"
"key": "{encryptionKey}",
},
"clone": {
"account": "geist",
"pwd": "{pass}"
"key": "{encryptionKey}",
},
"additionalOptions": ["-ignore_fonts", "-ignore_valuelists", "-ignore_accounts"]
}

This section provides the information to the fmDataMigrator command-line utility to perform the migration. The account and pwd keys refer to the credentials for the FileMaker file, not FileMaker Server Admin Console. source represents the file where the data is stored. clone is the file retrieved from the source server, which was copied as a clone. This code lets you specify the credentials for the migration.

You can also specify any of the other options to pass to the command line fmdatamigrator using the additionalOptions property which takes an array of strings.

slack

Otto has a Slack App. Once configured, it will send progress messages to the designated Slack channel. This section of turns those messages on. If it is empty or is not present, Otto will not send messages to Slack.

Learn how to connect Otto with your slack workspace here.

{
// [ migrations tasks...],
"slack": {
"channelUrl": "https://hooks.slack.com/services/EXAMPLE-XXXXX"
}
}