Crafter Deployer (4.1.9)

Download OpenAPI specification:Download

E-mail: info@craftercms.org License: GPL 3.0

Crafter Deployer API

target

Target management operations

Create a Crafter Deployer target

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.

Request Body schema: application/json

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.

Responses

Request samples

Content type
application/json
Example
{
  • "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",
  • "engine_url": "http://localhost:8080"
}

Response samples

Content type
application/json
{
  • "message": "OK"
}

Get a Crafter Deployer target.

path Parameters
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).

Responses

Response samples

Content type
application/json
{
  • "env": "dev",
  • "siteName": "editorial",
  • "id": "editorial-dev",
  • "load_date": "2023-01-26T10:00:1.234-05:00",
  • "status": "INIT_COMPLETED"
}

Get a Crafter Deployer target.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Delete a Crafter Deployer target.

path Parameters
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).

Responses

Response samples

Content type
application/json
{
  • "message": "Target not found"
}

Deploy a Crafter Deployer target.

path Parameters
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).

Request Body schema: application/json
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

Available since version 4.0.0

deployment_mode
string

The deployment mode to execute. Possible values:
nbsp;  PUBLISH: All processors will run
   SEARCH_INDEX: Only the indexing processor will run

Available since version 4.0.0

Responses

Request samples

Content type
application/json
{
  • "reprocess_all_files": true,
  • "from_commit_id": "string",
  • "deployment_mode": "string"
}

Response samples

Content type
application/json
{
  • "message": "OK"
}

Deploy all Crafter Deployer targets.

Request Body schema: application/json
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:
   PUBLISH: All processors will run
   SEARCH_INDEX: Only the indexing processor will run

Available since version 4.0.0

Responses

Request samples

Content type
application/json
{
  • "reprocess_all_files": true,
  • "deployment_mode": "string"
}

Response samples

Content type
application/json
{
  • "message": "OK"
}

Clear git lock of a Crafter Deployer target.

path Parameters
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).

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token

Responses

Response samples

Content type
application/json
{
  • "message": "Required request parameter 'token' for method parameter type String is not present"
}

Recreate the underlying search index for a Crafter Deployer target.

path Parameters
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).

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token

Responses

Response samples

Content type
application/json
{
  • "message": "OK"
}

Duplicate a target

path Parameters
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).

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "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": {
    }
}

Response samples

Content type
application/json
{
  • "message": "OK"
}

monitoring

Monitoring operations

Get a Crafter Deployer's version details.

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token

Responses

Response samples

Content type
application/json
{
  • "VersionInfo": {
    }
}

Get a Crafter Deployer's status details.

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token

Responses

Response samples

Content type
application/json
{
  • "StatusInfo": {
    }
}

Get a Crafter Deployer's memory details.

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token

Responses

Response samples

Content type
application/json
{
  • "MemoryInfo": {
    }
}