Download OpenAPI specification:Download
Crafter Deployer API
Target creation is based on templates. The deployer comes with two out of the box: remote and local. The remote template creates targets that pull changes from a remote Git repository, making it ideal to create targets for delivery environments. The local template instead generates targets that use a local Git repo and the last processed commit to infer the changes, without executing a pull, so it’s used mostly to create targets for authoring environments.
If a target already exists and replace is true, then the new target will replace the existing one. If replace is false and the target exists, a 409 is returned.
Create target request body
env required | string The target’s environment (e.g. dev). |
site_name required | string The target’s project/site name (e.g. my-editorial). |
replace | boolean Replace the existing target. |
template_name | string The template to use for configuration generation. Out-of-the-box remote and local are provided. If not specified, remote will be used. |
disable_deploy_cron | boolean Disables the cron job that runs deployments every certain amount of time. |
repo_url required | string Depends on the template. If remote is being used, it specifies the URL of the remote repo to pull from (e.g. ssh://…). If instead the template is local, repo_url is the filesystem path of the local repo (e.g. /opt/..). |
repo_branch | string Only use with remote template. The branch name of the remote Git repo to pull from. If not specified, the branch will be whatever branch is the current one in the remote repo. |
repo_username | string Only use with remote template. The username of the remote Git repo. |
repo_password | string Only use with remote template. The username of the remote Git repo. |
ssh_private_key_path | string Only use with remote template. The path for the private key used for the remote Git repo. |
ssh_private_key_passphrase | string Only use with remote template. The passphrase for the private key for the remote Git repo (only if the key is passphrase-protected). |
engine_url | string Base URL of Engine, used to make API calls like clear cache and rebuild context. If not specified, the default is http://localhost:8080. |
notification_addresses | string The email addresses that should receive deployment notifications. |
{- "env": "preview",
- "site_name": "my-editorial",
- "replace": true,
- "disable_deploy_cron": true,
- "template_name": "local",
- "repo_url": "/opt/crafter/data/repos/sites/my-editorial/sandbox",
}
{- "message": "OK"
}
env required | string Example: env,dev The target’s environment (e.g. dev). |
site_name required | string Example: site_name,editorial The target’s project/site name (e.g. editorial). |
{- "env": "dev",
- "siteName": "editorial",
- "id": "editorial-dev",
- "load_date": "2023-01-26T10:00:1.234-05:00",
- "status": "INIT_COMPLETED"
}
[- {
- "load_date": "2023-03-30T13:24:36.042181-04:00",
- "env": "preview",
- "siteName": "hi",
- "status": "INIT_COMPLETED",
- "id": "hi-preview"
}, - {
- "load_date": "2023-03-31T09:48:48.214383-04:00",
- "env": "preview",
- "siteName": "third",
- "status": "INIT_COMPLETED",
- "id": "third-preview"
}
]
env required | string Example: env,dev The target’s environment (e.g. dev). |
site_name required | string Example: site_name,editorial The target’s project/site name (e.g. editorial). |
{- "message": "Target not found"
}
env required | string Example: env,dev The target’s environment (e.g. dev). |
site_name required | string Example: site_name,editorial The target’s project/site name (e.g. editorial). |
reprocess_all_files | boolean If all files in all the target repos should be reprocessed. |
from_commit_id | string The id of the commit to start processing changes |
deployment_mode | string The deployment mode to execute. Possible values: |
{- "reprocess_all_files": true,
- "from_commit_id": "string",
- "deployment_mode": "string"
}
{- "message": "OK"
}
reprocess_all_files | boolean If all files in all the target repos should be reprocessed. |
deployment_mode | string The deployment mode to execute. Possible values: |
{- "reprocess_all_files": true,
- "deployment_mode": "string"
}
{- "message": "OK"
}
env required | string Example: env,dev The target’s environment (e.g. dev). |
site_name required | string Example: site_name,editorial The target’s project/site name (e.g. editorial). |
token required | string Example: token=defaultManagementToken The authorization token |
{- "message": "Required request parameter 'token' for method parameter type String is not present"
}
env required | string Example: env,dev The target’s environment (e.g. dev). |
site_name required | string Example: site_name,editorial The target’s project/site name (e.g. editorial). |
token required | string Example: token=defaultManagementToken The authorization token |
{- "message": "OK"
}
env required | string Example: dev The target’s environment (e.g. dev). |
source_site_name required | string Example: editorial The source project/site name (e.g. editorial). |
Duplicate target's request body
env required | string The target’s environment (e.g. dev). |
site_name required | string The target’s project/site name (e.g. my-editorial). |
replace | boolean Replace the existing target. |
template_name | string The template to use for configuration generation. Out-of-the-box remote and local are provided. If not specified, remote will be used. |
disable_deploy_cron | boolean Disables the cron job that runs deployments every certain amount of time. |
repo_url required | string Depends on the template. If remote is being used, it specifies the URL of the remote repo to pull from (e.g. ssh://…). If instead the template is local, repo_url is the filesystem path of the local repo (e.g. /opt/..). |
repo_branch | string Only use with remote template. The branch name of the remote Git repo to pull from. If not specified, the branch will be whatever branch is the current one in the remote repo. |
repo_username | string Only use with remote template. The username of the remote Git repo. |
repo_password | string Only use with remote template. The username of the remote Git repo. |
ssh_private_key_path | string Only use with remote template. The path for the private key used for the remote Git repo. |
ssh_private_key_passphrase | string Only use with remote template. The passphrase for the private key for the remote Git repo (only if the key is passphrase-protected). |
engine_url | string Base URL of Engine, used to make API calls like clear cache and rebuild context. If not specified, the default is http://localhost:8080. |
notification_addresses | string The email addresses that should receive deployment notifications. |
object |
{- "env": "string",
- "site_name": "string",
- "replace": true,
- "template_name": "string",
- "disable_deploy_cron": true,
- "repo_url": "string",
- "repo_branch": "string",
- "repo_username": "string",
- "repo_password": "string",
- "ssh_private_key_path": "string",
- "ssh_private_key_passphrase": "string",
- "engine_url": "string",
- "notification_addresses": "string",
- "source": {
- "env": "string",
- "site_name": "string",
- "replace": true,
- "template_name": "string",
- "disable_deploy_cron": true,
- "repo_url": "string",
- "repo_branch": "string",
- "repo_username": "string",
- "repo_password": "string",
- "ssh_private_key_path": "string",
- "ssh_private_key_passphrase": "string",
- "engine_url": "string",
- "notification_addresses": "string"
}
}
{- "message": "OK"
}
token required | string Example: token=defaultManagementToken The authorization token |
{- "VersionInfo": {
- "packageName": "Crafter Deployer",
- "packageVersion": "4.1.0-SNAPSHOT",
- "packageBuild": "f33f1804c95dd0df4902c9732203841d22022459",
- "packageBuildDate": "2023-04-17T21:28:40.642Z",
- "osName": "Mac OS X",
- "osVersion": "13.2.1",
- "osArch": "x86_64",
- "javaVersion": 17,
- "javaVendor": "Oracle Corporation",
- "javaVm": "OpenJDK 64-Bit Server VM"
}
}
token required | string Example: token=defaultManagementToken The authorization token |
{- "MemoryInfo": {
- "totalJvmMemory": 154140672,
- "freeJvmMemory": 102165520,
- "maxJvmMemory": 1073741824,
- "totalOsMemory": 34359738368,
- "freeOsMemory": 59957248,
- "totalSwapMemory": 8589934592,
- "freeSwapMemory": 1076363264
}
}