peak
Create and Manage Peak Resources
Usage:
$ peak [OPTIONS] COMMAND [ARGS]...
Options:
--version
--install-completion
: Install completion for the current shell.--show-completion
: Show completion for the current shell, to copy it or customize the installation.--help
: Show this message and exit.
Commands:
apps
: Create and manage App specs and deployments.artifacts
: Create and manage Artifacts.blocks
: Create and manage Block specs and deployments.deployments
: Manage both Block and App deployments.images
: Create and manage Images.services
: Create and Manage Services.specs
: Manage both Block and App specs.tenants
: Create and manage Tenant Settings.users
: Manage User Permissions.webapps
: Create and Manage Webapps.workflows
: Create and manage Workflows.
peak apps
Create and manage App specs and deployments.
Usage:
$ peak apps [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
deployments
: Create and manage App Deployments.specs
: Create and manage App Specs.
peak apps deployments
Create and manage App deployments which are the actual instance of the App.
Usage:
$ peak apps deployments [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create an App deployment.create-revision
: Create an App deployment revision.delete
: Delete an App deployment.describe
: Describe an App deployment.describe-revision
: Describe an App deployment revision.list
: List App deployments.list-revisions
: List revisions of an App deployment.update-metadata
: Update the App deployment metadata.
peak apps deployments create
Create an App deployment. This creates all the resources (Example - Workflow, Webapps, etc) described in the App Spec.
🧩 Input file schema (yaml):
body (map):
metadata (map):
name (string | required: false): Name of the deployment. Must be unique within the tenant.
title (string | required: false): Title of the deployment.
summary (string | required: false): Summary of the deployment.
description (string | required: false): Description of the deployment.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the app deployment.
tags (list(map) | required: false):
- name (string): Name of the tag.
parameters (map | required: false):
<blockName> (map): Dictionary of parameters for the block. Here the key is the name of the block.
<parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
<parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
revision (map | required: false):
notes (string | required: false): Notes for the deployment revision.
spec (map):
id (string): ID of the app spec to be deployed.
release (map | required: false):
version (string): A valid semantic release version of the app spec.
📝 Example usage:
peak apps deployments create /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
}
Usage:
$ peak apps deployments create create_app_deployment FILE
Arguments:
FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak apps deployments create-revision
Create an App deployment revision. This updates the deployment with the specified spec release.
🧩 Input file schema (yaml):
body (map):
parameters (map | required: false):
<blockName> (map): Dictionary of blocks within the app, for which to provide parameters. Must be a valid block name.
<parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
<parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
release (map):
version (string): A valid semantic release version of the app spec.
revision (map | required: false):
notes (string | required: false): Notes for the deployment revision.
📝 Example usage:
peak apps deployments create-revision /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"revision": 2
}
Usage:
$ peak apps deployments create-revision create_app_deployment_revision DEPLOYMENT_ID FILE
Arguments:
DEPLOYMENT_ID
: ID of the App deployment to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak apps deployments delete
Delete an App deployment. This deletes all the resources that were created as a part of the deployment.
📝 Example usage:
peak apps deployments delete "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{}
Usage:
$ peak apps deployments delete delete_app_deployment DEPLOYMENT_ID
Arguments:
DEPLOYMENT_ID
: ID of the App deployment to be used in this operation. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps deployments describe
Describe an App deployment with details of its latest revision.
📝 Example usage:
peak apps deployments describe "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"kind": "app",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
}
Usage:
$ peak apps deployments describe describe_app_deployment DEPLOYMENT_ID
Arguments:
DEPLOYMENT_ID
: ID of the App deployment to be used in this operation. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps deployments describe-revision
Describe an App deployment revision.
Note: Parameters listed in the response are masked if “hideValue” was set to true when creating the associated block spec releases.
📝 Example usage:
peak apps deployments describe-revision --deployment-id "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --revision 2
🆗 Response:
{
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "jane.smith@peak.ai",
"id": "7092bd84-c35d-43c1-90ca-7510a1204dcc",
"latestRevision": {...},
"notes": "This is a new revision"
"resources": [...],
"revision": 2,
"status": "deploying",
"spec": {...}
"parameters": {...}
}
Usage:
$ peak apps deployments describe-revision describe_app_deployment_revision
Options:
--deployment-id TEXT
: ID of the deployment to be used in this operation. [required]--revision TEXT
: Revision number of the Block deployment revision to be used in this operation [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps deployments list
List all the App deployments that have been created for the tenant.
📝 Example usage:
peak apps deployments list --sort createdBy:asc,name --page-size 10 --page-number 1
🆗 Response:
{
"deploymentCount": 1,
"deployments": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10
}
Usage:
$ peak apps deployments list list_app_deployments
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A comma-separated list of statuses to filter deployments. Valid values aredeploying
,deployed
,deleting
,delete_failed
,failed
,platform_resource_error
,redeploying
,rollback
,rollback_complete
,rollback_failed
, andwarning
.--name TEXT
: Only return entities whose names begins with the query string.--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps deployments list-revisions
List all revisions for a given App deployment.
📝 Example usage:
peak apps deployments list-revisions "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --sort createdBy:asc,createdAt --status deployed,deploying --page-size 10 --page-number 1
🆗 Response:
{
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10,
"revisionCount": 1,
"revisions": [...]
}
Usage:
$ peak apps deployments list-revisions list_app_deployment_revisions DEPLOYMENT_ID
Arguments:
DEPLOYMENT_ID
: ID of the App deployment to be used in this operation. [required]
Options:
--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--status TEXT
: A comma-separated list of statuses to filter deployments. Valid values aredeleting
,delete_failed
,deployed
,deploying
,failed
,platform_resource_error
,rollback
,rollback_complete
,rollback_failed
andsuperseded
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps deployments update-metadata
Update the App deployment metadata.
🧩 Input file schema (yaml):
body (map):
name (string | required: false): Name of the deployment. Must be unique within the tenant.
title (string | required: false): Title of the deployment.
summary (string | required: false): Summary of the deployment.
description (string | required: false): Description of the deployment.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the app deployment.
tags (list(map) | required: false):
- name (string): Name of the tag.
📝 Example usage:
peak apps deployments update-metadata "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "app",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
}
Usage:
$ peak apps deployments update-metadata update_app_deployment_metadata DEPLOYMENT_ID FILE
Arguments:
DEPLOYMENT_ID
: ID of the App deployment to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak apps specs
Create and manage App specs which are blueprint for Peak Apps.
Usage:
$ peak apps specs [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create an App spec.create-release
: Create a new release of the App spec.delete
: Delete an App spec.describe
: Describe an App spec.describe-release
: Describe an App spec release.list
: List App specs.list-releases
: List App specs releases.update-metadata
: Update the App spec metadata.
peak apps specs create
Create an App spec. A Spec is just a blueprint for an App and defines all the resources that need to be created for the App. This creates a version of the spec also known as Release.
🧩 Input file schema (yaml):
featured (bool | required: false): Boolean specifying whether to feature this spec.
scope (str | required: false): Specify what tenants can discover and deploy this spec.
tenants (list(str) | required: false): Given a shared scope, specify what other tenants can discover and deploy this spec.
body (map):
version (int): Version of the spec.
kind (string): Specifies the type of spec. Should be "app" in case of app spec.
metadata (map):
name (string): Name of the spec. Must be unique within the tenant.
title (string | required: false): Title of the spec.
summary (string): Summary of the spec.
description (string | required: false): Description of the spec.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the app spec.
tags (list(map) | required: false):
- name (string): Name of the tag.
release (map):
version (string): A valid semantic release version of the spec.
notes (string | required: false): Notes for the release version.
config (list(map)):
- id (string): ID of the block spec.
release (map):
version (string): A valid semantic release version of the block spec.
📝 Example usage:
peak apps specs create /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
}
Usage:
$ peak apps specs create create_app_spec FILE
Arguments:
FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak apps specs create-release
Create a new release of the App spec.
🧩 Input file schema (yaml):
body (map):
release (map):
version (string): A valid semantic release version of the spec. Must be greater than previous release version.
notes (string | required: false): Notes for the release version.
config (list(map)):
- id (string): ID of the block spec.
release (map):
version (string): A valid semantic release version of the block spec.
📝 Example usage:
peak apps specs create-release "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"release": {
"version": "2.0.0"
}
}
Usage:
$ peak apps specs create-release create_app_spec_release SPEC_ID FILE
Arguments:
SPEC_ID
: ID of the App spec to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak apps specs delete
Delete an App spec.
📝 Example usage:
peak apps specs delete "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{}
Usage:
$ peak apps specs delete delete_app_spec SPEC_ID
Arguments:
SPEC_ID
: ID of the App spec to be used in this operation. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps specs describe
Describe an App spec with details of its latest release.
📝 Example usage:
peak apps specs describe "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{
"featured": true,
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "app",
"latestRelease": {...},
"metadata": {...},
"scope": "private"
}
Usage:
$ peak apps specs describe describe_app_spec SPEC_ID
Arguments:
SPEC_ID
: ID of the App spec to be used in this operation. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps specs describe-release
Describe an App spec release.
📝 Example usage:
peak apps specs describe-release --spec-id "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --version 1.0.0
🆗 Response:
{
"config": [
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"release": {
"version": "1.0.0"
}
}
],
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "jane.smith@peak.ai",
"id": "6a6b9e08-638e-4116-a29d-077086135062",
"notes": "Updated workflows with new algorithms."
}
Usage:
$ peak apps specs describe-release describe_app_spec_release
Options:
--spec-id TEXT
: ID of the spec to be used in this operation. [required]--version TEXT
: Release version to be used in this operation. [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps specs list
List all App specs that have been created for the tenant along with the public-scoped ones.
📝 Example usage:
peak apps specs list --sort name:asc,title --page-size 10 --page-number 1
🆗 Response:
{
"specCount": 1,
"specs": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10
}
Usage:
$ peak apps specs list list_app_specs
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A comma-separated list of statuses to filter specs. Valid values areavailable
,unavailable
andarchived
.--name TEXT
: Only return entities whose names begins with the query string.--title TEXT
: Only return entities whose title begins with the query string.--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--scope TEXT
: A comma-separated list of scopes to only return entities of those scopes.--featured
: Whether to only return featured entities.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps specs list-releases
List all the releases for a specific App Spec.
📝 Example usage:
peak apps specs list-releases --spec-id "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --sort createdAt:asc --page-size 10 --page-number 1
🆗 Response:
{
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10,
"releaseCount": 1,
"releases": [...]
}
Usage:
$ peak apps specs list-releases list_app_spec_releases
Options:
--spec-id TEXT
: ID of the spec to be used in this operation. [required]--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak apps specs update-metadata
Update the App spec metadata.
🧩 Input file schema (yaml):
body (map):
featured (bool | required: false): Boolean specifying whether to feature this spec.
scope (str | required: false): Specify what tenants can discover and deploy this spec.
tenants (list(str) | required: false): Given a shared scope, specify what other tenants can discover and deploy this spec.
metadata (map):
name (string | required: false): Name of the spec. Must be unique within the tenant.
title (string | required: false): Title of the spec.
summary (string | required: false): Summary of the spec.
description (string | required: false): Description of the spec.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the app spec.
status (string | required: false): Status of the app spec.
tags (list(map) | required: false):
- name (string): Name of the tag.
📝 Example usage:
peak apps specs update-metadata "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"featured": false,
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "app",
"latestRelease": {...},
"metadata": {...},
"scope": "private"
}
Usage:
$ peak apps specs update-metadata update_app_spec_metadata SPEC_ID FILE
Arguments:
SPEC_ID
: ID of the App spec to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak artifacts
Manage artifacts used to create resources like images.
Usage:
$ peak artifacts [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create a new artifact.create-version
: Create a new version of the artifact.delete
: Delete an artifact.delete-version
: Delete a version of an artifact.describe
: Describe an artifact.download
: Download an artifact.list
: List artifacts.update-metadata
: Update an artifact’s metadata.
peak artifacts create
Create a new artifact. This also creates the first version inside the artifact.
🧩 Input File Schema(yaml):
name (str): Name of the artifact.
description (str): Description of the artifact.
artifact (map):
path (str): Path to the artifact.
ignore_files (list(str) | required: false): Ignore files to use when creating artifact.
📝 Example Usage:
peak artifacts create '/path/to/body.yaml' --params-file '/path/to/params.yaml'
🆗 Response:
{
"id": "c7575459-e265-4944-a539-1fbb3336799e",
"version": 1
}
Usage:
$ peak artifacts create create_artifact FILE
Arguments:
FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak artifacts create-version
Create a new version of the artifact.
🧩 Input file schema(yaml):
artifact (map):
path (str): Path to the artifact.
ignore_files (list(str) | required: false): Ignore files to use when creating artifact.
📝 Example usage:
peak artifacts create-version "c7575459-e265-4944-a539-1fbb3336799e" '/path/to/body.yaml' --params-file '/path/to/params.yaml'
🆗 Response:
{
"version": 2
}
Usage:
$ peak artifacts create-version create_artifact_version ARTIFACT_ID FILE
Arguments:
ARTIFACT_ID
: ID of the artifact to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak artifacts delete
Delete an artifact along with all of its versions.
📝 Example usage:
peak artifacts delete "c7575459-e265-4944-a539-1fbb3336799e"
🆗 Response:
{}
Usage:
$ peak artifacts delete delete_artifact ARTIFACT_ID
Arguments:
ARTIFACT_ID
: ID of the artifact to be used in this operation. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak artifacts delete-version
Delete a version of an artifact.
📝 Example usage:
peak artifacts delete-version "c7575459-e265-4944-a539-1fbb3336799e" 1
🆗 Response:
{}
Usage:
$ peak artifacts delete-version delete_artifact_version ARTIFACT_ID VERSION
Arguments:
ARTIFACT_ID
: ID of the artifact to be used in this operation. [required]VERSION
: Artifact version number to delete. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak artifacts describe
Describe an artifact with list of its versions.
📝 Example usage:
peak artifacts describe "c7575459-e265-4944-a539-1fbb3336799e" --page-size 10 --page-number 1
🆗 Response:
{
"description": "description of this artifact",
"id": "c7575459-e265-4944-a539-1fbb3336799e",
"name": "my-artifact",
"pageCount": 1,
"pageNumber": 1,
"pageSize": 1,
"versionCount": 1,
"versions": [...]
}
Usage:
$ peak artifacts describe describe_artifact ARTIFACT_ID
Arguments:
ARTIFACT_ID
: ID of the artifact to be used in this operation. [required]
Options:
--page-number INTEGER
: The page number to retrieve.--page-size INTEGER
: Number of entities to include per page.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak artifacts download
Download a specific version for an artifact and save it with the given filename on the local system.
📝 Example usage:
peak artifacts download "c7575459-e265-4944-a539-1fbb3336799e" '/path/to/download' --version 1
🆗 Response:
None
Usage:
$ peak artifacts download download_artifact ARTIFACT_ID DOWNLOAD_PATH
Arguments:
ARTIFACT_ID
: ID of the artifact to be used in this operation. [required]DOWNLOAD_PATH
: Path (including filename) where the downloaded file will be stored. [required]
Options:
--version INTEGER
: Artifact version to download. If no version is given then latest version is downloaded.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.--help
: Show this message and exit.
peak artifacts list
List all artifacts for the given tenant.
📝 Example Usage:
peak artifacts list --page-size 10 --page-number 1
🆗 Response:
{
"artifactCount": 1,
"artifacts": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
Usage:
$ peak artifacts list list_artifacts
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak artifacts update-metadata
Update an artifact’s metadata.
🧩 Input file schema(yaml):
body (map): Artifact metadata.
📝 Example usage:
peak artifacts update-metadata '/path/to/body.yaml' --params-file '/path/to/params.yaml'
🆗 Response:
{}
Usage:
$ peak artifacts update-metadata update_artifact_metadata ARTIFACT_ID FILE
Arguments:
ARTIFACT_ID
: ID of the artifact to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks
Create and manage Block specs and deployments.
Usage:
$ peak blocks [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
deployments
: Create and manage Block Deployments.specs
: Create and manage Block Specs.
peak blocks deployments
Create and manage Block deployments which deploys the Peak resources based on the created specs.
Usage:
$ peak blocks deployments [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create a Block deployment.create-revision
: Create a Block deployment revision.delete
: Delete a Block deployment.describe
: Describe the Block deployment.describe-revision
: Describe a Block deployment revision.get-parameters
: Get the parameters for a deployment at run time.get-related-block-details
: Get the info for related blocks within an app.list
: List Block deployments.list-revisions
: List revisions of a Block deployment.patch-parameters
: Update the parameters for a deployment at run time.update-metadata
: Update the Block deployment metadata.
peak blocks deployments create
Create a Block deployment This creates the resource described in the Block Spec.
🧩 Input file schema (yaml):
body (map):
metadata (map):
name (string | required: false): Name of the deployment. Must be unique within the tenant.
title (string | required: false): Title of the deployment.
summary (string | required: false): Summary of the deployment.
description (string | required: false): Description of the deployment.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the block deployment.
tags (list(map) | required: false):
- name (string): Name of the tag.
parameters (map | required: false):
<parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
<parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
revision (map | required: false):
notes (string | required: false): Notes for the deployment revision.
spec (map):
id (string): ID of the block spec to be deployed.
release (map | required: false):
version (string): A valid semantic release version of the block spec.
📝 Example usage:
peak blocks deployments create /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
}
Usage:
$ peak blocks deployments create create_block_deployment FILE
Arguments:
FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks deployments create-revision
Create a Block deployment revision. This updates the deployment with the specified spec release.
🧩 Input file schema (yaml):
body (map):
parameters (map | required: false):
<parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
<parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
release (map):
version (string): A valid semantic release version of the block spec.
revision (map | required: false):
notes (string | required: false): Notes for the deployment revision.
📝 Example usage:
peak blocks deployments create-revision /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"revision": 2
}
Usage:
$ peak blocks deployments create-revision create_block_deployment_revision DEPLOYMENT_ID FILE
Arguments:
DEPLOYMENT_ID
: ID of the Block deployment to be used in this operation [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks deployments delete
Delete a Block deployment. This will delete the resource that was created as part of the deployment.
📝 Example usage:
peak blocks deployments delete "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{}
Usage:
$ peak blocks deployments delete delete_block_deployment DEPLOYMENT_ID
Arguments:
DEPLOYMENT_ID
: ID of the Block deployment to be used in this operation [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks deployments describe
Describe the Block deployment with details of its latest revision.
Note: Parameters listed in the response are masked if “hideValue” was set to true when creating the block spec.
📝 Example usage:
peak blocks deployments describe "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"kind": "app",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
"parameters": {...}
}
Usage:
$ peak blocks deployments describe descibe_block_deployment DEPLOYMENT_ID
Arguments:
DEPLOYMENT_ID
: ID of the Block deployment to be used in this operation [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks deployments describe-revision
Describe a Block deployment revision.
Note: Parameters listed in the response are masked if “hideValue” was set to true when creating the block spec release.
📝 Example usage:
peak blocks deployments describe-revision --deployment-id "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --revision 2
🆗 Response:
{
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "jane.smith@peak.ai",
"id": "7092bd84-c35d-43c1-90ca-7510a1204dcc",
"latestRevision": {...},
"notes": "This is a new revision"
"resources": [...],
"revision": 2,
"status": "deploying",
"spec": {...}
"parameters": {...}
}
Usage:
$ peak blocks deployments describe-revision describe_block_deployment_revision
Options:
--deployment-id TEXT
: ID of the deployment to be used in this operation. [required]--revision TEXT
: Revision number of the Block deployment revision to be used in this operation [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks deployments get-parameters
Get all the parameters for a deployment at run time.
📝 Example usage:
peak blocks deployments get-parameters --deployment-id=<deployment-id> --fallback-params-file=<path/to/fallback/params/file>
🆗 Response:
{...}
Usage:
$ peak blocks deployments get-parameters get_block_parameters
Options:
--deployment-id TEXT
: ID of the Block deployment to be used in this operation--fallback-params-file TEXT
: File containing parameters to be used when deployment id is not present--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks deployments list
List Block deployments that have been created for the given tenant.
📝 Example usage:
peak blocks deployments list --status=deployed,failed --page-size 10 --page-number 1
🆗 Response:
{
"deploymentsCount": 1,
"deployments": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
Usage:
$ peak blocks deployments list list_block_deployments
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A comma-separated list of statuses to filter deployments. Valid values aredeploying
,deployed
,deleting
,delete_failed
,failed
,platform_resource_error
,redeploying
,rollback
,rollback_complete
,rollback_failed
, andwarning
.--name TEXT
: Only return entities whose names begins with the query string.--title TEXT
: Only return entities whose title begins with the query string.--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks deployments list-revisions
List all revisions for a given Block deployment.
📝 Example usage:
peak blocks deployments list-revisions "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --sort createdBy:asc,createdAt --status deployed,deploying --page-size 10 --page-number 1
🆗 Response:
{
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10,
"revisionCount": 1,
"revisions": [...]
}
Usage:
$ peak blocks deployments list-revisions list_block_deployment_revisions DEPLOYMENT_ID
Arguments:
DEPLOYMENT_ID
: ID of the Block deployment to be used in this operation [required]
Options:
--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--status TEXT
: A comma-separated list of statuses to filter deployments. Valid values aredeleting
,delete_failed
,deployed
,deploying
,failed
,platform_resource_error
,rollback
,rollback_complete
,rollback_failed
andsuperseded
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks deployments patch-parameters
Update the parameters for a deployment at run time.
🧩 Input file schema (yaml):
body (map):
<key> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
📝 Example usage:
peak blocks deployments patch-parameters -v /path/to/params.yaml < deployment-id > /path/to/body.yaml
🆗 Response:
{...}
Usage:
$ peak blocks deployments patch-parameters patch_block_parameters DEPLOYMENT_ID FILE
Arguments:
DEPLOYMENT_ID
: ID of the Block deployment to be used in this operation [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks deployments update-metadata
Update the Block deployment metadata.
🧩 Input file schema (yaml):
body (map):
name (string | required: false): Name of the deployment. Must be unique within the tenant.
title (string | required: false): Title of the deployment.
summary (string | required: false): Summary of the deployment.
description (string | required: false): Description of the deployment.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the block deployment.
tags (list(map) | required: false):
- name (string): Name of the tag.
📝 Example usage:
peak blocks deployments update-metadata "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "workflow",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
}
Usage:
$ peak blocks deployments update-metadata update_block_deployment_metadata DEPLOYMENT_ID FILE
Arguments:
DEPLOYMENT_ID
: ID of the Block deployment to be used in this operation [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks specs
Create and manage Block specs which are blueprint for Peak resources.
Usage:
$ peak blocks specs [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create a Block spec.create-release
: Create a new release for a Block spec.delete
: Delete a Block spec.describe
: Describe a Block spec.describe-release
: Describe a Block spec release.list
: List Block specs.list-releases
: List releases of a Block spec.update-metadata
: Update the Block spec metadata.
peak blocks specs create
Create a Block spec. A Block spec is just a blueprint for a specific resource. This creates a version of the spec also know as a Release.
🧩 Input file schema (yaml):
featured (bool | required: false): Boolean specifying whether to feature this spec.
scope (str | required: false): Specify what tenants can discover and deploy this spec.
tenants (list(str) | required: false): Given a shared scope, specify what other tenants can discover and deploy this spec.
body (map):
version (int): Version of the spec.
kind (string): Specifies the type of spec.
metadata (map):
name (string): Name of the spec. Must be unique within the tenant.
title (string | required: false): Title of the spec.
summary (string): Summary of the spec.
description (string | required: false): Description of the spec.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the app spec.
tags (list(map) | required: false):
- name (string): Name of the tag.
release (map):
version (string): A valid semantic release version of the spec.
notes (string | required: false): Notes for the release version.
config (map):
images(map | required: false): # To be used only in case of workflow block.
image-name (map): Dictionary containing the image configuration. Here the key is name of the image.
version (string | required: false): A valid semantic image version.
dockerfile (string | required: false): Path to the Dockerfile inside artifact.
context (string | required: false): The path within the artifact where the code to be executed by the Dockerfile is located.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (map | required: false): Dictionary containing build args. Here the key is the name of the arg and value is the value of the arg.
secrets (list(str)) | required: false): List of secret names to be passed.
steps (map | required: false): # To be used only in case of workflow block.
<stepName> (map): Dictionary containing the step configuration. Here the key is name of the step.
image: (map | required: false):
version (string | required: false): A valid semantic image version.
dockerfile (string | required: false): Path to the Dockerfile inside artifact.
context (string | required: false): The path within the artifact where the code to be executed by the Dockerfile is located.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (map | required: false): Dictionary containing build args. Here the key is the name of the arg and value is the value of the arg.
secrets (list(str)) | required: false): List of secret names to be passed.
imageDetails (map | required: false):
id (int): ID of the existing image.
versionId: (int): ID of the existing image version.
imageRef (string | required: false): Name of the image defined above.
type (string | required: false): Type of workflow step. Currently only standard type is supported.
command (string): Command to run when step is executed.
clearImageCache (boolean | required: false): Whether to clear image cache on workflow execution.
stepTimeout (int | required: false): Time after which the step timeouts.
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
parents (list(str) | required: false): List containing names of steps on which this step is dependent on.
repository (map | required: false):
branch (string): Branch of the repository containing the required files.
token (string | required: false): The token to be used to clone the repository.
url (string): URL of the repository.
resources (map | required: false):
instanceTypeId (int): ID of the instance type to be used in the step.
storage (string): Storage in GB. For example, "10GB".
triggers (list(map)):
- cron (string | required: false): A valid cron expression.
webhook (boolean | required: false): Should be true if webhook type trigger is to be used.
webhookId (string | required: false): ID of the webhook.
watchers (list(map) | required: false):
- events (map):
success (boolean | required: false): Whether to call event on success.
fail (boolean | required: false): Whether to call event on failure.
runtimeExceeded (int | required: false): The runtime after which event is called.
user (string | required: false): User to be notified. To be added in case of user watcher.
webhook (map | required: false): To be added in case of webhook watcher.
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
image (map | required: false): # To be used only in case of webapp block.
version (string | required: false): A valid semantic image version.
dockerfile (string | required: false): Path to the Dockerfile inside artifact.
context (string | required: false): The path within the artifact where the code to be executed by the Dockerfile is located.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (map | required: false): Dictionary containing build args. Here the key is the name of the arg and value is the value of the arg.
secrets (list(str)) | required: false): List of secret names to be passed.
imageDetails (map | required: false): # To be used only in case of webapp block.
id (int): ID of the existing image.
versionId: (int): ID of the existing image version.
resources (map | required: false): To be used only in case of webapp block.
instanceTypeId (int): ID of the instance type to be used in the webapp.
sessionStickiness (boolean | required: false): Whether to enable session stickiness for the webapp. It is false by default. To be used only in case of webapp block.
parameters (map | required: false):
<parameterType> (list(map)): List containing the parameter objects. Here the key is the type of the parameter. Accepted values are "build" or "run".
name (string): Name of the parameter.
type (string): Type of the parameter. Should be one of "string", "number", "boolean" and "string_array".
required (boolean): Whether the parameter is required.
description (string | required: false): Description of the parameter.
defaultValue (string | required: false): Default value of the parameter.
title (string | required: false): Title of the parameter.
options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
hideValue(boolean | required: false): Can be optionally provided to parameters of type "string", to mask the parameter's value when it has been set at deployment time.
artifact (map | required: false):
path (str): Path to the artifact.
ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
📝 Example usage:
peak blocks specs create /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
}
Usage:
$ peak blocks specs create create_block_spec FILE
Arguments:
FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks specs create-release
Create a new release for a Block spec.
🧩 Input file schema (yaml):
body (map):
release (map):
version (string): A valid semantic release version of the spec. Must be greater than previous release version.
notes (string | required: false): Notes for the release version.
config (map):
images(map | required: false): # To be used only in case of workflow block.
image-name(map): Dictionary containing the image configuration. Here the key is name of the image.
version (string | required: false): A valid semantic image version.
dockerfile (string | required: false): Path to the Dockerfile inside artifact.
context (string | required: false): The path within the artifact where the code to be executed by the Dockerfile is located.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (map | required: false): Dictionary containing build args. Here the key is the name of the arg and value is the value of the arg.
secrets (list(str)) | required: false): List of secret names to be passed.
steps(map | required: false): # To be used only in case of workflow block.
<stepName> (map): Dictionary containing the step configuration. Here the key is name of the step.
image: (map | required: false):
version (string | required: false): A valid semantic image version.
dockerfile (string | required: false): Path to the Dockerfile inside artifact.
context (string | required: false): The path within the artifact where the code to be executed by the Dockerfile is located.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (map | required: false): Dictionary containing build args. Here the key is the name of the arg and value is the value of the arg.
secrets (list(str)) | required: false): List of secret names to be passed.
imageDetails (map | required: false):
id (int): ID of the existing image.
versionId: (int): ID of the existing image version.
imageRef (string | required: false): Name of the image defined above.
type (string | required: false): Type of workflow step. Currently only standard type is supported.
command (string): Command to run when step is executed.
clearImageCache (boolean | required: false): Whether to clear image cache on workflow execution.
stepTimeout (int | required: false): Time after which the step timeouts.
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
parents (list(str) | required: false): List containing names of steps on which this step is dependent on.
repository (map | required: false):
branch (string): Branch of the repository containing the required files.
token (string | required: false): The token to be used to clone the repository.
url (string): URL of the repository.
resources (map | required: false):
instanceTypeId (int): ID of the instance type to be used in the step.
storage (string): Storage in GB. For example, "10GB".
triggers (list(map)):
cron (string | required: false): A valid cron expression.
webhook (boolean | required: false): Should be true if webhook type trigger is to be used.
webhookId (string | required: false): ID of the webhook.
watchers (list(map) | required: false):
- events (map):
success (boolean | required: false): Whether to call event on success.
fail (boolean | required: false): Whether to call event on failure.
runtimeExceeded (int | required: false): The runtime after which event is called.
user (string | required: false): User to be notified. To be added in case of user watcher.
webhook (map | required: false): To be added in case of webhook watcher.
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
image (map | required: false): # To be used only in case of webapp block.
version (string | required: false): A valid semantic image version.
dockerfile (string | required: false): Path to the Dockerfile inside artifact.
context (string | required: false): The path within the artifact where the code to be executed by the Dockerfile is located.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (map | required: false): Dictionary containing build args. Here the key is the name of the arg and value is the value of the arg.
secrets (list(str)) | required: false): List of secret names to be passed.
imageDetails (map | required: false): # To be used only in case of webapp block.
id (int): ID of the existing image.
versionId: (int): ID of the existing image version.
resources (map | required: false): To be used only in case of webapp block.
instanceTypeId (int): ID of the instance type to be used in the webapp.
sessionStickiness (boolean | required: false): Whether to enable session stickiness for the webapp. It is false by default. To be used only in case of webapp block.
parameters (map | required: false):
<parameterType> (list(map)): List containing the parameter objects. Here the key is the type of the parameter. Accepted values are "build" or "run".
name (string): Name of the parameter.
type (string): Type of the parameter. Should be one of "string", "number", "boolean" and "string_array".
required (boolean): Whether the parameter is required.
description (string | required: false): Description of the parameter.
defaultValue (string | required: false): Default value of the parameter.
title (string | required: false): Title of the parameter.
options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
artifact (map | required: false):
path (str): Path to the artifact.
ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
📝 Example usage:
peak blocks specs create-release "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" '/path/to/body.yaml' -v '/path/to/params.yaml'
🆗 Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"release": {
"version": "2.0.0"
}
}
Usage:
$ peak blocks specs create-release create_block_spec_release SPEC_ID FILE
Arguments:
SPEC_ID
: ID of the Block spec to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks specs delete
Delete a Block spec.
📝 Example usage:
peak blocks specs delete "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{}
Usage:
$ peak blocks specs delete delete_block_spec SPEC_ID
Arguments:
SPEC_ID
: ID of the Block spec to be used in this operation. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks specs describe
Describe a Block spec with details of its latest release.
📝 Example usage:
peak blocks specs describe "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
🆗 Response:
{
"featured": true,
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "app",
"latestRelease": {...},
"metadata": {...},
"parameters": {...},
"scope": "private"
}
Usage:
$ peak blocks specs describe describe_block_spec SPEC_ID
Arguments:
SPEC_ID
: ID of the Block spec to be used in this operation. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks specs describe-release
Describe a Block spec release.
📝 Example usage:
peak blocks specs describe-release --spec-id "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --version 1.0.0
🆗 Response:
{
"artifact": {
"id": "721d738a-29f3-43b2-af52-c9055abe60b6",
"version": 1
},
"config": {
"images": {...},
"steps": {...},
"triggers": [
{...}
],
"watchers": [
{...}
]
},
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "someoneh@peak.ai",
"id": "df113d64-ff44-4aa0-9278-edb03dae7a3f",
"notes": "This is the original release",
"parameters": {...},
}
Usage:
$ peak blocks specs describe-release describe_block_spec_release
Options:
--spec-id TEXT
: ID of the spec to be used in this operation. [required]--version TEXT
: Release version to be used in this operation. [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks specs list
List all Block specs that exists in the tenant along with the public-scoped ones.
📝 Example usage:
peak blocks specs list --featured --scope shared,private --page-size 10 --page-number 1
🆗 Response:
{
"specsCount": 1,
"specs": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10
}
Usage:
$ peak blocks specs list list_block_specs
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A comma-separated list of statuses to filter specs. Valid values areavailable
,unavailable
andarchived
.--name TEXT
: Only return entities whose names begins with the query string.--title TEXT
: Only return entities whose title begins with the query string.--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--scope TEXT
: A comma-separated list of scopes to only return entities of those scopes.--featured
: Whether to only return featured entities.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks specs list-releases
List all releases for a given Block spec.
📝 Example usage:
peak blocks specs list-releases --spec-id "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --sort createdBy:asc,createdAt --page-size 10 --page-number 1
🆗 Response:
{
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10,
"releaseCount": 1,
"releases": [...]
}
Usage:
$ peak blocks specs list-releases list_block_spec_releases
Options:
--spec-id TEXT
: ID of the spec to be used in this operation. [required]--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak blocks specs update-metadata
Update the Block spec metadata.
🧩 Input file schema (yaml):
body (map):
featured (bool | required: false): Boolean specifying whether to feature this spec.
scope (str | required: false): Specify what tenants can discover and deploy this spec.
tenants (list(str) | required: false): Given a shared scope, specify what other tenants can discover and deploy this spec.
metadata (map):
name (string | required: false): Name of the spec. Must be unique within the tenant.
title (string | required: false): Title of the spec.
summary (string | required: false): Summary of the spec.
description (string | required: false): Description of the spec.
descriptionContentType (string | required: false): Content type of the description. Should be one of "text/plain" or "text/markdown".
imageUrl (string | required: false): URL of the image to be associated with the block spec.
status (string | required: false): Status of the block spec.
tags (list(map) | required: false):
- name (string): Name of the tag.
📝 Example usage:
peak blocks specs update-metadata "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" /path/to/body.yaml -v /path/to/params.yaml
🆗 Response:
{
"featured": false,
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "workflow",
"latestRelease": {...},
"metadata": {...},
"scope": "private"
}
Usage:
$ peak blocks specs update-metadata update_block_spec_metadata SPEC_ID FILE
Arguments:
SPEC_ID
: ID of the Block spec to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-d, --desc-file TEXT
: Path to the file that defines the description for this operation, supportsmd
, andtxt
files only.-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak deployments
Manage both Block and App deployments.
Usage:
$ peak deployments [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
list
: List App and Block deployments.
peak deployments list
List all the App and Block deployments that have been created for the tenant.
📝 Example usage:
peak deployments list --page-size 10 --page-number 1
🆗 Response:
{
"deploymentCount": 1,
"deployments": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10
}
Usage:
$ peak deployments list list_deployments
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A comma-separated list of statuses to filter deployments. Valid values aredeploying
,deployed
,deleting
,delete_failed
,failed
,platform_resource_error
,redeploying
,rollback
,rollback_complete
,rollback_failed
, andwarning
.--kind TEXT
: Only return entities with the kind specified.--term TEXT
: Only return entities which contain the term in name, title, description or summary.--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images
Create Docker images that Workflows, Workspaces, and other services use.
Usage:
$ peak images [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create a new image.create-or-update
: Create a new image/version or Update and existing version.create-version
: Create a new image version.delete
: Delete an image.delete-version
: Delete an image version.delete-versions
: Delete all the specified versions.describe
: Describe details of a specific image.describe-version
: Describe details of a specific version.get-build-logs
: Get image build logs.list
: List images.list-builds
: List image builds.list-versions
: List image versions.update-version
: Update an image version.
peak images create
Create a new image. This also adds the first version in the image.
🧩 Input file schema(yaml):
body (map):
name (str): Name of the image.
version (str | required: false): A valid semantic image version. If not provided, the version will be set to 0.0.1.
type (str): Type of the image.
description (str | required: false): Description of the image.
buildDetails (map | required: false):
source (str | required: false): The source via which the image is to be created. Allowed values are 'github', 'dockerfile' and 'upload'. It is 'upload' by default.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (list(map) | required: false):
name (str): Name of the build argument.
value (str): Value of the build argument.
secrets (list(str)) | required: false): List of secret names to be passed as build arguments.
context (str | required: false): The path within the artifact to the code to be executed by the Dockerfile.
dockerfilePath (str | required: false): Path to the Dockerfile inside artifact or the repository.
repository (str | required: false): When source is github, the repository where the Dockerfile content is stored.
branch (str | required: false): When source is github, the Branch that contains the Dockerfile.
token (str | required: false): When source is github, the token to be used to clone the required repository.
dockerfile (str | required: false): When source is dockerfile, this represents the content of Dockerfile to build the image from.
artifact (map | required: false):
path (str): Path to the artifact.
ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
📝 Example usage:
peak images create '/path/to/image.yaml' --params-file '/path/to/values.yaml'
We can also provide the required parameters from the command line or combine the YAML template and command line arguments in which case the command line arguments will take precedence.
📝 Example usage without yaml:
peak images create --name <name> --type <type> --description <description> --version <version> --source <source> --dockerfile <dockerfile> --secrets <secret_1> --secrets <secret_2>
🆗 Response:
{
"buildId": "build-image-mock:2198c71e-22c5-aca3eac3a55e",
"imageId": 9999,
"versionId": 1
}
Usage:
$ peak images create create_image
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--name TEXT
: Name of the image.--version TEXT
: A valid semantic image version.--type TEXT
: Type of the image.--description TEXT
: Description of the image.--artifact-path TEXT
: Path to the artifact.--artifact-ignore-files TEXT
: Ignore files to use when creating artifact.--build-details TEXT
: Build details of the image. To be passed in stringified json format.--source TEXT
: The source via which the image is to be created.--dockerfile TEXT
: The dockerfile to be used to create the image.--dockerfile-path TEXT
: Path to the dockerfile.--context TEXT
: The path within the artifact to the code to be executed by the Dockerfile.--repository TEXT
: When source is github, the repository where the Dockerfile content is stored.--branch TEXT
: When source is github, the Branch that contains the Dockerfile.--token TEXT
: When source is github, the token to be used to clone the required repository.--use-cache / --no-use-cache
: Whether to enable image caching to reduce build time.--build-arguments TEXT
: List of build arguments in the format arg1=value1.--secrets TEXT
: List of secret names to be passed as build arguments.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak images create-or-update
Create a new image if it doesn’t exist. This also adds the first version in the image. In case image exists, it will add a new version to the image. Update a version if exists.
🧩 Input file schema(yaml):
body (map):
name (str): Name of the image.
version (str | required: false): A valid semantic image version. If not provided, the next patch version of the latest version will be used.
type (str): Type of the image.
description (str | required: false): Description of the image.
buildDetails (map | required: false): If not provided and if the image version already exists, the build details of the existing version will be used.
source (str | required: false): The source via which the image is to be created. Allowed values are 'github', 'dockerfile' and 'upload'. It is 'upload' by default if new version is being created otherwise the existing version's source will be used.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (list(map) | required: false):
name (str): Name of the build argument.
value (str): Value of the build argument.
secrets (list(str)) | required: false): List of secret names to be passed as build arguments.
context (str | required: false): The path within the artifact to the code to be executed by the Dockerfile.
dockerfilePath (str | required: false): Path to the Dockerfile inside artifact or the repository.
repository (str | required: false): When source is github, the repository where the Dockerfile content is stored.
branch (str | required: false): When source is github, the Branch that contains the Dockerfile.
token (str | required: false): When source is github, the token to be used to clone the required repository.
dockerfile (str | required: false): When source is dockerfile, this represents the content of Dockerfile to build the image from.
artifact (map | required: false):
path (str): Path to the artifact.
ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
📝 Example usage:
peak images create-or-update '/path/to/image.yaml' --params-file '/path/to/values.yaml'
We can also provide the required parameters from the command line or combine the YAML template and command line arguments in which case the command line arguments will take precedence.
📝 Example usage without yaml:
peak images create-or-update --name <name> --type <type> --description <description> --version <version> --source <source> --dockerfile <dockerfile> --secrets <secret_1> --secrets <secret_2>
🆗 Response:
{
"buildId": "build-image-mock:2198c71e-22c5-aca3eac3a55e",
"imageId": 9999,
"versionId": 1
}
Usage:
$ peak images create-or-update create_or_update_image
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--name TEXT
: Name of the image.--version TEXT
: A valid semantic image version.--type TEXT
: Type of the image.--description TEXT
: Description of the image.--artifact-path TEXT
: Path to the artifact.--artifact-ignore-files TEXT
: Ignore files to use when creating artifact.--build-details TEXT
: Build details of the image. To be passed in stringified json format.--source TEXT
: The source via which the image is to be created.--dockerfile TEXT
: The dockerfile to be used to create the image.--dockerfile-path TEXT
: Path to the dockerfile.--context TEXT
: The path within the artifact to the code to be executed by the Dockerfile.--repository TEXT
: When source is github, the repository where the Dockerfile content is stored.--branch TEXT
: When source is github, the Branch that contains the Dockerfile.--token TEXT
: When source is github, the token to be used to clone the required repository.--use-cache / --no-use-cache
: Whether to enable image caching to reduce build time.--build-arguments TEXT
: List of build arguments in the format arg1=value1.--secrets TEXT
: List of secret names to be passed as build arguments.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak images create-version
Create a new version in an existing image.
🧩 Input file schema(yaml):
body (map):
version (str | required: false): A valid semantic image version. If not provided, the next patch version of the latest version will be used.
description (str | required: false): Description of the image version.
buildDetails (map | required: false):
source (str | required: false): The source via which the image version is to be created. Allowed values are 'github', 'dockerfile' and 'upload'. It is 'upload' by default.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (list(map) | required: false):
name (str): Name of the build argument.
value (str): Value of the build argument.
secrets (list(str) | required: false): List of secret names to be passed as build arguments.
context (str | required: false): The path within the artifact to code to be executed by the Dockerfile.
dockerfilePath (str | required: false): Path to the Dockerfile inside artifact or repository.
repository (str | required: false): When source is github, the repository where the Dockerfile content is stored.
branch (str | required: false): When source is github, the Branch that contains the Dockerfile.
token (str | required: false): When source is github, the token to be used to clone the required repository.
dockerfile (str | required: false): When source is dockerfile, this represents the content of Dockerfile to build the image from.
autodeployResources (list(map) | required: false): A list of resources that should be redeployed when the build completes.
entityId (str): The id of the resource to be redeployed.
entityType (str): The type of the resource to be redeployed. Allowed values are 'workflow', 'workspace', 'api' and 'webapp'.
artifact (map | required: false):
path (str): Path to the artifact.
ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
📝 Example usage:
peak images create-version -v '/path/to/parmas.yaml' < imageId > '/path/to/file.yaml'
We can also provide the required parameters from the command line or combine the YAML template and command line arguments in which case the command line arguments will take precedence.
📝 Example usage without yaml:
peak images create-version <image_id> --description <description> --version <version> --source <source> --dockerfile <dockerfile> --secrets <secret_1>,<secret_2>
🆗 Response:
{
"buildId": "build-image-mock:2198c71e-22c5-aca3eac3a55e",
"versionId": 101,
"autodeploymentId": "0a12abcd-11ab-22d2-123a-a1234b333abc"
}
Usage:
$ peak images create-version create_image_version IMAGE_ID
Arguments:
IMAGE_ID
: ID of the image to be used in this operation. [required]
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--version TEXT
: A valid semantic image version.--description TEXT
: Description of the image.--artifact-path TEXT
: Path to the artifact.--artifact-ignore-files TEXT
: Ignore files to use when creating artifact.--build-details TEXT
: Build details of the image. To be passed in stringified json format.--source TEXT
: The source via which the image is to be created.--dockerfile TEXT
: The dockerfile to be used to create the image.--dockerfile-path TEXT
: Path to the dockerfile.--context TEXT
: The path within the artifact to the code to be executed by the Dockerfile.--repository TEXT
: When source is github, the repository where the Dockerfile content is stored.--branch TEXT
: When source is github, the Branch that contains the Dockerfile.--token TEXT
: When source is github, the token to be used to clone the required repository.--use-cache / --no-use-cache
: Whether to enable image caching to reduce build time.--build-arguments TEXT
: List of build arguments in the format arg1=value1.--secrets TEXT
: List of secret names to be passed as build arguments.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak images delete
Delete an image. All the versions in the image will first go into deleting
state before actually being deleted.
📝 Example usage:
peak images delete 9999
🆗 Response:
{}
Usage:
$ peak images delete delete_image IMAGE_ID
Arguments:
IMAGE_ID
: ID of the image to be used in this operation. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images delete-version
Delete an image version. An image cannot be deleted if it is being used by any other resource.
📝 Example usage:
peak images delete-version --image-id 9999 --version-id 1
🆗 Response:
{}
Usage:
$ peak images delete-version delete_version
Options:
--image-id INTEGER
: ID of the image to be used in this operation. [required]--version-id INTEGER
: ID of the version to be used in this operation. [required]--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images delete-versions
Delete all the specified versions for an image.
📝 Example usage:
peak images delete-versions --image-id 9999 --version-ids 1 --version-ids 2
🆗 Response:
{}
Usage:
$ peak images delete-versions delete_versions
Options:
--image-id INTEGER
: ID of the image to be used in this operation. [required]--version-ids TEXT
: List of version ids to delete. [required]--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images describe
Describe details of a specific image and its latest version.
📝 Example usage:
peak images describe 9999
🆗 Response:
{
"id": 1,
"name": "awesome-image",
"type": "workflow",
"scope": "custom",
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "someone@peak.ai",
"latestVersion": {...}
}
Usage:
$ peak images describe describe_image IMAGE_ID
Arguments:
IMAGE_ID
: ID of the image to be used in this operation. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images describe-version
Describe details of a specific version.
📝 Example usage:
peak images describe-version --image-id 9999 --version-id 101
🆗 Response:
{
"imageName": "awesome-image",
"imageType": "Workflow",
"id": 101,
"version": "0.0.1-python3.9",
"description": "This is an awesome image",
"status": "not-ready",
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "someone@peak.ai",
"updatedAt": "2020-01-01T18:00:00.000Z",
"updatedBy": "someone@peak.ai",
"pullUrl": "<image-url>",
"lastBuildStatus": "building",
"lastBuildAt": "2020-01-01T18:00:00.000Z",
"buildDetails": {...},
"tags": [...]
}
Usage:
$ peak images describe-version describe_version
Options:
--image-id INTEGER
: ID of the image to be used in this operation. [required]--version-id INTEGER
: ID of the version to be used in this operation. [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images get-build-logs
Get logs for an image build.
If you want to save the logs to a file, you can use the --save
flag.
If you don’t provide a file name, the logs will be saved to a file with the name image_build_logs_{image_id}_{build_id}.log
.
If you want to view next set of logs you can pass in the nextToken
to the command.
📝 Example usage:
peak images get-build-logs --image-id <image_id> --build-id <build_id> --next-token <next_token>
To follow the logs, you can use the --follow
flag.
📝 Example usage to follow the logs:
peak images get-build-logs --image-id < image_id > --build-id < build_id > --follow
🆗 Response:
{
"buildStatus": "building",
"finishTime": "2023-06-01T19:00:00.000Z",
"logs": [
{
"ingestionTime": "2023-06-01T18:00:00.000Z",
"message": "Building the Docker image...",
"timestamp": "2023-06-01T18:00:00.000Z"
}
],
"nextToken": "f/37241814580157116960215105647056337845181039459911335941/s",
"startTime": "2023-06-01T18:00:00.000Z"
}
Usage:
$ peak images get-build-logs [OPTIONS]
Options:
--image-id INTEGER
: ID of the image to be used in this operation. [required]--build-id INTEGER
: ID of the image build to be used in this operation. [required]--next-token TEXT
: The token to retrieve the next set of logs.--follow / --no-follow
: Whether to follow the logs. [default: no-follow]--save / --no-save
: If set, saves the logs locally to log file. [default: no-save]--file-name TEXT
: Name or path of the file to save the logs.--paging
: If set, prints the output using the default pager.-o, --output [json]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images list
List all images that exists in the tenant along with details about their latest version.
📝 Example usage:
peak images list --page-size 10 --page-number 1 --name "test" --status "ready,in-use" --scope "custom" --last-build-status "building" --tags "tag1"
🆗 Response:
{
"imageCount": 1,
"images": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
Usage:
$ peak images list list_images
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--name TEXT
: Image Name or version to search for.--status TEXT
: List of status of the latest version to filter the images by. Valid values arenot-ready
,ready
,in-use
,deleting
,delete-failed
.--scope TEXT
: List of type of image to filter the images by.--last-build-status TEXT
: List of build status of the latest version to filter the images by. Valid values arebuilding
,failed
,success
,stopped
,stopping
.--tags TEXT
: List of tags on the latest version to filter the images by.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images list-builds
List image builds for a specific image. If you want to view builds for a specific version you can pass in Version’s ID to the command.
📝 Example usage:
peak images list-builds 9999 --version-ids 1,2,3 --page-size 10 --page-number 1
🆗 Response:
{
"buildCount": 1,
"builds": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
Usage:
$ peak images list-builds list_image_builds IMAGE_ID
Arguments:
IMAGE_ID
: ID of the image to be used in this operation. [required]
Options:
--count INTEGER
: Number of builds required.--version-ids TEXT
: List of version ids to filter image builds.--build-status TEXT
: List of build status to filter image builds.--date-from TEXT
: The date after which the entities should be included (in ISO format).--date-to TEXT
: The date till which the entities should be included (in ISO format).--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images list-versions
List all versions for an image.
📝 Example usage:
peak images list-versions 9999 --page-size 10 --page-number 1 --version "0.0.1" --status "ready,in-use" --last-build-status "failed" --tags "tag1,tag2"
🆗 Response:
{
"versionCount": 1,
"versions": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
Usage:
$ peak images list-versions list_image_versions IMAGE_ID
Arguments:
IMAGE_ID
: ID of the image to be used in this operation. [required]
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--version TEXT
: Version to search for.--status TEXT
: List of statuses to filter the versions by. Valid values arenot-ready
,ready
,in-use
,deleting
,delete-failed
.--last-build-status TEXT
: List of build statuses to filter the versions by. Valid values arebuilding
,failed
,success
,stopped
,stopping
.--paging
: If set, prints the output using the default pager.--tags TEXT
: List of tags to filter the versions by.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak images update-version
Update an image version. Only the versions that are in not-ready
state can be updated and you can not update their version while updating them.
🧩 Input file schema(yaml):
body (map):
description (str | required: false): Description of the image version.
buildDetails (map | required: false): If not provided, the existing build details will be used.
source (str | required: false): The source via which the image version is to be created. Allowed values are 'github', 'dockerfile' and 'upload'. Source of existing version will be used if not provided.
useCache (boolean | required: false): Whether to enable image caching to reduce build time, is enabled by default.
buildArguments (list(map) | required: false):
name (str): Name of the build argument.
value (str): Value of the build argument.
secrets (list(str) | required: false): List of secret names to be passed as build arguments.
context (str | required: false): The path within the artifact to code to be executed by the Dockerfile.
dockerfilePath (str | required: false): Path to the Dockerfile inside artifact or repository.
repository (str | required: false): When source is github, the repository where the Dockerfile content is stored.
branch (str | required: false): When source is github, the Branch that contains the Dockerfile.
token (str | required: false): When source is github, the token to be used to clone the required repository.
dockerfile (str | required: false): When source is dockerfile, this represents the content of Dockerfile to build the image from.
autodeployResources (list(map) | required: false): A list of resources that should be redeployed when the build completes.
entityId (str): The id of the resource to be redeployed.
entityType (str): The type of the resource to be redeployed. Allowed values are 'workflow', 'workspace', 'api' and 'webapp'.
artifact (map | required: false):
path (str): Path to the artifact.
ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
📝 Example usage:
peak images update-version --image-id 9999 --version-id 101 '/path/to/file.yaml' -v '/path/to/parmas.yaml'
We can also provide the required parameters from the command line or combine the YAML template and command line arguments in which case the command line arguments will take precedence.
📝 Example usage without yaml:
peak images update-version --image-id <image_id> --version-id <version_id> --description <description> --source <source> --dockerfile <dockerfile> --secrets <secret_1>,<secret_2>
🆗 Response:
{
"buildId": "build-image-mock:2198c71e-22c5-aca3eac3a55e",
"versionId": 101,
"autodeploymentId": "0a12abcd-11ab-22d2-123a-a1234b333abc"
}
Usage:
$ peak images update-version update_version
Options:
--image-id INTEGER
: ID of the image to be used in this operation. [required]--version-id INTEGER
: ID of the version to be used in this operation. [required]--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--description TEXT
: Description of the image.--artifact-path TEXT
: Path to the artifact.--artifact-ignore-files TEXT
: Ignore files to use when creating artifact.--build-details TEXT
: Build details of the image. To be passed in stringified json format.--source TEXT
: The source via which the image is to be created.--dockerfile TEXT
: The dockerfile to be used to create the image.--dockerfile-path TEXT
: Path to the dockerfile.--context TEXT
: The path within the artifact to the code to be executed by the Dockerfile.--repository TEXT
: When source is github, the repository where the Dockerfile content is stored.--branch TEXT
: When source is github, the Branch that contains the Dockerfile.--token TEXT
: When source is github, the token to be used to clone the required repository.--use-cache / --no-use-cache
: Whether to enable image caching to reduce build time.--build-arguments TEXT
: List of build arguments in the format arg1=value1.--secrets TEXT
: List of secret names to be passed as build arguments.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak services
Develop web services to deliver insights, suggestions and recommendations.
Usage:
$ peak services [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create a new service.create-or-update
: Create a new service or Update an existing service.delete
: Delete an existing service.describe
: Describe details of a service.list
: List services.test
: Test API type serviceupdate
: Update an existing service.
peak services create
Create a new service and start its deployment.
🧩 Input file schema(yaml):
body (map):
name (string): Name of the service.
title (string | required: false): Title of the service.
description (string | required: false): Description of the service.
serviceType (string | required: false): Type of the service. Valid values are `api`, `web-app` and `shiny`. Default value is `web-app`.
imageDetails (map):
imageId (number): ID of the image.
versionId (number | required: false): ID of the image version. If versionId is not passed, service will be created using latest ready version of the image.
resources (map | required: false):
instanceTypeId (number): ID of the instance type.
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
sessionStickiness (boolean | required: false): Enable session stickiness for the service. Default value is false. Enabling session stickiness will tie each user to a specific server for all their requests. Not required for API type services.
entrypoint (string | required: false): Entrypoint for the service.
healthCheckURL (string | required: false): Endpoint to monitor service's operational status.
📝 Example usage:
peak services create '/path/to/file.yml' -v '/path/to/params.yml'
📝 Example usage without yaml:
peak services create --name web-app --image-id < name > --title < title > --description < description > --service-type < image-id > --version-id < version-id > --instance-type-id < instance-type-id > --session-stickiness
🆗 Response:
{
"id": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
Usage:
$ peak services create create_service
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--name TEXT
: Name of the service--title TEXT
: Title of the service--description TEXT
: Description of the service--image-id INTEGER
: ID of the image to be used in this operation.--version-id INTEGER
: ID of the version to be used in this operation. If version-id is not passed, service will be created using latest ready version of the image.--instance-type-id INTEGER
: The ID of the instance type to be used in this operation.--session-stickiness / --no-session-stickiness
: Enable session stickiness for the service. Not required for API type services.--service-type TEXT
: A list of service types to filter the list by. Valid values areapi
,web-app
andshiny
.--env TEXT
: List of plain text environment variables in the format arg1=value1.--secrets TEXT
: List of secret names to be passed as environment variables.--entrypoint TEXT
: Entrypoint for the service.--health-check-url TEXT
: Endpoint to monitor service’s operational status.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak services create-or-update
Create a new service or Update an existing service based on service name and start its deployment.
When updating the service, it will trigger a redeployment only under specific conditions. Redeployment is triggered if you make changes to any of the following parameters: imageId, versionId, instanceTypeId, env, secrets or sessionStickiness. However, only modifying the title or description will not trigger a redeployment.
🧩 Input file schema(yaml):
body (map):
name (string): Name of the service.
title (string | required: false): Title of the service.
description (string | required: false): Description of the service.
serviceType (string | required: false): Type of the service. Valid values are `api`, `web-app` and `shiny`. Default value is `web-app`.
imageDetails (map):
imageId (number): ID of the image.
versionId (number | required: false): ID of the image version. If versionId is not passed, service will be created using latest ready version of the image.
resources (map | required: false):
instanceTypeId (number): ID of the instance type.
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
sessionStickiness (boolean | required: false): Enable session stickiness for the service. Default value is false. Enabling session stickiness will tie each user to a specific server for all their requests. Not required for API type services.
entrypoint (string | required: false): Entrypoint for the service.
healthCheckURL (string | required: false): Endpoint to monitor service's operational status.
📝 Example usage:
peak services create-or-update '/path/to/file.yml' -v '/path/to/params.yml'
📝 Example usage without yaml:
peak services create-or-update --name < name > --title < title > --description < description > --image-id < image-id > --version-id < version-id > --instance-type-id < instance-type-id > --session-stickiness
🆗 Response:
{
"id": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
🔗 API Documentation for creating a new service
🔗 API Documentation for updating an existing service
Usage:
$ peak services create-or-update create_or_update_service
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--name TEXT
: Name of the service--title TEXT
: Title of the service--description TEXT
: Description of the service--image-id INTEGER
: ID of the image to be used in this operation.--version-id INTEGER
: ID of the version to be used in this operation. If version-id is not passed, service will be created using latest ready version of the image.--instance-type-id INTEGER
: The ID of the instance type to be used in this operation.--session-stickiness / --no-session-stickiness
: Enable session stickiness for the service. Not required for API type services.--service-type TEXT
: A list of service types to filter the list by. Valid values areapi
,web-app
andshiny
.--env TEXT
: List of plain text environment variables in the format arg1=value1.--secrets TEXT
: List of secret names to be passed as environment variables.--entrypoint TEXT
: Entrypoint for the service.--health-check-url TEXT
: Endpoint to monitor service’s operational status.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak services delete
Delete an existing service.
📝 Example usage:
peak services delete <service-id>
🆗 Response:
{
"id": "ab11c21d-1add-45dd-a72e-8c6b83b68dee"
}
Usage:
$ peak services delete delete_service SERVICE_ID
Arguments:
SERVICE_ID
: ID of the service to be used in this operation. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak services describe
Describe details for the specific service.
📝 Example usage:
peak services describe <service-id>
🆗 Response:
{
"id": "ab11c21d-1add-45dd-a72e-8c6b83b68dee",
"name": "awesome-service",
"status": "AVAILABLE",
"serviceType": "web-app",
"imageDetails": {
"imageId": 1,
"versionId": 1
},
"resources": {
"instanceTypeId": 1
},
"sessionStickiness": false,
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "someone@peak.ai",
"updatedAt": "2020-01-01T18:00:00.000Z",
"updatedBy": "someone@peak.ai",
"tags": [...]
}
Usage:
$ peak services describe describe_service SERVICE_ID
Arguments:
SERVICE_ID
: ID of the service to be used in this operation. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak services list
List all services that exist for the tenant.
📝 Example usage:
peak services list --page-size 10 --page-number 1 --status CREATING --name test --service-type web-app
🆗 Response:
{
"servicesCount": 1,
"services": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
Usage:
$ peak services list list_services
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A list of service status to filter the list by. Valid values areCREATING
,DEPLOYING
,AVAILABLE
,DELETING
,CREATE_FAILED
,DELETE_FAILED
.--name TEXT
: Service name to search for.--service-type TEXT
: A list of service types to filter the list by. Valid values areapi
,web-app
andshiny
.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak services test
Test an API type service.
🧩 Input file schema(yaml):
payload (map): payload to be used to test the service.
📝 Example usage:
peak services test -v '/path/to/params.yml' < service-name > '/path/to/file.yml'
📝 Example usage without yaml:
peak services test 'get' --path '/' < service-name > --http-method
🆗 Response:
{
"responseBody": "{"status": "OK"}",
"responseStatus": 200,
"reqStartTime": "2024-01-01T10:00:01.064Z",
"reqEndTime": "2024-01-01T10:00:05.064Z",
"responseSize": "1KB"
}
Usage:
$ peak services test test_service SERVICE_NAME
Arguments:
SERVICE_NAME
: Name of the service to be used in this operation. [required]
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--http-method TEXT
: HTTP method to be used to test the service.--path TEXT
: Path to be used to test the service.--payload TEXT
: Payload to be used to test the service. To be passed in stringified json format.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak services update
Update an existing service.
When updating the service, it will trigger a redeployment only under specific conditions. Redeployment is triggered if you make changes to any of the following parameters: imageId, versionId, instanceTypeId, env, secrets or sessionStickiness. However, only modifying the title or description will not trigger a redeployment.
With the help of this operation, we can just update the required fields (except name and serviceType) and keep the rest of the fields as it is.
🧩 Input file schema(yaml):
body (map):
title (string | required: false): Title of the service.
description (string | required: false): Description of the service.
imageDetails (map | required: false):
imageId (number): ID of the image.
versionId (number | required: false): ID of the image version. If versionId is not passed, service will be created using latest ready version of the image.
resources (map | required: false):
instanceTypeId (number): ID of the instance type.
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
sessionStickiness (boolean | required: false): Enable session stickiness for the service. Default value is false. Enabling session stickiness will tie each user to a specific server for all their requests. Not required for API type services.
entrypoint (string | required: false): Entrypoint for the service.
healthCheckURL (string | required: false): Endpoint to monitor service's operational status.
📝 Example usage:
peak services update -v '/path/to/params.yml' < service-id > '/path/to/file.yml'
📝 Example usage without yaml:
peak services update < service-id > --title < title > --description < description > --image-id < image-id > --version-id < version-id > --instance-type-id < instance-type-id > --session-stickiness
🆗 Response:
{
"id": "ab11c21d-1add-45dd-a72e-8c6b83b68dee"
}
Usage:
$ peak services update update_service SERVICE_ID
Arguments:
SERVICE_ID
: ID of the service to be used in this operation. [required]
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--title TEXT
: Title of the service--description TEXT
: Description of the service--image-id INTEGER
: ID of the image to be used in this operation.--version-id INTEGER
: ID of the version to be used in this operation. If version-id is not passed, service will be created using latest ready version of the image.--instance-type-id INTEGER
: The ID of the instance type to be used in this operation.--session-stickiness / --no-session-stickiness
: Enable session stickiness for the service. Not required for API type services.--env TEXT
: List of plain text environment variables in the format arg1=value1.--secrets TEXT
: List of secret names to be passed as environment variables.--entrypoint TEXT
: Entrypoint for the service.--health-check-url TEXT
: Endpoint to monitor service’s operational status.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak specs
Manage both Block and App specs.
Usage:
$ peak specs [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
list
: List App and Block specs.list-release-deployments
: List deployments for a spec release.
peak specs list
List all the App and Block specs that exists for the tenant.
📝 Example usage:
peak specs list --featured --page-size 10 --page-number 1
🆗 Response:
{
"specCount": 1,
"specs": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10
}
Usage:
$ peak specs list list_specs
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A comma-separated list of statuses to filter specs. Valid values areavailable
,unavailable
andarchived
.--kind TEXT
: Only return entities with the kind specified.--term TEXT
: Only return entities which contain the term in name, title, description or summary.--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--scope TEXT
: A comma-separated list of scopes to only return entities of those scopes.--featured
: Whether to only return featured entities.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak specs list-release-deployments
List all the deployments for a given spec release.
📝 Example usage:
peak specs list-release-deployments --spec-id "632a4e7c-ab86-4ecb-8f34-99b5da531ceb" --status deployed,failed --version 1.0.0
🆗 Response:
{
"deploymentCount": 1,
"deployments": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 10,
}
Usage:
$ peak specs list-release-deployments list_release_deployments
Options:
--spec-id TEXT
: ID of the spec to be used in this operation. [required]--version TEXT
: Release version to be used in this operation. [required]--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A comma-separated list of statuses to filter spec releases. Valid values aredeleting
,delete_failed
,deployed
,deploying
,failed
,platform_resource_error
,redeploying
,rollback
,rollback_complete
,rollback_failed
andwarning
.--name TEXT
: Only return entities whose names begins with the query string.--title TEXT
: Only return entities whose title begins with the query string.--sort TEXT
: A comma-separated list of fields to order results by, in the format <field>:<order>.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak tenants
Manage tenant settings and quota.
Usage:
$ peak tenants [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
list-instance-options
: List tenant instance options.
peak tenants list-instance-options
List all available instance options for a tenant.
📝 Example Usage:
peak tenants list-instance-options --entity-type workflow
🆗 Response:
{
"data": [
{
"cpu": 125,
"gpu": null,
"gpuMemory": null,
"id": 20,
"instanceClass": "Genaeral Purpose",
"memory": 125,
"name": "Pico (0.125CPU, 0.125GB RAM)",
"provider": "k8s",
"providerInstanceId": null
}
]
}
Usage:
$ peak tenants list-instance-options list_tenant_instance_options
Options:
--entity-type TEXT
: Entity type to be used in this operation (e.g. - feed, workflow). [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak users
User management and permission checking.
Usage:
$ peak users [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
check-permission
: Check user permission for a specific feature.
peak users check-permission
Check if the user has the specified permission for the given feature path.
📝 Example usage:
peak user check-permission --feature "PRICING.GUARDRAILS" --action "read" --auth-token <your-auth-token>
🆗 Response: True if the user has the permission, False otherwise.
Usage:
$ peak users check-permission check_permission
Options:
--feature TEXT
: The feature path to check permissions for, e.g., ‘PRICING.GUARDRAILS’. [required]--action TEXT
: The action to check for the feature path, e.g., ‘read’ or ‘write’. [required]--auth-token TEXT
: Authentication token for the user. If not provided, the token from the environment will be used.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak webapps
Visualize your data and predictions using Webapps.
NOTE: Please note that only generic (EKS-based) webapps are supported with CLI. **Note** that, the functionalities provided through the `Webapp` feature are deprecated and will eventually be removed. We recommend using the `Service` feature which offers a more comprehensive and flexible solution for managing web applications and API deployments.
Usage:
$ peak webapps [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create a new webapp.create-or-update
: Create a new webapp or Update an existing webapp.delete
: Delete an existing webapp.describe
: Describe details of a webapp.list
: List webapps.update
: Update an existing webapp.
peak webapps create
Create a new webapp and start its deployment.
NOTE: The Web Apps commands are deprecated and will eventually be removed. It is recommended that users begin transitioning to the Service commands, which offers all the features of Webapp along with the added capability of API deployment and other significant updates for enhanced functionality. Transitioning early to the Service commands will ensure easier adoption of its advanced features and future updates.
For more information on Services, please refer to the Service documentation.
🧩 Input file schema(yaml):
body (map):
name (string): Name of the webapp.
title (string | required: false): Title of the webapp.
description (string | required: false): Description of the webapp.
imageDetails (map):
imageId (number): ID of the image.
versionId (number | required: false): ID of the image version. If versionId is not passed, webapp will be created using latest ready version of the image.
resources (map | required: false):
instanceTypeId (number): ID of the instance type.
sessionStickiness (boolean | required: false): Enable session stickiness for the webapp. Default value is false. Enabling session stickiness will tie each user to a specific server for all their requests.
📝 Example usage:
peak webapps create '/path/to/file.yml' -v '/path/to/params.yml'
📝 Example usage without yaml:
peak webapps create --name < name > --title < title > --description < description > --image-id < image-id > --version-id < version-id > --instance-type-id < instance-type-id > --session-stickiness
🆗 Response:
{
"id": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
Usage:
$ peak webapps create create_webapp
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--name TEXT
: Name of the webapp--title TEXT
: Title of the webapp--description TEXT
: Description of the webapp--image-id INTEGER
: ID of the image to be used in this operation.--version-id INTEGER
: ID of the version to be used in this operation. If version-id is not passed, webapp will be created using latest ready version of the image.--instance-type-id INTEGER
: The ID of the instance type to be used in this operation.--session-stickiness / --no-session-stickiness
: Enable session stickiness for the webapp.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak webapps create-or-update
Create a new webapp or Update an existing webapp based on webapp name and start its deployment.
NOTE: The Web Apps commands are deprecated and will eventually be removed. It is recommended that users begin transitioning to the Service commands, which offers all the features of Webapp along with the added capability of API deployment and other significant updates for enhanced functionality. Transitioning early to the Service commands will ensure easier adoption of its advanced features and future updates.
For more information on Services, please refer to the Service documentation.
When updating the webapp, it will trigger a redeployment only under specific conditions. Redeployment is triggered if you make changes to any of the following parameters: imageId, versionId, instanceTypeId or sessionStickiness. However, only modifying the title or description will not trigger a redeployment.
🧩 Input file schema(yaml):
body (map):
name (string): Name of the webapp.
title (string | required: false): Title of the webapp.
description (string | required: false): Description of the webapp.
imageDetails (map):
imageId (number): ID of the image.
versionId (number | required: false): ID of the image version. If versionId is not passed, webapp will be created using latest ready version of the image.
resources (map | required: false):
instanceTypeId (number): ID of the instance type.
sessionStickiness (boolean | required: false): Enable session stickiness for the webapp. Default value is false. Enabling session stickiness will tie each user to a specific server for all their requests.
📝 Example usage:
peak webapps create-or-update '/path/to/file.yml' -v '/path/to/params.yml'
📝 Example usage without yaml:
peak webapps create-or-update --name < name > --title < title > --description < description > --image-id < image-id > --version-id < version-id > --instance-type-id < instance-type-id > --session-stickiness
🆗 Response:
{
"id": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
Usage:
$ peak webapps create-or-update create_or_update_webapp
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--name TEXT
: Name of the webapp--title TEXT
: Title of the webapp--description TEXT
: Description of the webapp--image-id INTEGER
: ID of the image to be used in this operation.--version-id INTEGER
: ID of the version to be used in this operation. If version-id is not passed, webapp will be created using latest ready version of the image.--instance-type-id INTEGER
: The ID of the instance type to be used in this operation.--session-stickiness / --no-session-stickiness
: Enable session stickiness for the webapp.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak webapps delete
Delete an existing webapp.
NOTE: The Web Apps commands are deprecated and will eventually be removed. It is recommended that users begin transitioning to the Service commands, which offers all the features of Webapp along with the added capability of API deployment and other significant updates for enhanced functionality. Transitioning early to the Service commands will ensure easier adoption of its advanced features and future updates.
For more information on Services, please refer to the Service documentation.
📝 Example usage:
peak webapps delete "ab11c21d-1add-45dd-a72e-8c6b83b68dee"
🆗 Response:
{
"id": "ab11c21d-1add-45dd-a72e-8c6b83b68dee"
}
Usage:
$ peak webapps delete delete_webapp WEBAPP_ID
Arguments:
WEBAPP_ID
: ID of the webapp to be used in this operation [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak webapps describe
Describe details for the specific webapp.
NOTE: The Web Apps commands are deprecated and will eventually be removed. It is recommended that users begin transitioning to the Service commands, which offers all the features of Webapp along with the added capability of API deployment and other significant updates for enhanced functionality. Transitioning early to the Service commands will ensure easier adoption of its advanced features and future updates.
For more information on Services, please refer to the Service documentation.
📝 Example usage:
peak webapps describe "ab11c21d-1add-45dd-a72e-8c6b83b68dee"
🆗 Response:
{
"id": "ab11c21d-1add-45dd-a72e-8c6b83b68dee",
"name": "awesome-webapp",
"status": "AVAILABLE",
"imageDetails": {
"imageId": 1,
"versionId": 1
},
"resources": {
"instanceTypeId": 1
},
"sessionStickiness": false,
"createdAt": "2020-01-01T18:00:00.000Z",
"createdBy": "someone@peak.ai",
"updatedAt": "2020-01-01T18:00:00.000Z",
"updatedBy": "someone@peak.ai",
"tags": [...]
}
Usage:
$ peak webapps describe describe_webapp WEBAPP_ID
Arguments:
WEBAPP_ID
: ID of the webapp to be used in this operation [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak webapps list
List all webapps that exist for the tenant.
NOTE: The Web Apps commands are deprecated and will eventually be removed. It is recommended that users begin transitioning to the Service commands, which offers all the features of Webapp along with the added capability of API deployment and other significant updates for enhanced functionality. Transitioning early to the Service commands will ensure easier adoption of its advanced features and future updates.
For more information on Services, please refer to the Service documentation.
📝 Example usage:
peak webapps list --page-size 10 --page-number 1 --status CREATING --name test
🆗 Response:
{
"webappsCount": 1,
"webapps": [...],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
Usage:
$ peak webapps list list_webapps
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--status TEXT
: A list of webapp status to filter the list by. Valid values areCREATING
,DEPLOYING
,AVAILABLE
,DELETING
,CREATE_FAILED
,DELETE_FAILED
.--name TEXT
: Webapp name to search for--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak webapps update
Update an existing webapp.
NOTE: The Web Apps commands are deprecated and will eventually be removed. It is recommended that users begin transitioning to the Service commands, which offers all the features of Webapp along with the added capability of API deployment and other significant updates for enhanced functionality. Transitioning early to the Service commands will ensure easier adoption of its advanced features and future updates.
For more information on Services, please refer to the Service documentation.
When updating the webapp, it will trigger a redeployment only under specific conditions. Redeployment is triggered if you make changes to any of the following parameters: imageId, versionId, instanceTypeId or sessionStickiness. However, only modifying the title or description will not trigger a redeployment.
🧩 Input file schema(yaml):
body (map):
title (string | required: false): Title of the webapp.
description (string | required: false): Description of the webapp.
imageDetails (map | required: false):
imageId (number): ID of the image.
versionId (number | required: false): ID of the image version. If versionId is not passed, webapp will be created using latest ready version of the image.
resources (map | required: false):
instanceTypeId (number): ID of the instance type.
sessionStickiness (boolean | required: false): Enable session stickiness for the webapp. Default value is false. Enabling session stickiness will tie each user to a specific server for all their requests.
📝 Example usage:
peak webapps update -v '/path/to/params.yml' < webapp-id > '/path/to/file.yml'
📝 Example usage without yaml:
peak webapps update < webapp-id > --title < title > --description < description > --image-id < image-id > --version-id < version-id > --instance-type-id < instance-type-id > --session-stickiness
🆗 Response:
{
"id": "ab11c21d-1add-45dd-a72e-8c6b83b68dee"
}
Usage:
$ peak webapps update update_webapp WEBAPP_ID
Arguments:
WEBAPP_ID
: ID of the webapp to be used in this operation [required]
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--title TEXT
: Title of the webapp--description TEXT
: Description of the webapp--image-id INTEGER
: ID of the image to be used in this operation.--version-id INTEGER
: ID of the version to be used in this operation. If version-id is not passed, webapp will be created using latest ready version of the image.--instance-type-id INTEGER
: The ID of the instance type to be used in this operation.--session-stickiness / --no-session-stickiness
: Enable session stickiness for the webapp.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak workflows
Create Machine Learning Pipelines using Workflows. Please note that Workflows with only standard steps are supported.
Usage:
$ peak workflows [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
create
: Create a new workflow.create-or-update
: Create a new workflow or Update an existing workflow.delete
: Delete a workflow.describe
: Describe details of a workflow.execute
: Start a workflow run.get-execution-details
: Get workflow execution details.get-execution-logs
: Get workflow execution logs.list
: List workflows.list-default-resources
: List default resources.list-executions
: List executions for the given workflow.list-resources
: List all available resources.patch
: Update required fields of an existing workflow.update
: Update an existing workflow.
peak workflows create
Create a new workflow. Workflows with only standard steps are supported.
🧩 Input file schema(yaml):
body (map):
name (string): Name of the worklfow.
tags (list(map) | required: false):
- name (string): Name of the tag.
triggers (list(map) | required: false):
- cron (string | required: false): A valid cron expression.
webhook (boolean | required: false): Should be true if webhook type trigger is to be used.
watchers (list(map) | required: false):
- events (map):
success (boolean | required: false): Whether to call event on success.
fail (boolean | required: false): Whether to call event on success.
runtimeExceeded (int | required: false): The runtime after which event is called.
user (string | required: false): User to be notified.
webhook (map | required: false):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
retryOptions (map | required: false): # Workflow level retry options which will be applied to all steps.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
steps(map):
<stepName> (map): # Dictionary containing the step configuration. Here the key is name of the step.
imageId (int): ID of the existing image.
imageVersionId: (int | required: false): ID of the existing image version.
type (string | required: false): Type of workflow step. Currently only standard type is supported.
command (string): Command to run when step is executed.
clearImageCache (boolean | required: false): Whether to clear image cache on workflow execution.
stepTimeout (int | required: false): Time after which the step timeouts.
parents (list(str) | required: false): List containing names of steps on which this step is dependent on.
repository (map | required: false):
branch (string): Branch of the repository containing the required files.
token (string | required: false): The token to be used to clone the repository.
url (string): URL of the repository.
resources (map | required: false):
instanceTypeId (int): ID of the instance type to be used in the step.
storage (string): Storage in GB. For example, "10GB".
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
outputParamters (map | required: false):
<keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the parameter's value.
executionParameters (map | required: false):
conditional (list(map) | required: false): # List of conditions to be evaluated based on the output params of the parent steps.
- condition (string): The evaluation condition, either 'equals' or 'not-equals'.
paramName (string): Name of the output parameter to be evaluated.
stepName (string): Name of the step containing the output parameter.
value (string): Value to be compared with the output parameter.
parentStatus (list(map) | required: false): # List of conditions to be evaluated based on the status of the parent steps.
- condition (string): The evaluation condition, either 'all-of' or 'one-of'.
parents (list(str)): List of parent step names.
status (list(str)): List of parent step statuses, with valid values being 'success' and 'failure'.
runConfiguration (map | required: false):
retryOptions (map | required: false): # Step level retry options which will override the workflow level retry options.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
skipConfiguration (map | required: false):
skip (boolean | required: false): Indicates whether to skip the step. Default is false.
skipDAG (boolean | required: false): Indicates whether to skip dependent steps, including the current step. Default is false.
📝 Example usage:
peak workflows create /path/to/file.yml -v /path/to/params.yml
🆗 Response:
{
"id": 123,
"triggers": [
{
"webhook": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
]
}
Usage:
$ peak workflows create create_workflow FILE
Arguments:
FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak workflows create-or-update
Create a new workflow or Update an existing workflow based on workflow name.
🧩 Input file schema(yaml):
body (map):
name (string): Name of the worklfow.
tags (list(map) | required: false):
- name (string): Name of the tag.
triggers (list(map) | required: false):
- cron (string | required: false): A valid cron expression.
webhook (boolean | required: false): Should be true if webhook type trigger is to be used.
watchers (list(map) | required: false):
- events (map):
success (boolean | required: false): Whether to call event on success.
fail (boolean | required: false): Whether to call event on success.
runtimeExceeded (int | required: false): The runtime after which event is called.
user (string | required: false): User to be notified.
webhook (map | required: false):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
retryOptions (map | required: false): # Workflow level retry options which will be applied to all steps.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
steps(map):
<stepName> (map): # Dictionary containing the step configuration. Here the key is name of the step.
imageId (int): ID of the existing image.
imageVersionId: (int | required: false): ID of the existing image version.
type (string | required: false): Type of workflow step. Currently only standard type is supported.
command (string): Command to run when step is executed.
clearImageCache (boolean | required: false): Whether to clear image cache on workflow execution.
stepTimeout (int | required: false): Time after which the step timeouts.
parents (list(str) | required: false): List containing names of steps on which this step is dependent on.
repository (map | required: false):
branch (string): Branch of the repository containing the required files.
token (string | required: false): The token to be used to clone the repository.
url (string): URL of the repository.
resources (map | required: false):
instanceTypeId (int): ID of the instance type to be used in the step.
storage (string): Storage in GB. For example, "10GB".
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
outputParamters (map | required: false):
<keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the parameter's value.
executionParameters (map | required: false):
conditional (list(map) | required: false): # List of conditions to be evaluated based on the output params of the parent steps.
- condition (string): The evaluation condition, either 'equals' or 'not-equals'.
paramName (string): Name of the output parameter to be evaluated.
stepName (string): Name of the step containing the output parameter.
value (string): Value to be compared with the output parameter.
parentStatus (list(map) | required: false): # List of conditions to be evaluated based on the status of the parent steps.
- condition (string): The evaluation condition, either 'all-of' or 'one-of'.
parents (list(str)): List of parent step names.
status (list(str)): List of parent step statuses, with valid values being 'success' and 'failure'.
runConfiguration (map | required: false):
retryOptions (map | required: false): # Step level retry options which will override the workflow level retry options.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
skipConfiguration (map | required: false):
skip (boolean | required: false): Indicates whether to skip the step. Default is false.
skipDAG (boolean | required: false): Indicates whether to skip dependent steps, including the current step. Default is false.
📝 Example usage:
peak workflows create-or-update /path/to/file.yml -v /path/to/params.yml
🆗 Response:
{
"id": 123,
"triggers": [
{
"webhook": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
]
}
Usage:
$ peak workflows create-or-update create_or_update_workflow FILE
Arguments:
FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak workflows delete
Delete a workflow.
📝 Example usage:
peak workflows delete 9999
🆗 Response:
{}
Usage:
$ peak workflows delete delete_workflow WORKFLOW_ID
Arguments:
WORKFLOW_ID
: ID of the workflow to be used in this operation. [required]
Options:
--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows describe
Describe details of a specific workflow. Workflows with only standard steps are supported.
📝 Example usage:
peak workflows describe 9999
🆗 Response:
{
"id": 9999,
"name": "workflow-name",
"createdAt": "2020-01-01T18:00:00.000Z",
"updatedAt": "2020-01-01T18:00:00.000Z",
"status": "Available",
"steps": {
"step-name": {...}
},
"lastExecution": {...},
"triggers": [...],
"watchers": [...],
"tags": [...]
}
Usage:
$ peak workflows describe describe_workflow WORKFLOW_ID
Arguments:
WORKFLOW_ID
: ID of the workflow to be used in this operation. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows execute
Start a workflow run. This allows you to pass dynamic parameters to the workflow while running it.
🧩 Input file schema(yaml):
body (map):
params (map | required: false):
global (map | required: false):
<keyName> (string | required: false): Key-Value pair. Key is the name of the param which and value is the value of the param.
stepWise (map | required: false):
<stepName> (map | required: false): # Parameters to be passed to the step with name `stepName`.
<keyName> (string | required: false): Key-Value pair. Key is the name of the param which and value is the value of the param.
stepsToRun (list(map) | required: false):
- stepName (string): Name of the step to be executed.
runDAG (boolean | required: false): Whether to run the dependent steps.
📝 Example usage:
peak workflows execute 9999 /path/to/file.yml -v /path/to/params.yml
🆗 Response:
{
"executionId": "d6116a56-6b1d-41b4-a599-fb949f08863f"
}
Usage:
$ peak workflows execute execute_workflow WORKFLOW_ID
Arguments:
WORKFLOW_ID
: ID of the workflow to be used in this operation. [required]
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak workflows get-execution-details
Get execution details for a specific workflow run.
📝 Example usage:
peak workflows get-execution-details --workflow-id <workflow_id> --execution-id <execution_id>
🆗 Response:
{
"steps": [...],
"executedAt": "2020-01-01T18:00:00.000Z",
"finishedAt": "2020-01-01T18:00:00.000Z",
"runId": "db88c21d-1add-45dd-a72e-8c6b83b68dee",
"status": "Success"
}
Usage:
$ peak workflows get-execution-details get_execution_details
Options:
--workflow-id INTEGER
: ID of the workflow to be used in this operation. [required]--execution-id TEXT
: ID of the workflow execution to be used in this operation. [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows get-execution-logs
Get execution logs for a specific workflow step.
If you want to save the logs to a file, you can use the --save
flag.
If you don’t provide a file name, the logs will be saved to a file with the name workflow_execution_logs_<workflow_id>_<execution_id>_<step_name>.log
.
If you want to view next set of logs you can pass in the nextToken
to the command.
📝 Example usage:
peak workflows get-execution-logs --workflow-id <workflow_id> --execution-id <execution_id> --step-name <step_name> --next-token <next_token>
To follow the logs, you can use the --follow
flag.
📝 Example usage to follow the logs:
peak workflows get-execution-logs --workflow-id < workflow_id > --execution-id < execution_id > --step-name < step_name > --follow
🆗 Response:
{
"stepRunStatus": "Running",
"logs": [
{
"message": "Cloning into service-workflows-api...",
"timestamp": 1697089188119
}
],
"nextToken": "f/37846375578651780454915234936364900527730394239380553728/s"
}
Usage:
$ peak workflows get-execution-logs get_execution_logs
Options:
--workflow-id INTEGER
: ID of the workflow to be used in this operation. [required]--execution-id TEXT
: ID of the workflow execution to be used in this operation. [required]--step-name TEXT
: Name of the workflow step to be used in this operation. [required]--next-token TEXT
: The token to retrieve the next set of logs.--follow / --no-follow
: Whether to follow the logs. [default: no-follow]--save / --no-save
: If set, saves the logs locally to log file. [default: no-save]--file-name TEXT
: Name or path of the file to save the logs.--paging
: If set, prints the output using the default pager.-o, --output [json]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows list
List all workflows that exist for the tenant.
📝 Example usage:
peak workflows list --page-size 10 --page-number 1 --workflow_status "Draft" --last_execution_status "Success" --last_modified_by "abc@peak.ai" --name "test"
🆗 Response:
{
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25,
"workflows": [...],
"workflowsCount": 1
}
Usage:
$ peak workflows list list_workflows
Options:
--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--workflow-status TEXT
: List of status to filter workflows. Valid values areDraft
,Running
,Available
,Paused
.--last-execution-status TEXT
: List of execution status of the latest run of the workflows to filter them by. Valid values areSuccess
,Running
,Stopped
,Stopping
,Failed
.--last-modified-by TEXT
: List of users who last modified the workflow, used to filter workflows.--name TEXT
: Workflow name to search for.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows list-default-resources
List default resources for the workflows.
📝 Example usage:
peak workflows list-default-resources
🆗 Response:
{
"instanceTypeId": 21,
"storage": "10GB"
}
Usage:
$ peak workflows list-default-resources list_workflow_default_resources
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows list-executions
List executions for the given workflow.
📝 Example usage:
peak workflows list-executions 9999 --page-size 10 --page-number 1
🆗 Response:
{
"executions": [...],
"pageSize": 25,
"pageNumber": 1,
"pageCount": 1,
"workflowId": 11876
}
Usage:
$ peak workflows list-executions list_workflow_executions WORKFLOW_ID
Arguments:
WORKFLOW_ID
: ID of the workflow to be used in this operation. [required]
Options:
--date-from TEXT
: The date after which the entities should be included (in ISO format).--date-to TEXT
: The date till which the entities should be included (in ISO format).--page-size INTEGER
: Number of entities to include per page.--page-number INTEGER
: The page number to retrieve.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows list-resources
List all available resources that can be used in workflow steps.
📝 Example usage:
peak workflows list-resources
🆗 Response:
[
{
"cpu": 0.25,
"gpu": null,
"gpuMemory": null,
"id": 21,
"memory": 0.5
}
]
Usage:
$ peak workflows list-resources list_workflow_resources
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--help
: Show this message and exit.
peak workflows patch
Update an existing workflow. Workflows with only standard steps are supported.
This command allows to efficiently modify trigger details, watchers, workflow name, and specific step attributes such as repository URL, branch, token, image ID, version ID etc.
By specifying step_names, we can globally update specified steps with provided parameters, streamlining the update process. If step_names is not provided, all the steps for that workflow would be updated.
Alternatively, we can selectively modify individual step attributes across different steps by providing the details in the yaml file. With this, we can also add new steps to the workflow by providing the parameters required by the step.
If both body and specific parameters are used, the latter takes precedence.
🧩 Input file schema(yaml):
body (map | required: false):
name (string | required: false): Name of the worklfow.
tags (list(map) | required: false):
- name (string): Name of the tag.
triggers (list(map) | required: false):
- cron (string | required: false): A valid cron expression.
webhook (boolean | required: false): Should be true if webhook type trigger is to be used.
watchers (list(map) | required: false):
- events (map):
success (boolean | required: false): Whether to call event on success.
fail (boolean | required: false): Whether to call event on success.
runtimeExceeded (int | required: false): The runtime after which event is called.
user (string | required: false): User to be notified.
webhook (map | required: false):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
retryOptions (map | required: false): # Workflow level retry options which will be applied to all steps.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
steps(map):
<stepName> (map): # Dictionary containing the step configuration. Here the key is name of the step.
imageId (int): ID of the existing image.
imageVersionId: (int | required: false): ID of the existing image version.
type (string | required: false): Type of workflow step. Currently only standard type is supported.
command (string): Command to run when step is executed.
clearImageCache (boolean | required: false): Whether to clear image cache on workflow execution.
stepTimeout (int | required: false): Time after which the step timeouts.
parents (list(str) | required: false): List containing names of steps on which this step is dependent on.
repository (map | required: false):
branch (string): Branch of the repository containing the required files.
token (string | required: false): The token to be used to clone the repository.
url (string): URL of the repository.
resources (map | required: false):
instanceTypeId (int): ID of the instance type to be used in the step.
storage (string): Storage in GB. For example, "10GB".
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
outputParamters (map | required: false):
<keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the parameter's value.
executionParameters (map | required: false):
conditional (list(map) | required: false): # List of conditions to be evaluated based on the output params of the parent steps.
- condition (string): The evaluation condition, either 'equals' or 'not-equals'.
paramName (string): Name of the output parameter to be evaluated.
stepName (string): Name of the step containing the output parameter.
value (string): Value to be compared with the output parameter.
parentStatus (list(map) | required: false): # List of conditions to be evaluated based on the status of the parent steps.
- condition (string): The evaluation condition, either 'all-of' or 'one-of'.
parents (list(str)): List of parent step names.
status (list(str)): List of parent step statuses, with valid values being 'success' and 'failure'.
runConfiguration (map | required: false):
retryOptions (map | required: false): # Step level retry options which will override the workflow level retry options.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
skipConfiguration (map | required: false):
skip (boolean | required: false): Indicates whether to skip the step. Default is false.
skipDAG (boolean | required: false): Indicates whether to skip dependent steps, including the current step. Default is false.
📝 Example usage:
peak workflows patch 9999 /path/to/file.yml -v /path/to/params.yml
📝 Example usage for updating workflow by passing only required parameters:
peak workflows patch 9999 --name <workflow_name> --image-id <image-id> --version-id <image-version-id> --step-names <step-name-1>,<step-name-2>
🆗 Response:
{
"triggers": [
{
"webhook": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
]
"id": 9999,
}
Usage:
$ peak workflows patch patch_workflow WORKFLOW_ID
Arguments:
WORKFLOW_ID
: ID of the workflow to be used in this operation. [required]
Options:
--file TEXT
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--name TEXT
: Name of the workflow--repository TEXT
: URL of the repository containing the required files.--branch TEXT
: The branch of the repository to use.--token TEXT
: The token to use to access the repository.--image-id INTEGER
: The ID of the image to use for the workflow step.--image-version-id INTEGER
: The ID of the image version to use for the workflow step.--command TEXT
: The command to run when workflow step is executed.--clear-image-cache / --no-clear-image-cache
: Whether to clear image cache on workflow execution.--step-timeout INTEGER
: The time after which the step timeouts.--instance-type-id INTEGER
: The ID of the instance type to use for the workflow step.--storage TEXT
: The storage to use for the workflow step.--step-names TEXT
: List of step names to be updated.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak workflows update
Update an existing workflow. Workflows with only standard steps are supported.
🧩 Input file schema(yaml):
body (map):
name (string): Name of the worklfow.
tags (list(map) | required: false):
- name (string): Name of the tag.
triggers (list(map) | required: false):
- cron (string | required: false): A valid cron expression.
webhook (boolean | required: false): Should be true if webhook type trigger is to be used.
watchers (list(map) | required: false):
- events (map):
success (boolean | required: false): Whether to call event on success.
fail (boolean | required: false): Whether to call event on success.
runtimeExceeded (int | required: false): The runtime after which event is called.
user (string | required: false): User to be notified.
webhook (map | required: false):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
retryOptions (map | required: false): # Workflow level retry options which will be applied to all steps.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
steps(map):
<stepName> (map): # Dictionary containing the step configuration. Here the key is name of the step.
imageId (int): ID of the existing image.
imageVersionId: (int | required: false): ID of the existing image version.
type (string | required: false): Type of workflow step. Currently only standard type is supported.
command (string): Command to run when step is executed.
clearImageCache (boolean | required: false): Whether to clear image cache on workflow execution.
stepTimeout (int | required: false): Time after which the step timeouts.
parents (list(str) | required: false): List containing names of steps on which this step is dependent on.
repository (map | required: false):
branch (string): Branch of the repository containing the required files.
token (string | required: false): The token to be used to clone the repository.
url (string): URL of the repository.
resources (map | required: false):
instanceTypeId (int): ID of the instance type to be used in the step.
storage (string): Storage in GB. For example, "10GB".
parameters (map | required: false):
env (map | required: false): Key-Value pair where key is the name of the env.
secrets (list(str) | required: false): List of secret names to be passed.
outputParamters (map | required: false):
<keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the parameter's value.
executionParameters (map | required: false):
conditional (list(map) | required: false): # List of conditions to be evaluated based on the output params of the parent steps.
- condition (string): The evaluation condition, either 'equals' or 'not-equals'.
paramName (string): Name of the output parameter to be evaluated.
stepName (string): Name of the step containing the output parameter.
value (string): Value to be compared with the output parameter.
parentStatus (list(map) | required: false): # List of conditions to be evaluated based on the status of the parent steps.
- condition (string): The evaluation condition, either 'all-of' or 'one-of'.
parents (list(str)): List of parent step names.
status (list(str)): List of parent step statuses, with valid values being 'success' and 'failure'.
runConfiguration (map | required: false):
retryOptions (map | required: false): # Step level retry options which will override the workflow level retry options.
duration (int | required: false): Duration in seconds after which the step is retried if it fails. Default is 5 seconds and maximum is 120 seconds.
exitCodes (list(int) | required: false): List of exit codes for which the step is retried. If not provided, the step is retried for all exit codes.
exponentialBackoff (boolean | required: false): Whether to use exponential backoff for retrying the step. If provided as true, the factor used will be 2.
numberOfRetries (int | required: false): Number of times the step should be retried. Default is 3 and maximum is 5.
skipConfiguration (map | required: false):
skip (boolean | required: false): Indicates whether to skip the step. Default is false.
skipDAG (boolean | required: false): Indicates whether to skip dependent steps, including the current step. Default is false.
📝 Example usage:
peak workflows update 9999 /path/to/file.yml -v /path/to/params.yml
🆗 Response:
{
"id": 123,
"triggers": [
{
"webhook": "db88c21d-1add-45dd-a72e-8c6b83b68dee"
}
]
}
Usage:
$ peak workflows update update_workflow WORKFLOW_ID FILE
Arguments:
WORKFLOW_ID
: ID of the workflow to be used in this operation. [required]FILE
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template. [required]
Options:
-v, --params-file TEXT
: Path to theyaml
file containing the parameter values map for the template file.-p, --params TEXT
: Parameters to be used with the template file. Overrides the parameters in the params file. Parameters should be in the formatkey=value
.--dry-run
: If set, prints the debug information instead of sending the actual request.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: OutputTypes.json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.