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:
alerts
: Create and manage peak alerts.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 alerts
ο
Create and manage peak alerts.
Usage:
$ peak alerts [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
emails
: Create and manage peak emails.
peak alerts emails
ο
Create and manage peak emails.
Usage:
$ peak alerts emails [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
describe
: Describe details of a specific email.describe-template
: Describe details of a specific template.list
: List all emails.list-templates
: List all the templates.send
: Send an email.
peak alerts emails describe
ο
Describe details of a specific email.
π Example usage:
peak alerts emails describe <email-id>
π Response:
{
"createdAt": "2024-01-01T00:00:00.000Z",
"createdBy": "platform@peak.ai",
"deliveredAt": "2024-01-01T00:00:00.000Z",
"id": 1,
"recipients": {
"cc": [],
"to": ["someone@peak.ai"],
"bcc": []
},
"status": "Delivered",
"statusDetails": [
{
"email": "someone@peak.ai",
"status": "Delivered",
"description": "The email was successfully delivered."
}
],
"subject": "Hello, world!",
"templateName": "template_name",
}
π API Documentation
Usage:
$ peak alerts emails describe [OPTIONS] EMAIL_ID
Arguments:
EMAIL_ID
: The ID of the email. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: json]--help
: Show this message and exit.
peak alerts emails describe-template
ο
Describe details of a specific template.
π Example usage:
peak alerts emails describe-template <template-name>
π Response:
{
"id": 1,
"createdAt": "2021-09-01T12:00:00Z",
"createdBy": "platform@peak.ai",
"name": "test_template",
"subject": "Important Account Update Information",
"body": "<h1>Hello</h1><p>Your account has been updated.</p>",
"scope": "custom"
}
π API Documentation
Usage:
$ peak alerts emails describe-template [OPTIONS] [TEMPLATE_NAME]
Arguments:
[TEMPLATE_NAME]
: The name of the email template.
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: json]--help
: Show this message and exit.
peak alerts emails list
ο
Retrieve the history of emails sent.
π Example usage:
peak alerts emails list --page-size 10 --page-number 1
π Response:
{
"emailCount": 1,
"emails": [
{
"createdAt": "2024-01-01T00:00:00.200Z",
"createdBy": "platform@peak.ai",
"id": 1,
"status": "Delivered",
"subject": "email_subject",
"templateName": "template_name",
}
],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
π API Documentation
Usage:
$ peak alerts emails list [OPTIONS]
Options:
--page-size INTEGER
: The number of emails per page.--page-number INTEGER
: The page number to retrieve.--count INTEGER
: The number of emails to retrieve.--date-from TEXT
: The date from which to retrieve emails (in ISO format).--date-to TEXT
: The date till which to retrieve emails (in ISO format).--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: json]--help
: Show this message and exit.
peak alerts emails list-templates
ο
Retrieve the email templates list.
π Example usage:
peak alerts emails list-templates --page-size 10 --page-number 1
π Response:
{
"templateCount": 1,
"templates": [
{
"id": 1,
"createdAt": "2021-09-01T12:00:00Z",
"createdBy": "platform@peak.ai",
"name": "test_template",
"scope": "custom"
}
],
"pageCount": 1,
"pageNumber": 1,
"pageSize": 25
}
π API Documentation
Usage:
$ peak alerts emails list-templates [OPTIONS]
Options:
--page-size INTEGER
: The number of emails per page.--page-number INTEGER
: The page number to retrieve.--scope TEXT
: List of type of template to filter the templates by.--name TEXT
: Email Template 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: json]--help
: Show this message and exit.
peak alerts emails send
ο
Send an email to the specified recipients using the specified template.
𧩠Input file schema(yaml):
body (map):
recipients (list(str) | required: true): List of email addresses of the recipients.
cc (list(str) | required: false): List of email addresses of the recipients to be CC'd.
bcc (list(str) | required: false): List of email addresses of the recipients to be BCC'd.
subject (str | required: true): The subject of the email.
templateName (str | required: true): The name of the email template.
templateParameters (map | required: false): The parameters for the email template.
π Example usage:
peak alerts emails send '/path/to/email.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 alerts emails send --recipients <recipient_email_1> --recipients <recipient_email_2> --subject <email_subject> --template-name <template_name> --template-parameters '{"key": "value"}'
π Response:
{
"id": 1
}
π API Documentation
Usage:
$ peak alerts emails send [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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
.--recipients TEXT
: The email addresses of the recipients.--cc TEXT
: The email addresses of the recipients to be CCβd.--bcc TEXT
: The email addresses of the recipients to be BCCβd.--subject TEXT
: The subject of the email.--template-name TEXT
: The name of the email template.--template-parameters TEXT
: The parameters for the email template. To be passed in stringified JSON format.--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: json]--help
: Show this message and exit.
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.redeploy
: Redploy 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"
}
π API Documentation
Usage:
$ peak apps deployments create [OPTIONS] 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.-n, --revision-notes-file TEXT
: Path to the file that defines the revision notes 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: 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
}
π API Documentation
Usage:
$ peak apps deployments create-revision [OPTIONS] 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:
-n, --revision-notes-file TEXT
: Path to the file that defines the revision notes 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: 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 <deployment_id>
π Response:
{}
π API Documentation
Usage:
$ peak apps deployments delete [OPTIONS] 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: 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 <deployment_id>
π Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"kind": "app",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
}
π API Documentation
Usage:
$ peak apps deployments describe [OPTIONS] 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: 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 <deployment_id> --revision <revision>
π 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": {...}
}
π API Documentation
Usage:
$ peak apps deployments describe-revision [OPTIONS]
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: 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
}
π API Documentation
Usage:
$ peak apps deployments list [OPTIONS]
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: 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": [...]
}
π API Documentation
Usage:
$ peak apps deployments list-revisions [OPTIONS] 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: json]--help
: Show this message and exit.
peak apps deployments redeploy
ο
Redeploy latest revision an App deployment.
This allows you to redeploy an App deployment that is in a failed
or warning
state, provided at least one of its block deployments is also in a failed
or warning
state.
π Example usage:
peak apps deployments redeploy <deployment_id>
π Response:
{
"deploymentId": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"revision": 2
"revisionId": "7092bd84-c35d-43c1-90ca-7510a1204dcc"
}
π API Documentation
Usage:
$ peak apps deployments redeploy [OPTIONS] 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: 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 <deployment_id> /path/to/body.yaml -v /path/to/params.yaml
π Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "app",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
}
π API Documentation
Usage:
$ peak apps deployments update-metadata [OPTIONS] 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: 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.
autoRunOnDeploy (bool | required: false): Whether to execute the resource after the app is deployed. By default it is False.
π Example usage:
peak apps specs create /path/to/body.yaml -v /path/to/params.yaml
π Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
}
π API Documentation
Usage:
$ peak apps specs create [OPTIONS] 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.-n, --release-notes-file TEXT
: Path to the file that defines the release notes 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: 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.
autoRunOnDeploy (bool | required: false): Whether to execute the resource after the app is deployed. By default it is False.
π 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"
}
}
π API Documentation
Usage:
$ peak apps specs create-release [OPTIONS] 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:
-n, --release-notes-file TEXT
: Path to the file that defines the release notes 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: 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:
{}
π API Documentation
Usage:
$ peak apps specs delete [OPTIONS] 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: 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"
}
π API Documentation
Usage:
$ peak apps specs describe [OPTIONS] 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: 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."
}
π API Documentation
Usage:
$ peak apps specs describe-release [OPTIONS]
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: 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
}
π API Documentation
Usage:
$ peak apps specs list [OPTIONS]
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: 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": [...]
}
π API Documentation
Usage:
$ peak apps specs list-releases [OPTIONS]
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: 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"
}
π API Documentation
Usage:
$ peak apps specs update-metadata [OPTIONS] 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: 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
}
π API Documentation
Usage:
$ peak artifacts create [OPTIONS] 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: 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
}
π API Documentation
Usage:
$ peak artifacts create-version [OPTIONS] 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: 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:
{}
π API Documentation
Usage:
$ peak artifacts delete [OPTIONS] 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: 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:
{}
π API Documentation
Usage:
$ peak artifacts delete-version [OPTIONS] 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: 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": [...]
}
π API Documentation
Usage:
$ peak artifacts describe [OPTIONS] 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: 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
π API Documentation
Usage:
$ peak artifacts download [OPTIONS] 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
}
π API Documentation
Usage:
$ peak artifacts list [OPTIONS]
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: 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:
{}
π API Documentation
Usage:
$ peak artifacts update-metadata [OPTIONS] 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: 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.redeploy
: Redeploy a Block deployment.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"
}
π API Documentation
Usage:
$ peak blocks deployments create [OPTIONS] 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.-n, --revision-notes-file TEXT
: Path to the file that defines the revision notes 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: 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
}
π API Documentation
Usage:
$ peak blocks deployments create-revision [OPTIONS] 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:
-n, --revision-notes-file TEXT
: Path to the file that defines the revision notes 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: 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 <deployment_id>
π Response:
{}
π API Documentation
Usage:
$ peak blocks deployments delete [OPTIONS] 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: 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 <deployment_id>
π Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"kind": "app",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
"parameters": {...}
}
π API Documentation
Usage:
$ peak blocks deployments describe [OPTIONS] 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: 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 <deployment_id> --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": {...}
}
π API Documentation
Usage:
$ peak blocks deployments describe-revision [OPTIONS]
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: 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:
{...}
π API Documentation
Usage:
$ peak blocks deployments get-parameters [OPTIONS]
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: 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
}
π API Documentation
Usage:
$ peak blocks deployments list [OPTIONS]
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: 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": [...]
}
π API Documentation
Usage:
$ peak blocks deployments list-revisions [OPTIONS] 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: 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 <deployment-id> /path/to/body.yaml -v /path/to/params.yaml
π Response:
{...}
π API Documentation
Usage:
$ peak blocks deployments patch-parameters [OPTIONS] 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: json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.
peak blocks deployments redeploy
ο
Redeploy latest revision of a Block deployment. This allows you to redeploy a Block deployment that is in failed
or warning
state.
π Example usage:
peak blocks deployments redeploy <deployment_id>
π Response:
{
"deploymentId": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb",
"revision": 2
"revisionId": "7092bd84-c35d-43c1-90ca-7510a1204dcc"
}
π API Documentation
Usage:
$ peak blocks deployments redeploy [OPTIONS] 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: json]--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 <deployment_id> /path/to/body.yaml -v /path/to/params.yaml
π Response:
{
"id": "632a4e7c-ab86-4ecb-8f34-99b5da531ceb"
"kind": "workflow",
"latestRevision": {...},
"metadata": {...},
"spec": {...}
}
π API Documentation
Usage:
$ peak blocks deployments update-metadata [OPTIONS] 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: 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.
autoRunOnDeploy (bool | required: false): Whether to execute the resource after the block is deployed. By default it is False.
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): # For Workflow Block
images(map | required: false):
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):
<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 in minutes after which event is called.
user (string): User to be notified.
- 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 in minutes after which event is called.
webhook (map):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
- 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 in minutes after which event is called.
email (map):
name (string): Name of the email watcher.
recipients (map):
to (list(str)): List of email addresses to send the email to. Email can be sent only to the users who are added in the tenant.
config (map): # For Service Block. One of "image" or "imageDetails" is required.
serviceType (string): Type of the service. Should be one of "web-app" or "api". It is "web-app" by default.
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 | required: false): ID of the existing image version. If not provided, the latest version will be used.
resources (map | required: false): To be used only in case of service block.
instanceTypeId (int): ID of the instance type to be used in the service block.
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): Whether to enable session stickiness for the service. It is false by default. To be used only in case of service block of type web-app.
entrypoint (string | required: false): Entry point for the service.
healthCheckURL (string | required: false): URL to check the health of the service.
minInstances (number | required: false): Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.
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 "boolean", "string", "string_array", "number", "number_array", "object" and "object_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"
}
π API Documentation
Usage:
$ peak blocks specs create [OPTIONS] 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.-n, --release-notes-file TEXT
: Path to the file that defines the release notes 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: 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): # For Workflow Block
images(map | required: false):
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):
<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 in minutes after which event is called.
user (string): User to be notified.
- 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 in minutes after which event is called.
webhook (map):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
- 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 in minutes after which event is called.
email (map):
name (string): Name of the email watcher.
recipients (map):
to (list(str)): List of email addresses to send the email to. Email can be sent only to the users who are added in the tenant.
config (map): # For Service Block. One of "image" or "imageDetails" is required.
serviceType (string): Type of the service. Should be one of "web-app" or "api". It is "web-app" by default.
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 | required: false): ID of the existing image version. If not provided, the latest version will be used.
resources (map | required: false):
instanceTypeId (int): ID of the instance type to be used in the service block.
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): Whether to enable session stickiness for the service. It is false by default. To be used only in case of service block of type web-app.
entrypoint (string | required: false): Entry point for the service.
healthCheckURL (string | required: false): URL to check the health of the service.
minInstances (number | required: false): Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.
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 "boolean", "string", "string_array", "number", "number_array", "object" and "object_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.
autoRunOnDeploy (bool | required: false): Whether to execute the resource after the block is deployed. By default it is False.
π 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"
}
}
π API Documentation
Usage:
$ peak blocks specs create-release [OPTIONS] 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:
-n, --release-notes-file TEXT
: Path to the file that defines the release notes 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: 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:
{}
π API Documentation
Usage:
$ peak blocks specs delete [OPTIONS] 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: 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"
}
π API Documentation
Usage:
$ peak blocks specs describe [OPTIONS] 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: 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",
"autoRunOnDeploy": false,
"parameters": {...},
}
π API Documentation
Usage:
$ peak blocks specs describe-release [OPTIONS]
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: 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
}
π API Documentation
Usage:
$ peak blocks specs list [OPTIONS]
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: 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": [...]
}
π API Documentation
Usage:
$ peak blocks specs list-releases [OPTIONS]
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: 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"
}
π API Documentation
Usage:
$ peak blocks specs update-metadata [OPTIONS] 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: 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:
execute-resources
: Execute the resources of an app or block deploymentlist
: List App and Block deployments.
peak deployments execute-resources
ο
Execute the resources of an app or block deployment. This will execute the resources of the latest revision of the deployment for which autoRunOnDeploy
property is enabled.
π Example usage:
peak deployments execute-resources <deployment_id>
π Response:
{
"executeResponse": [
{
"blockSpecId": "0bddb4c6-40c5-45c3-b477-fceb2c051609",
"version": "1.0.0",
"executionId": "a3e77006-86f3-4829-8c43-f21ad462dbbd",
"status": "executed"
}
]
}
Usage:
$ peak deployments execute-resources [OPTIONS] DEPLOYMENT_ID
Arguments:
DEPLOYMENT_ID
: ID of the app or block deployment to execute resources for. [required]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: json]--help
: Show this message and exit.
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
}
π API Documentation
Usage:
$ peak deployments list [OPTIONS]
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: 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. Allowed values are 'workflow', 'workspace-r', 'workspace-python, 'api' and 'webapp'.
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,
}
π API Documentation
Usage:
$ peak images create [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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
.--name TEXT
: Name of the image.--version TEXT
: A valid semantic image version.--type TEXT
: Type of the image. Allowed values are βworkflowβ, βworkspace-rβ, βworkspace-python, βapiβ, βwebappβ.--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. Allowed values are βgithubβ, βdockerfileβ and βuploadβ.--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: 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. Allowed values are 'workflow', 'workspace-r', 'workspace-python, 'api' and 'webapp'.
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,
}
π API Documentation
Usage:
$ peak images create-or-update [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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
.--name TEXT
: Name of the image.--version TEXT
: A valid semantic image version.--type TEXT
: Type of the image. Allowed values are βworkflowβ, βworkspace-rβ, βworkspace-python, βapiβ, βwebappβ.--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. Allowed values are βgithubβ, βdockerfileβ and βuploadβ.--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: 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 <imageId> '/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 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"
}
π API Documentation
Usage:
$ peak images create-version [OPTIONS] IMAGE_ID [FILE]
Arguments:
IMAGE_ID
: ID of the image 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.
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
.--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. Allowed values are βgithubβ, βdockerfileβ and βuploadβ.--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: 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:
{}
π API Documentation
Usage:
$ peak images delete [OPTIONS] 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: 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:
{}
π API Documentation
Usage:
$ peak images delete-version [OPTIONS]
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: 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:
{}
π API Documentation
Usage:
$ peak images delete-versions [OPTIONS]
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: 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": {...}
}
π API Documentation
Usage:
$ peak images describe [OPTIONS] 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: 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": [...]
}
π API Documentation
Usage:
$ peak images describe-version [OPTIONS]
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: 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"
}
π API Documentation
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: 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
}
π API Documentation
Usage:
$ peak images list [OPTIONS]
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. Valid values arecustom
andglobal
.--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: 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
}
π API Documentation
Usage:
$ peak images list-builds [OPTIONS] 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. Valid values arebuilding
,failed
,success
,stopped
,stopping
.--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: 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
}
π API Documentation
Usage:
$ peak images list-versions [OPTIONS] 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: 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"
}
π API Documentation
Usage:
$ peak images update-version [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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]-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. Allowed values are βgithubβ, βdockerfileβ and βuploadβ.--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: 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.
minInstances (number | required: false): Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.
π Example usage:
peak services create '/path/to/file.yml' -v '/path/to/params.yml'
π Example usage without yaml:
peak services create --name <name> --title <title> --description <description> --service-type web-app --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
Usage:
$ peak services create [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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
.--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.--min-instances INTEGER
: Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.--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: 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.
minInstances (number | required: false): Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.
π 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 [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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
.--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.--min-instances INTEGER
: Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.--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: 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"
}
π API Documentation
Usage:
$ peak services delete [OPTIONS] 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: 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",
"entrypoint": "/",
"healthCheckURL": "/health",
"minInstances": 1,
"tags": [...]
}
π API Documentation
Usage:
$ peak services describe [OPTIONS] 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: 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
}
π API Documentation
Usage:
$ peak services list [OPTIONS]
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: 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 <service-name> '/path/to/file.yml' -v '/path/to/params.yml'
π Example usage without yaml:
peak services test <service-name> --http-method 'get' --path '/'
π Response:
{
"responseBody": "{"status": "OK"}",
"responseStatus": 200,
"reqStartTime": "2024-01-01T10:00:01.064Z",
"reqEndTime": "2024-01-01T10:00:05.064Z",
"responseSize": "1KB"
}
π API Documentation
Usage:
$ peak services test [OPTIONS] SERVICE_NAME [FILE]
Arguments:
SERVICE_NAME
: Name of the service 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.
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
.--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: 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.
minInstances (number | required: false): Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.
π Example usage:
peak services update <service-id> '/path/to/file.yml' -v '/path/to/params.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"
}
π API Documentation
Usage:
$ peak services update [OPTIONS] SERVICE_ID [FILE]
Arguments:
SERVICE_ID
: ID of the service 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.
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
.--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.--min-instances INTEGER
: Minimum number of instances that would run for a service. Default value is 1 and maximum value allowed is 2.--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: 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
}
π API Documentation
Usage:
$ peak specs list [OPTIONS]
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: json]--help
: Show this message and exit.
peak specs list-release-deployments
ο
List all the deployments for a given spec. Version is optional and if not provided, all deployments for the spec will be returned.
π 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,
}
π API Documentation
Usage:
$ peak specs list-release-deployments [OPTIONS]
Options:
--spec-id TEXT
: ID of the spec to be used in this operation. [required]--version TEXT
: The release version of the spec in valid semantic versioning format.--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: 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:
get-credentials
: Get credentails for a data store.list-instance-options
: List tenant instance options.
peak tenants get-credentials
ο
Get credentials for the given data store type.
π Example Usage:
peak tenants get-credentials --data-store-type data-warehouse
π Response:
{
"application": "application",
"connectionString": "snowflake://host/database?authenticator=OAUTH&token=generated-access-token",
"integration": "integration_name",
"port": 443,
"role": "role_name",
"schema": "schema",
"warehouse": "warehouse",
"accessToken": "generated-access-token",
"authType": "oauth",
"database": "database",
"host": "host",
"dataWarehouseType": "snowflake"
}
π API Documentation
Usage:
$ peak tenants get-credentials [OPTIONS]
Options:
--data-store-type TEXT
: Data store type. The only allowed values is data-warehouse.-o, --output [json|yaml]
: The output format to display data in. [default: json]--help
: Show this message and exit.
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": "General Purpose",
"memory": 125,
"name": "Pico (0.125CPU, 0.125GB RAM)",
"provider": "k8s",
"providerInstanceId": null
}
]
}
π API Documentation
Usage:
$ peak tenants list-instance-options [OPTIONS]
Options:
--entity-type TEXT
: Entity type to be used in this operation (e.g. -workflow
,webapp
,api-deployment
). [required]--paging
: If set, prints the output using the default pager.-o, --output [json|yaml|table]
: The output format to display data in. [default: 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 [OPTIONS]
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: 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"
}
π API Documentation
Usage:
$ peak webapps create [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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
.--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: 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"
}
π API Documentation
Usage:
$ peak webapps create-or-update [OPTIONS] [FILE]
Arguments:
[FILE]
: Path to the file that defines the body for this operation, supports bothyaml
file or ajinja
template.
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
.--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: 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"
}
π API Documentation
Usage:
$ peak webapps delete [OPTIONS] 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: 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": [...]
}
π API Documentation
Usage:
$ peak webapps describe [OPTIONS] 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: 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
}
π API Documentation
Usage:
$ peak webapps list [OPTIONS]
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: 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 <webapp-id> '/path/to/file.yml' -v '/path/to/params.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"
}
π API Documentation
Usage:
$ peak webapps update [OPTIONS] WEBAPP_ID [FILE]
Arguments:
WEBAPP_ID
: ID of the webapp 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.
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
.--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: 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 failure.
runtimeExceeded (int | required: false): The runtime in minutes after which event is called.
user (string): User to be notified.
- 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 in minutes after which event is called.
webhook (map):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
- 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 in minutes after which event is called.
email (map):
name (string): Name of the email watcher.
recipients (map):
to (list(str)): List of email addresses to send the email to. Email can be sent only to the users who are added in the tenant.
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"
}
]
}
π API Documentation
Usage:
$ peak workflows create [OPTIONS] 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: 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 failure.
runtimeExceeded (int | required: false): The runtime in minutes after which event is called.
user (string): User to be notified.
- 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 in minutes after which event is called.
webhook (map):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
- 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 in minutes after which event is called.
email (map):
name (string): Name of the email watcher.
recipients (map):
to (list(str)): List of email addresses to send the email to. Email can be sent only to the users who are added in the tenant.
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"
}
]
}
π API Documentation
Usage:
$ peak workflows create-or-update [OPTIONS] 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: 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:
{}
π API Documentation
Usage:
$ peak workflows delete [OPTIONS] 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: 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": [...]
}
π API Documentation
Usage:
$ peak workflows describe [OPTIONS] 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: 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"
}
π API Documentation
Usage:
$ peak workflows execute [OPTIONS] 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.
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: 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"
}
π API Documentation
Usage:
$ peak workflows get-execution-details [OPTIONS]
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: 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"
}
π API Documentation
Usage:
$ peak workflows get-execution-logs [OPTIONS]
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: 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
}
π API Documentation
Usage:
$ peak workflows list [OPTIONS]
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: 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"
}
π API Documentation
Usage:
$ peak workflows list-default-resources [OPTIONS]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: 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 --status "Running" --status "Failed"
π Response:
{
"executions": [...],
"pageSize": 25,
"pageNumber": 1,
"pageCount": 1,
"workflowId": 11876
}
π API Documentation
Usage:
$ peak workflows list-executions [OPTIONS] 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).--status TEXT
: List of workflow execution statuses. Valid values areSuccess
,Running
,Stopped
,Stopping
andFailed
.--count INTEGER
: Number of workflow executions required in the provided time range or 90 days. If not provided, all executions are returned.--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: 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
}
]
π API Documentation
Usage:
$ peak workflows list-resources [OPTIONS]
Options:
--paging
: If set, prints the output using the default pager.-o, --output [json|yaml]
: The output format to display data in. [default: 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 failure.
runtimeExceeded (int | required: false): The runtime in minutes after which event is called.
user (string): User to be notified.
- 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 in minutes after which event is called.
webhook (map):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
- 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 in minutes after which event is called.
email (map):
name (string): Name of the email watcher.
recipients (map):
to (list(str)): List of email addresses to send the email to. Email can be sent only to the users who are added in the tenant.
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 [OPTIONS] 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.
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
.--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: 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 failure.
runtimeExceeded (int | required: false): The runtime in minutes after which event is called.
user (string): User to be notified.
- 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 in minutes after which event is called.
webhook (map):
name (string): Name of the webhook.
url (string): URL of the webhook.
payload (string): Webhook payload.
- 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 in minutes after which event is called.
email (map):
name (string): Name of the email watcher.
recipients (map):
to (list(str)): List of email addresses to send the email to. Email can be sent only to the users who are added in the tenant.
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"
}
]
}
π API Documentation
Usage:
$ peak workflows update [OPTIONS] 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: json]--generate
: Generate Sample YAML that can be used in this operation.--help
: Show this message and exit.