### Install OttoFMS using the Linux Install Script Source: https://docs.ottofms.com/getting-started/install This command downloads and executes the OttoFMS installation script for Linux. It handles the installation process automatically. You can also specify a version to install. ```bash sudo curl -sSL "https://downloads.ottomatic.cloud/ottofms/install-scripts/install-linux.sh" | bash ``` ```bash sudo curl -sSL "https://downloads.ottomatic.cloud/ottofms/install-scripts/install-linux.sh" | bash -s -- -v 4.1.0 ``` -------------------------------- ### Manually Install OttoFMS Package on Linux Source: https://docs.ottofms.com/getting-started/install This command installs the OttoFMS application package on a Linux system using apt. Ensure you have downloaded the correct .deb file for your system architecture. ```bash sudo apt -y install ./ottofms-app_1.0.0_amd64.deb ``` -------------------------------- ### Start OttoFMS on MacOS Source: https://docs.ottofms.com/managing-ottofms/starting-stopping Starts the OttoFMS application on MacOS using the launchctl command. This command requires superuser privileges. ```bash sudo launchctl bootstrap system /Library/LaunchDaemons/com.proofgeist.ottofms.plist ``` -------------------------------- ### API Key URL and Header Examples: Otto v3 vs OttoFMS Source: https://docs.ottofms.com/otto3/should-i-upgrade-yet Compares the URL structure and authorization headers for Data API and webhook requests between Otto v3 and OttoFMS. Highlights the change in port and the new API key prefixes (`dk_` for Data API, `ak_` for Admin API) in OttoFMS. ```shell Otto v3 ``` https://my-otto-server.com:3030/fmi/data/vLatest/... -H Authorization: Bearer KEY_12395874 # or https://my-otto-server.com:3030/receiver/SimpleQ.fmp12/channel?apiKey=KEY_12395874 ``` ``` ```shell OttoFMS ``` https://my-otto-server.com/otto/fmi/data/vLatest/... -H Authorization: Bearer dk_85238774 # or https://my-otto-server.com/otto/receiver/SimpleQ.fmp12/channel?apiKey=dk_85238774 ``` ``` -------------------------------- ### Start OttoFMS on Linux Source: https://docs.ottofms.com/managing-ottofms/starting-stopping Starts the OttoFMS application on Linux using the systemctl command. This command requires superuser privileges. ```bash sudo systemctl start ottofms-proofgeist-com.service ``` -------------------------------- ### OttoFMS Deployment Start Request Sample Source: https://docs.ottofms.com/apidoc This JSON payload represents the request body for starting a deployment. It includes a label, an array of deployments, a flag to abort on failure, and scheduling details. ```json { "label": "string", "deployments": [ // Array of deployment objects ], "abortRemaining": true, "chainedAction": {}, "scheduled": true, "timestamp": "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])..." } ``` -------------------------------- ### GET Response Sample for Server Preferences Source: https://docs.ottofms.com/apidoc An example of a successful 200 OK response when retrieving FileMaker server preferences using the GET /otto/api/settings/serverPrefs endpoint. The response contains an empty 'response' object and a success message. ```json { "response": { }, "messages": [ { "code": 0, "text": "ok" } ] } ``` -------------------------------- ### GET /otto/api/deployment/backups - List Available Deployment Backups Source: https://docs.ottofms.com/apidoc Lists all available deployment backups. ```APIDOC ## List Available Deployment Backups ### Description Lists all available deployment backups, including deployments and sub-deployments. ### Method GET ### Endpoint /otto/api/deployment/backups ### Parameters None ### Request Example None ### Response #### Success Response (200) - **response** (object) - Contains lists of deployment and sub-deployment backups. - **deployments** (array) - An array of deployment backup identifiers. - **subDeployments** (array) - An array of sub-deployment backup identifiers. - **messages** (array) - An array of message objects. - **code** (integer) - The message code (0 for success). - **text** (string) - The message text ("ok" for success). #### Response Example ```json { "response": { "deployments": [ 12345 ], "subDeployments": [ 67890 ] }, "messages": [ { "code": 0, "text": "ok" } ] } ``` ``` -------------------------------- ### Example OttoFMS .env File Configuration Source: https://docs.ottofms.com/managing-ottofms/configuring-with-env Provides a sample .env file demonstrating common OttoFMS configuration parameters. Includes settings for server paths, credentials, keep-alive, and debug logging. ```env FMS_SERVER_PATH=/path/to/fmserver FMSERVER_USERNAME=username FMSERVER_PASSWORD=password KEEPJIT=1 DEBUG_APP_LOG=true ``` -------------------------------- ### Check OttoFMS Startup Logs (Example) Source: https://docs.ottofms.com/ottofms-troubleshooting This log snippet shows a successful startup of the OttoFMS service. It indicates that the internal database is up to date, the service is listening on a specific port, and it reports the environment, version, Node.js version, and other operational details. Variations may occur based on system configuration. ```text info otto internal database up to date info Listening on http://localhost:3061 info environment "production" info version "4.4.0" info node version v20.11.1 info started watching offsite backup info started watching for hostname changes info Restarted httpserver info Reverse Proxy installed or updated info Ottomatic License status: valid ``` -------------------------------- ### Postman Webhook GET Request URL Source: https://docs.ottofms.com/guides/webhooks This demonstrates how to construct a GET request URL for testing an OttoFMS webhook. It includes the API key and a message parameter, suitable for testing when a request body is not used. ```http https://[your.server.host]/otto/receiver/Database.fmp12/[channel]?apiKey=dk_12395874&message=Hello%20World ``` -------------------------------- ### Get Sub-Deployment Request - Path Parameter Example Source: https://docs.ottofms.com/apidoc This illustrates how to construct a request to retrieve sub-deployment data using the GET /otto/api/deployment/{id} endpoint. The 'id' in the path parameter is a required integer representing the sub-deployment ID. ```http GET /otto/api/deployment/12345 HTTP/1.1 Host: your.server.net ``` -------------------------------- ### Postman Webhook Test JSON Payload Source: https://docs.ottofms.com/guides/webhooks Example of a JSON payload that can be sent to an OttoFMS webhook URL using a tool like Postman for testing. This demonstrates a simple key-value pair. ```json { "message": "Hello World" } ``` -------------------------------- ### POST /otto/api/deployment Source: https://docs.ottofms.com/apidoc Start a deployment. This endpoint initiates a deployment asynchronously. You can check the status of sub-deployments using the `/deployment` endpoint. ```APIDOC ## POST /otto/api/deployment ### Description Use this endpoint to start a deployment. The deployment will be started asynchronously and you can use the `/deployment` endpoint to check the status of the sub-deployments. ### Method POST ### Endpoint /otto/api/deployment ### Parameters #### Request Body - **label** (string) - Required - A descriptive label for the batch of deployments. - **deployments** (array) - Required - An array of deployment objects to be run in sequence. - **label** (string) - Required - A descriptive label for the individual deployment. - **files** (array) - Required - An array of file objects to be deployed. - **sourcePath** (string) - Required - The path to the source file. - **destinationPath** (string) - Required - The path where the file should be deployed on the server. - **overwrite** (boolean) - Optional - Whether to overwrite the file if it already exists. - **deployMethod** (string) - Optional - The deployment method (e.g., "copy", "migrate"). - **abortRemaining** (boolean) - Optional - If true, subsequent deployments in the batch will be aborted if one fails. - **chainedAction** (object or array) - Optional - Actions to be performed after the deployment. - **scheduled** (boolean) - Required - Determines whether to schedule the deployment for later. Value: true. - **timestamp** (string) - Required - The timestamp to use for scheduling the deployment. Format should follow Claris FileMaker scheduling API documentation. ### Request Example ```json { "label": "My Deployment Batch", "deployments": [ { "label": "Deploy Web Server Files", "files": [ { "sourcePath": "/path/to/local/index.html", "destinationPath": "/var/www/html/index.html", "overwrite": true } ] } ], "abortRemaining": true, "scheduled": true, "timestamp": "2023-10-27T10:00:00Z" } ``` ### Response #### Success Response (200) - **response** (object) - Contains the result of the deployment start operation. - **success** (boolean) - Indicates if the deployment start was successful. - **message** (string) - A message providing details about the operation. - **deploymentIds** (array) - An array of deployment IDs initiated. - **messages** (array) - A list of messages related to the operation. - **code** (integer) - The message code. - **text** (string) - The message text. #### Response Example ```json { "response": { "success": true, "message": "Deployment initiated successfully.", "deploymentIds": ["dep-12345"] }, "messages": [ { "code": 0, "text": "ok" } ] } ``` ``` -------------------------------- ### OttoFMS Build Request Payload Example (JSON) Source: https://docs.ottofms.com/apidoc This JSON payload demonstrates the structure for initiating a build process with OttoFMS. It includes configurations for files to build, script execution (pre-build, pre-deployment, post-deployment), compression settings, and publishing destinations. ```json { "buildId": "string", "files": [ { "fileName": "string", "clone": true, "user": "string", "password": "string", "encryptionKey": "string" } ], "textFiles": [ { "fileName": "string", "content": "string" } ], "force": false, "preBuildScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "stopBuildOnFail": false }, "preDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "abortIfScriptFails": true }, "postDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "rollbackIfScriptFails": false }, "closeFiles": false, "ensureFilesOpen": false, "compressionLevel": 0, "memoryLevel": 1, "zipFiles": true, "includeContainerData": false, "publish": { "destinations": [ { "type": "server", "serverUrl": "string", "apiKey": "string" } ] }, "chainedAction": { "sendOnFailure": false, "type": "build_start", "id": "string", "url": "string", "apiKey": "string", "input": null }, "notifications": [ { "type": "slack", "channelUrl": "string", "label": "string" } ], "scheduled": false } ``` -------------------------------- ### GET /otto/api/deployment/queued/count - Get Count of Queued Deployments Source: https://docs.ottofms.com/apidoc Retrieves the number of deployments currently in the queue. ```APIDOC ## Get Count of Queued Deployments ### Description Retrieves the number of deployments currently in the queue. ### Method GET ### Endpoint /otto/api/deployment/queued/count ### Parameters None ### Request Example None ### Response #### Success Response (200) - **response** (object) - Contains the count of queued deployments. - **count** (number) - The number of queued deployments. Returns -1.7976931348623157e+308 if there's an issue. - **messages** (array) - An array of message objects. - **code** (integer) - The message code (0 for success). - **text** (string) - The message text ("ok" for success). #### Response Example ```json { "response": { "count": 5 }, "messages": [ { "code": 0, "text": "ok" } ] } ``` ``` -------------------------------- ### Get File Download Link - Query Parameter - GET Request Source: https://docs.ottofms.com/apidoc This describes a GET request to download a file using a token obtained from a previous endpoint. The token should ideally be included in the query string for security and compatibility. The response indicates success or failure. ```http GET /otto/api/fm-file/download?token=string ``` -------------------------------- ### OttoFMS Build Response Sample (200 OK) Source: https://docs.ottofms.com/apidoc This JSON response indicates a successful build initiation via the OttoFMS API. It includes a boolean indicating if the process started and a unique OttoFMS ID for tracking. Any messages related to the operation are also provided. ```json { "response": { "started": true, "ottofmsId": -1.7976931348623157e+308 }, "messages": [ { "code": 0, "text": "ok" } ] } ``` -------------------------------- ### Get File Download Link - Path Parameter - GET Request Source: https://docs.ottofms.com/apidoc This describes an alternative GET request to download a file where the token is included directly in the URL path. While supported for backward compatibility, using query parameters is recommended. The response signifies the outcome of the download attempt. ```http GET /otto/api/fm-file/download/{token} ``` -------------------------------- ### FileMaker Script: Pre-build File Setup and Status Reporting Source: https://docs.ottofms.com/concepts/builds/pre-build-scripts This script demonstrates creating a file, writing a 'done' status to it, and closing it. This is useful for pre-build tasks like preparing deployment files or signaling completion. It utilizes FileMaker's scripting functions for variable assignment, file operations, and data writing. ```filemaker Set Variable [ $filepath ; Value: "file:" & Get(DocumentsPath) & "/otto-prebuild-result.txt" ] Set Variable [ $done ; Value: "done" ] # Create Data File [ “$filepath” ; Create folders: Off ] Open Data File [ “$filepath” ; Target: $fileId ] Write to Data File [ File ID: $fileId ; Data source: $done ; Write as: UTF-8 ; Append line feed ] Close Data File [ File ID: $fileId ] ``` -------------------------------- ### GET /otto/api/deployment/batches/:batchId/deployments - Get Sub-Deployments for a Deployment Source: https://docs.ottofms.com/apidoc Retrieves a list of sub-deployments associated with a specific deployment batch. This is useful for inspecting the components of a larger deployment. ```APIDOC ## GET /otto/api/deployment/batches/:batchId/deployments ### Description Retrieves a list of sub-deployments associated with a specific deployment batch. ### Method GET ### Endpoint /otto/api/deployment/batches/:batchId/deployments ### Parameters #### Path Parameters - **batchId** (integer ) - Required - The unique identifier for the deployment batch whose sub-deployments are to be retrieved. ### Response #### Success Response (200) (Response structure for successful retrieval of sub-deployments is not detailed in the provided text, but would typically include a list of sub-deployment objects.) #### Response Example (Response example for success is not detailed in the provided text.) ``` -------------------------------- ### New Deployment Source Type Source: https://docs.ottofms.com/ottofms-changelog Enables deploying .fmp12 files from URLs. ```APIDOC ## POST /api/deployments/start ### Description Starts a deployment using a new source type 'file_urls'. OttoFMS will deploy .fmp12 files from any URLs the server can access. ### Method POST ### Endpoint /api/deployments/start ### Parameters #### Request Body - **deploymentConfiguration** (object) - Required - The configuration for the deployment. - **sourceType** (string) - Required - Must be 'file_urls'. - **fileUrls** (array) - Required - A list of URLs pointing to the .fmp12 files. ### Request Example ```json { "deploymentConfiguration": { "sourceType": "file_urls", "fileUrls": [ "http://example.com/files/database.fmp12", "http://example.com/files/another.fmp12" ] } } ``` ### Response #### Success Response (200) - **deploymentId** (string) - The ID of the newly created deployment. #### Response Example ```json { "deploymentId": "deploy-new-id" } ``` ``` -------------------------------- ### Deployment APIs Source: https://docs.ottofms.com/ottofms-changelog A comprehensive suite of APIs for managing deployments, including listing, deletion, resuming, and renaming. ```APIDOC ## GET /api/deployments ### Description Lists deployments and sub-deployments with detailed information. ### Method GET ### Endpoint /api/deployments ### Response #### Success Response (200) - **deployments** (array) - A list of deployment objects. #### Response Example ```json { "deployments": [ { "id": "deploy-xyz", "name": "MyDeployment", "status": "completed", "createdAt": "2023-10-27T11:00:00Z" } ] } ``` ``` ```APIDOC ## DELETE /api/deployments/{deploymentId} ### Description Deletes a deployment or sub-deployment. ### Method DELETE ### Endpoint /api/deployments/{deploymentId} ### Parameters #### Path Parameters - **deploymentId** (string) - Required - The ID of the deployment to delete. ### Response #### Success Response (200) - **message** (string) - Confirmation of successful deletion. #### Response Example ```json { "message": "Deployment deploy-xyz deleted successfully." } ``` ``` ```APIDOC ## POST /api/deployments/{deploymentId}/resume ### Description Resumes a crashed deployment. ### Method POST ### Endpoint /api/deployments/{deploymentId}/resume ### Parameters #### Path Parameters - **deploymentId** (string) - Required - The ID of the deployment to resume. ### Response #### Success Response (200) - **message** (string) - Confirmation that the deployment resume process has started. #### Response Example ```json { "message": "Deployment deploy-abc is resuming." } ``` ``` ```APIDOC ## PUT /api/deployments/{deploymentId}/rename ### Description Renames a deployment or sub-deployment. ### Method PUT ### Endpoint /api/deployments/{deploymentId}/rename ### Parameters #### Path Parameters - **deploymentId** (string) - Required - The ID of the deployment to rename. #### Request Body - **newName** (string) - Required - The new name for the deployment. ### Request Example ```json { "newName": "MyRenamedDeployment" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation of successful renaming. #### Response Example ```json { "message": "Deployment deploy-xyz renamed successfully." } ``` ``` -------------------------------- ### POST Response Sample for Restart OttoFMS Source: https://docs.ottofms.com/apidoc Example of a 200 OK response after successfully initiating a restart of the OttoFMS service via the POST /otto/api/restart endpoint. It confirms the restart action and provides a status message. ```json { "response": { "ok": true, "message": "OttoFMS restarting" }, "messages": [ { "code": 0, "text": "ok" } ] } ``` -------------------------------- ### Get Build Status (GET /otto/api/build/:buildId/status) Source: https://docs.ottofms.com/apidoc Retrieves the status of a specific build. Accepts an optional `delay` query parameter for delayed status retrieval. The response includes build status information. ```http GET https://your.server.net/otto/api/build/{buildId}/status ``` -------------------------------- ### JSON Response Sample for Deployment (200 OK) Source: https://docs.ottofms.com/apidoc This JSON structure represents a successful API response (200 OK) detailing a deployment's lifecycle. It includes deployment metadata, status, logs, payload for configuration, and a comprehensive build manifest. Note that numeric values are represented as floating-point numbers due to the sample's nature. ```json { "response": { "deployments": [ { "id": -1.7976931348623157e+308, "name": "string", "file_count": -1.7976931348623157e+308, "final_result": "successful", "running": -1.7976931348623157e+308, "status": "queued", "log": [ { "level": "info", "phase": "scheduled", "message": "string", "timeElapsed": 9007199254740991, "file": "string" } ], "deployment_payload": { "source": { "type": "url", "url": "string" }, "name": "string", "preDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "abortIfScriptFails": true }, "postDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "rollbackIfScriptFails": false }, "fileOperations": [ { "operation": "migrate", "clone": { "fileName": "string", "user": "string", "password": "string", "encryptionKey": "string" }, "dataSource": { "fileName": "string", "user": "string", "password": "string", "encryptionKey": "string" }, "target": { "fileName": "string", "encryptionKey": "string" }, "dataMigrationOptions": { "-target_locale": "string", "-force": true, "-ignore_valuelists": true, "-ignore_accounts": true, "-ignore_fonts": true, "-reevaluate": true, "-rebuildindexes": true, "-v": true } } ], "concurrency": 1, "options": { "closeFilesMessage": "string", "notifications": [ { "type": "slack", "channelUrl": "string", "label": "string" } ], "closeFilesAfterBuild": false, "keepFilesClosedAfterComplete": false, "transferContainerData": false } }, "build_manifest": { "status": "completed", "buildId": "string", "zipArchive": "string", "textFiles": [ { "fileName": "string", "content": "string" } ], "files": [ { "fileName": "string", "clone": true, "user": "string", "password": "string", "encryptionKey": "string", "size": -1.7976931348623157e+308, "hasContainerData": true } ], "zipSize": 1.7976931348623157e+308, "completedFiles": 9007199254740991, "message": "string", "log": [ { "level": "info", "phase": "scheduling", "message": "string", "timeElapsed": 9007199254740991, "file": "string" } ], "startedAt": "string", "chainedActionResults": [ { "action": { "sendOnFailure": false, "type": "build_start", "id": "string", "url": "string", "apiKey": "string", "input": null }, "result": null, "success": true } ], "ottofmsId": -1.7976931348623157e+308, "preDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "abortIfScriptFails": true }, "postDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "rollbackIfScriptFails": false } } } ] } } ``` -------------------------------- ### Get OttoFMS Info (GET /otto/api/info) Source: https://docs.ottofms.com/apidoc Retrieves information about the OttoFMS server and FileMaker Server. It returns details such as versions, build numbers, environment tags, and server status. The response is in JSON format. ```json { "response": { "Otto": { "version": "4.2.4", "build": "4.2.4.240318483", "themeColor": "#12b886", "environmentTag": "dev", "environmentTagColor": null, "serverNickname": "OttoFMS Dev", "isLicenseValid": true, "isOCCConnected": false }, "FileMakerServer": { "version": { "long": "20.3.2 205(01-24-2024)", "short": "20.3.2", "major": 20, "minor": 3, "patch": 2 }, "fmsRunning": true, "serverId": "AFSDLKFJH0197283451LK32JHG4ASO9D8FYALKSDHGBJFG", "host": "fms.example.com" } }, "messages": [ { "code": 0, "text": "ok" } ] } ``` -------------------------------- ### POST /otto/api/build Source: https://docs.ottofms.com/apidoc Initiates a new build process on the OttoFMS server. This endpoint allows configuration of various build parameters, including files to include, scripts to run, and deployment options. ```APIDOC ## POST /otto/api/build ### Description Initiates a new build process on the OttoFMS server. This endpoint allows configuration of various build parameters, including files to include, scripts to run, and deployment options. ### Method POST ### Endpoint /otto/api/build ### Parameters #### Request Body - **buildId** (string or null) - Optional - A unique identifier for the build. - **filesrequired** (Array of objects) - Required - An array of FileMaker files to include in the build. - **fileName** (string) - Required - The name of the FileMaker file. - **clone** (boolean) - Optional - Whether to clone the file. - **user** (string) - Optional - The username for accessing the file. - **password** (string) - Optional - The password for accessing the file. - **encryptionKey** (string) - Optional - The encryption key for the file. - **textFiles** (Array of objects) - Optional - An array of text files to include in the build zip. - **fileName** (string) - Required - The name of the text file. - **content** (string) - Required - The content of the text file. - **force** (boolean) - Optional - Default: `false`. Forces the build process. - **preBuildScript** (object) - Optional - Script to be run before files are closed or backed up. - **file** (object) - Optional - The file containing the script. - **name** (string) - Required - The name of the script file. - **user** (string) - Optional - The username for accessing the script file. - **password** (string) - Optional - The password for accessing the script file. - **script** (object) - Optional - The script to execute. - **name** (string) - Required - The name of the script. - **param** (string) - Optional - The parameter for the script. - **timeout** (integer) - Optional - The timeout in seconds for the script execution. - **stopBuildOnFail** (boolean) - Optional - Whether to stop the build if the pre-build script fails. - **preDeploymentScript** (object) - Optional - Script to be run before deployment. - **file** (object) - Optional - The file containing the script. - **name** (string) - Required - The name of the script file. - **user** (string) - Optional - The username for accessing the script file. - **password** (string) - Optional - The password for accessing the script file. - **script** (object) - Optional - The script to execute. - **name** (string) - Required - The name of the script. - **param** (string) - Optional - The parameter for the script. - **timeout** (integer) - Optional - The timeout in seconds for the script execution. - **abortIfScriptFails** (boolean) - Optional - Whether to abort the deployment if the pre-deployment script fails. - **postDeploymentScript** (object) - Optional - Script to be run after deployment. - **file** (object) - Optional - The file containing the script. - **name** (string) - Required - The name of the script file. - **user** (string) - Optional - The username for accessing the script file. - **password** (string) - Optional - The password for accessing the script file. - **script** (object) - Optional - The script to execute. - **name** (string) - Required - The name of the script. - **param** (string) - Optional - The parameter for the script. - **timeout** (integer) - Optional - The timeout in seconds for the script execution. - **rollbackIfScriptFails** (boolean) - Optional - Whether to rollback if the post-deployment script fails. - **closeFiles** (boolean) - Optional - Default: `false`. Close files before backing up. Ignored for clones. If the file is encrypted, it will be closed and reopened with the encryption key. - **ensureFilesOpen** (boolean) - Optional - Default: `false`. If true, OttoFMS will ensure that the files are open at the end of the build. - **compressionLevel** (integer) - Optional - Default: `0`. The compression level used by OttoFMS to compress the build zip. Range: [-1 .. 9]. - **memoryLevel** (integer) - Optional - Default: `1`. The amount of memory used by OttoFMS to zip the build. Range: [1 .. 9]. - **zipFiles** (boolean) - Optional - Default: `true`. If true, OttoFMS will zip the files. If false, the build will only work for local deployments or actions. - **includeContainerData** (boolean) - Optional - Default: `false`. If true, OttoFMS will add external container data for copies to the build. - **publish** (object) - Optional - Publishing options. - **destinations** (Array of objects) - Optional - The list of destinations to publish to. - **type** (string) - Required - The type of destination (e.g., "server"). - **serverUrl** (string) - Required - The URL of the server. - **apiKey** (string) - Required - The API key for the destination. - **chainedAction** (object or Array of objects) - Optional - An action to be performed after the build. - **notifications** (Array of any or null) - Optional - Array of notification settings. - **type** (string) - Required - The type of notification (e.g., "slack"). - **channelUrl** (string) - Required - The URL of the notification channel. - **label** (string) - Optional - A label for the notification. - **scheduled** (boolean) - Optional - Determines whether or not to schedule the deployment(s) for later. - **timestamp** (string) - Optional - The timestamp to use to schedule the deployment. Format as per Claris FileMaker scheduling API documentation. ### Request Example ```json { "buildId": "string", "files": [ { "fileName": "string", "clone": true, "user": "string", "password": "string", "encryptionKey": "string" } ], "textFiles": [ { "fileName": "string", "content": "string" } ], "force": false, "preBuildScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "stopBuildOnFail": false }, "preDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "abortIfScriptFails": true }, "postDeploymentScript": { "file": { "name": "string", "user": "string", "password": "string" }, "script": { "name": "string", "param": "string", "timeout": 9007199254740991 }, "rollbackIfScriptFails": false }, "closeFiles": false, "ensureFilesOpen": false, "compressionLevel": 0, "memoryLevel": 1, "zipFiles": true, "includeContainerData": false, "publish": { "destinations": [ { "type": "server", "serverUrl": "string", "apiKey": "string" } ] }, "chainedAction": { "sendOnFailure": false, "type": "build_start", "id": "string", "url": "string", "apiKey": "string", "input": null }, "notifications": [ { "type": "slack", "channelUrl": "string", "label": "string" } ], "scheduled": false } ``` ### Response #### Success Response (200) - **response** (object) - Contains build status information. - **started** (boolean) - Indicates if the build process was started. - **ottofmsId** (number) - The internal ID assigned to the build process. - **messages** (Array of objects) - An array of messages related to the build process. - **code** (integer) - The message code. - **text** (string) - The message text. #### Response Example ```json { "response": { "started": true, "ottofmsId": -1.7976931348623157e+308 }, "messages": [ { "code": 0, "text": "ok" } ] } ``` #### Error Response (400) POST /otto/api/build Negative response ``` -------------------------------- ### Get Sub-Deployments (GET /otto/api/deployment/batches/:batchId/deployments) Source: https://docs.ottofms.com/apidoc Retrieves a list of sub-deployments associated with a given deployment batchId. This endpoint is useful for inspecting the components or stages within a larger deployment. It returns a success response with the list of sub-deployments or an error. ```HTTP GET /otto/api/deployment/batches/{batchId}/deployments https://your.server.net/otto/api/deployment/batches/{batchId}/deployments ``` -------------------------------- ### OttoFMS Build Publish Request Sample Source: https://docs.ottofms.com/apidoc This JSON payload demonstrates the structure for publishing a build to a specified destination server. It requires a destination type, server URL, and an API key. ```json { "destination": { "type": "server", "serverUrl": "string", "apiKey": "string" } } ``` -------------------------------- ### Get Server Settings (GET /otto/api/settings) Source: https://docs.ottofms.com/apidoc Retrieves the current server settings for OttoFMS. This endpoint returns a JSON object containing all configurable settings and their current values, including webhook registration, debug logging, backup limits, and more. -------------------------------- ### Get File Download Link (GET) Source: https://docs.ottofms.com/apidoc Generates a downloadable link for a FileMaker file (copy or clone). The link, when accessed, provides a zip of the file. This endpoint requires the filename as a path parameter and supports optional 'clone' and 'expiry' query parameters. ```HTTP GET /otto/api/fm-file/:filename/link https://your.server.net/otto/api/fm-file/{filename}/link ```