Skip to main content
Version: ACE 5

Deployment API

ace-deployment-server service exposes API endpoints which are mostly used by ACE CLI commands. This page describes stable API endpoints that can be used by external tools.

API endpoints

Deploy git workspace

This API is used to deploy workspace from git repository to production environment.

POST http://{ace-deployment-server}/deploy/workspace/git

Query parameters

  • merge (pass as true) - used to merge existing workspace with a new one
  • packageName optional - used to define name of the package. Can also be used in combination with merge command to merge with corresponding existing package.

Body

  • repository - repository url
  • token - git token
  • branch - git branch name
  • commit optional - git commit
  • username optional - git username
  • repositoryWorkspacePath (default: src/ace) - path to workspace.
  • deploymentSecrets optional - resolution for dependency secrets specified in package.yaml with ${{key}} format.

Deploy workspace from zip file

This API is used to deploy workspace from zip file to production environment.

POST http://{ace-deployment-server}/deploy/workspace/zip

Query parameters

  • merge (pass as true) - used to merge existing workspace with a new one
  • packageName optional - used to define name of the package. Can also be used in combination with merge command to merge with corresponding existing package.

Body

Need to specify header Content-Type: application/zip

Body must contain binary zip file content.

List deployed packages

This API is used to list all packages in the production environment.

GET http://{ace-deployment-server}/workspaces

Delete deployed package

This API is used to delete package in the production environment by packageName.

DELETE http://{ace-deployment-server}/workspace

Query parameters

  • packageName optional - name of the package to delete.

Download deployed package

This API is used to download package in the production environment by packageName.

GET http://{ace-deployment-server}/workspace/download

Query parameters

  • packageName optional - name of the package to download.

Deploy schedules from git repository

This API is used to deploy schedules from git repository to production environment.

POST http://{ace-deployment-server}/deploy/schedules/git

Body

  • repository - repository url
  • token - git token
  • branch - git branch name
  • commit optional - git commit
  • username optional - git username
  • repositoryWorkspacePath (default: src/ace) - path to workspace.
  • deploymentSecrets optional - resolution for dependency secrets specified in package.yaml with ${{key}} format.

Deploy schedules from zip

This API is used to deploy schedules from zip file to production environment.

POST http://{ace-deployment-server}/deploy/schedules/zip

Body

Need to specify header Content-Type: application/zip

Body must contain binary zip file content.

Clean up development workspaces

This API is used to delete development workspaces in MongoDB based on workspaces age. By default, workspaces that are older than 24 hours are deleted.

DELETE http://{ace-deployment-server}/clear/workspace/dev?workspaceAge={workspaceAge}

Parameters

  • workspaceAge (default: 24) - A optional numeric value that represents hours. Workspaces that are older than the provided value are deleted.

Clear (redis) cache

This API is used to clear cached values in redis database based on prefix.

DELETE http://{ace-deployment-server}/clear/redis/cache

Parameters

Parameters used by this API are set up as environment variables

  • REDIS_CACHE_URL - redis connection string, should start with redis:// or rediss://
  • REDIS_CACHE_KEY - redis password
  • REDIS_KEY_PREFIX (default: ace-cache) - prefix to be used by installed jobs
  • REDIS_CACHE_DB - redis db
  • REDIS_CACHE_HOST - redis host
  • REDIS_CACHE_PORT - redis port
  • REDIS_CACHE_USER - redis username
  • REDIS_CACHE_TLS_ENABLED - redis tls enabled flag
  • REDIS_CACHE_TLS_KEY - redis tls key
  • REDIS_CACHE_TLS_CERT - redis tls cert
  • REDIS_CACHE_TLS_CA - redis tls ca

Export workspace

This API packages a workspace and all it's dependencies into a conveniently structured zip file for deployment or importing into ACE UI. Since this API resolves dependencies, it is necessary to supply required secrets in deploymentSecrets field.

POST http://{ace-deployment-server}/export/workspace

Body

  • repository - repository url
  • token - git token
  • branch - git branch name
  • commit optional - git commit
  • username optional - git username
  • repositoryWorkspacePath (default: src/ace) - path to workspace.
  • deploymentSecrets optional - resolution for dependency secrets specified in package.yaml with ${{key}} format.

Returns

Returns a zip file containing the bundled workspace.

Supplying secrets

If using dependencies or other features that require secret resolution during deployment, you may pass them via body property deploymentSecrets as a plain object with key-value mappings.

An example package.yaml definition with a respective deploymentSecrets mapping:

package.yaml
wsVersion:2
dependencies:
- name: common
kind: git
gitUrl: http://github.com/repo
gitToken: ${{ myGitToken }}
# ^--- Deployment secret key
wsPath: /src/ace
Deployment API request JSON body
{
"deploymentSecrets": {
"myGitToken": "secret"
},
// ... other properties
}