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.

  • metrics: Manage Metrics.

  • 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.
    attachments (list(str) | required: false): The path of files to be sent as email attachments. A maximum of 3 files can be included, with each file not exceeding 10 MB. Supported file formats are: .pdf, .docx, .doc, .csv, .txt, .xlsx, .xls, and .zip.

 πŸ“ 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"}' --attachments model.txt --attachments outputs

 πŸ†— 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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.

  • --attachments TEXT: The path of files to be sent as the mail attachments.

  • --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.
    appParameters (map | required: false):
        build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
        run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
    parameters (map | required: false):
        <blockName> (map): Dictionary of parameters specific to each block, where each key represents the block name.
            build (map | required: false): Dictionary of parameters for the block's 'build' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
            run (map | required: false): Dictionary of parameters for the block's 'run' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
    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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -n, --revision-notes-file TEXT: Path to the file that defines the revision notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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):
    appParameters (map | required: false):
        build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
        run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
    parameters (map | required: false):
        <blockName> (map): Dictionary of parameters specific to each block, where each key represents the block name.
            build (map | required: false): Dictionary of parameters for the block's 'build' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
            run (map | required: false): Dictionary of parameters for the block's 'run' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
    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 both yaml file or a jinja template. [required]

Options:

  • -n, --revision-notes-file TEXT: Path to the file that defines the revision notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 are deploying, deployed, deleting, delete_failed, failed, platform_resource_error, redeploying, rollback, rollback_complete, rollback_failed, and warning.

  • --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 are deleting, delete_failed, deployed, deploying, failed, platform_resource_error, rollback, rollback_complete, rollback_failed and superseded

  • --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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.
  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.

 πŸ“ 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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -n, --release-notes-file TEXT: Path to the file that defines the release notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.
  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.

 πŸ“ 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 both yaml file or a jinja template. [required]

Options:

  • -n, --release-notes-file TEXT: Path to the file that defines the release notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 are available, unavailable and archived.

  • --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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.
  source (str | required: false): Source of the artifact.
  scan (bool | required: false): Whether to scan the artifact for vulnerabilities.
  validate (bool | required: false): Whether to validate the artifact. Source needs to be provided for the validation to work.
  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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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):

  scan (bool | required: false): Whether to scan the artifact for vulnerabilities.
  validate (bool | required: false): Whether to validate the artifact. Source needs to be present in the artifact for the validation to work.
  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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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):
        build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
        run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
    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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -n, --revision-notes-file TEXT: Path to the file that defines the revision notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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):
        build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
        run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
    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 both yaml file or a jinja template. [required]

Options:

  • -n, --revision-notes-file TEXT: Path to the file that defines the revision notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 are deploying, deployed, deleting, delete_failed, failed, platform_resource_error, redeploying, rollback, rollback_complete, rollback_failed, and warning.

  • --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 are deleting, delete_failed, deployed, deploying, failed, platform_resource_error, rollback, rollback_complete, rollback_failed and superseded

  • --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): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).

 πŸ“ 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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.
    # Workflow Block
    config (map):
        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.
                # Standard 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. This should be 'standard' for a Standard Step which is the default value.
                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".
                outputParameters (map | required: false):
                    <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the file name where the output is stored.
                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.
                # HTTP Step
                type (string | required: false): Type of workflow step. This should be 'http' for a HTTP Step.
                method (string | required: true): The HTTP method to be used for the API call. Should be one of - get, post, put, patch, and delete
                url (string | required: true): The URL to make the HTTP API call to.
                payload (string | required: false): Stringified JSON payload to be sent in case of non-get requests.
                headers (map | required: false):
                    absolute (map | required: false): Key-Value pair where key is the name of the header and value is the value of the header.
                    secrets (map | required: false): Key-Value pair where key is the name of the header and value is the name of the secret to get the value from.
                auth (map | required: false):
                    type (string | required: true): The type of authentication to use. Should be one of - no-auth, oauth, basic, api-key, and bearer-token.
                    clientId (string | required: false): The Client ID used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                    clientSecret (string | required: false): The Client Secret used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                    authUrl (string | required: false): The URL that is hit to get the access token in case of OAuth. Required when type is oauth.
                    username (string | required: false): The username used for basic authentication. Required when type is basic.
                    password (string | required: false): The password used for basic authentication. Value should be the name of a secret. Required when type is basic.
                    apiKey (string | required: false): The API Key used for authentication. Value should be the name of a secret. Required when type is api-key.
                    bearerToken (string | required: false): The bearer token used for authentication. Value should be the name of a secret. Required when type is bearer-token.
                parameters (map | required: false):
                    env (map | required: false): Key-Value pair where key is the name of the env.
                    inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                    secrets (list(str) | required: false): List of secret names to be passed.
                outputParameters (map | required: false):
                    <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name. Note that in case of HTTP step, value should always be "response.txt", otherwise this parameter would be rejected.
                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.
                # Export Step
                type (string | required: true): Type of workflow step. This should be 'export' for a export Step.
                schema (string | required: true): Schema from which the data is to be exported.
                table (string | required: true): Table from which the data is to be exported.
                sortBy (string | required: true): Column name by which the data is to be sorted.
                sortOrder (string | required: false): Order in which the data is to be sorted. Should be one of - asc, desc. Default is asc.
                compression (boolean | required: false): Whether to compress the files to '.gz' format while exporting. Default is false.
                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.
                # SQL Step
                type (string | required: true): Type of workflow step. This should be 'sql' for a sql Step.
                sqlQueryPath (string | required: false): Path to the SQL query file. One of the 'sqlQueryPath' or 'repository' is required.
                repository (map | required: false):
                    branch (string | required: true): Branch of the repository containing the required files.
                    token (string | required: false): The token to be used to clone the repository.
                    url (string | required: true): URL of the repository.
                    filePath (string | required: true): Path to the file containing the SQL query.
                parameters (map | required: false):
                    env (map | required: false): Key-Value pair where key is the name of the env.
                    inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                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.
        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.
    # Service Block
    config (map): # 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.
        scaleToZero (boolean | required: false): Enable scale to zero for the service. Only applicable for web-app type services. Default value is false. Enabling Scale to zero ensures that the resources hosting your app are scaled down when ideal over a period of time. The resources will scale back up automatically on next launch.
        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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -n, --release-notes-file TEXT: Path to the file that defines the release notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.
    # Workflow Block
    config (map):
        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.
                # Standard 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. This should be 'standard' for a Standard Step which is the default value.
                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.
                    inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                    secrets (list(str) | required: false): List of secret names to be passed.
                outputParameters (map | required: false):
                    <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the file name where the output is stored.
                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".
                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.
                # HTTP Step
                type (string | required: false): Type of workflow step. This should be 'http' for a HTTP Step.
                method (string | required: true): The HTTP method to be used for the API call. Should be one of - get, post, put, patch, and delete
                url (string | required: true): The URL to make the HTTP API call to.
                payload (string | required: false): Stringified JSON payload to be sent in case of non-get requests.
                headers (map | required: false):
                    absolute (map | required: false): Key-Value pair where key is the name of the header and value is the value of the header.
                    secrets (map | required: false): Key-Value pair where key is the name of the header and value is the name of the secret to get the value from.
                auth (map | required: false):
                    type (string | required: true): The type of authentication to use. Should be one of - no-auth, oauth, basic, api-key, and bearer-token.
                    clientId (string | required: false): The Client ID used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                    clientSecret (string | required: false): The Client Secret used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                    authUrl (string | required: false): The URL that is hit to get the access token in case of OAuth. Required when type is oauth.
                    username (string | required: false): The username used for basic authentication. Required when type is basic.
                    password (string | required: false): The password used for basic authentication. Value should be the name of a secret. Required when type is basic.
                    apiKey (string | required: false): The API Key used for authentication. Value should be the name of a secret. Required when type is api-key.
                    bearerToken (string | required: false): The bearer token used for authentication. Value should be the name of a secret. Required when type is bearer-token.
                parameters (map | required: false):
                    env (map | required: false): Key-Value pair where key is the name of the env.
                    inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                    secrets (list(str) | required: false): List of secret names to be passed.
                outputParameters (map | required: false):
                    <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name. Note that in case of HTTP step, value should always be "response.txt", otherwise this parameter would be rejected.
                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.
                # Export Step
                type (string | required: true): Type of workflow step. This should be 'export' for a export Step.
                schema (string | required: true): Schema from which the data is to be exported.
                table (string | required: true): Table from which the data is to be exported.
                sortBy (string | required: true): Column name by which the data is to be sorted.
                sortOrder (string | required: false): Order in which the data is to be sorted. Should be one of - asc, desc. Default is asc.
                compression (boolean | required: false): Whether to compress the files to '.gz' format while exporting. Default is false.
                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.
                # SQL Step
                type (string | required: true): Type of workflow step. This should be 'sql' for a sql Step.
                sqlQueryPath (string | required: false): Path to the SQL query file. One of the 'sqlQueryPath' or 'repository' is required.
                repository (map | required: false):
                    branch (string | required: true): Branch of the repository containing the required files.
                    token (string | required: false): The token to be used to clone the repository.
                    url (string | required: true): URL of the repository.
                    filePath (string | required: true): Path to the file containing the SQL query.
                parameters (map | required: false):
                    env (map | required: false): Key-Value pair where key is the name of the env.
                    inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                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.
        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.
    # Service Block
    config (map): # 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.
        scaleToZero (boolean | required: false): Enable scale to zero for the service. Only applicable for web-app type services. Default value is false. Enabling Scale to zero ensures that the resources hosting your app are scaled down when ideal over a period of time. The resources will scale back up automatically on next launch.
        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 both yaml file or a jinja template. [required]

Options:

  • -n, --release-notes-file TEXT: Path to the file that defines the release notes for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 are available, unavailable and archived.

  • --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 both yaml file or a jinja template. [required]

Options:

  • -d, --desc-file TEXT: Path to the file that defines the description for this operation, supports md, and txt files only.

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 deployment

  • list: List App and Block deployments.

  • patch-parameters: Update the parameters for a deployment at run time.

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 are deploying, deployed, deleting, delete_failed, failed, platform_resource_error, redeploying, rollback, rollback_complete, rollback_failed, and warning.

  • --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 deployments patch-parameters

Update the parameters for a deployment at run time.

 🧩 Input file schema (yaml):

body (map): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).

 πŸ“ Example usage:

peak deployments patch-parameters <deployment-id> /path/to/body.yaml -v /path/to/params.yaml

 πŸ†— Response:

{...}

πŸ”— API Documentation

Usage:

$ peak 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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 are not-ready, ready, in-use, deleting, delete-failed.

  • --scope TEXT: List of type of image to filter the images by. Valid values are custom and global.

  • --last-build-status TEXT: List of build status of the latest version to filter the images by. Valid values are building, 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 are building, 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 are not-ready, ready, in-use, deleting, delete-failed.

  • --last-build-status TEXT: List of build statuses to filter the versions by. Valid values are building, 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 both yaml file or a jinja 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 the yaml 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 format key=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 metrics

Metrics commands.

Usage:

$ peak metrics [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • create-collection: Create metrics collection.

  • delete: Delete the metrics.

  • delete-collection: Delete metrics collection.

  • list: List metrics.

  • list-collections: List metrics collections.

  • list-namespaces: List namespaces.

  • publish: Publish metrics.

  • query: Query metrics.

peak metrics create-collection

Create metrics collection.

 🧩 Input file schema(yaml):

  body (map):
    name (str): Name of the metric collection.
    scope (str): Scope of the metrics artifact.
    description (str | required: false): Description of the metric collection.
  artifact (map):
    path (str): Path to the artifact.

 πŸ“ Example usage:

peak metrics create-collection '/path/to/metrics.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 metrics create-collection --artifact-path <path> --name <name> --scope <scope> --description <description>

 πŸ†— Response:

{
    "artifactId": "7dc0feaa-be90-467b-9c3a-009a234e4b2b",
    "collectionId": "bc8b6ef5-d2f6-4b7f-9365-0261b43997c9",
}

πŸ”— API Documentation

Usage:

$ peak metrics create-collection [OPTIONS] [FILE]

Arguments:

  • [FILE]: Path to the file that defines the body for this operation, supports both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=value.

  • --name TEXT: Name of the metric collection.

  • --scope TEXT: Scope of the metrics collection. Must be one of the following: PUBLIC, PRIVATE.

  • --description TEXT: Description of the metric collection.

  • --artifact-path TEXT: Path to the artifact.

  • --dry-run: If set, prints the debug information instead of sending the actual request.

  • -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 metrics delete

Delete one or more measures.

Measures can either be deleted by passing a namespace and a list of measures or by giving a publication id which would delete all the measures associated with that publication. If both are passed, publication id takes priority.

 πŸ“ Example usage:

# Delete using namespace and measure names
peak metrics delete --namespace <namespace> --measures <measure> --measures <measure>
# Delete using publication id
peak metrics delete --publication-id

 πŸ†— Response:

{}

πŸ”— API Documentation

Usage:

$ peak metrics delete [OPTIONS]

Options:

  • --namespace TEXT: The namespace associated with the metrics. If not provided, the default namespace is used.

  • --measures TEXT: An array of measures to delete.

  • --publication-id TEXT: The publication ID associated with the metrics.

  • --dry-run: If set, prints the debug information instead of sending the actual request.

  • -o, --output [json|yaml]: The output format to display data in. [default: json]

  • --help: Show this message and exit.

peak metrics delete-collection

Delete metrics collection.

 πŸ“ Example usage:

peak metrics delete-collection <collection_id>

 πŸ†— Response:

{}

πŸ”— API Documentation

Usage:

$ peak metrics delete-collection [OPTIONS] COLLECTION_ID

Arguments:

  • COLLECTION_ID: ID of the metric collection. [required]

Options:

  • --dry-run: If set, prints the debug information instead of sending the actual request.

  • -o, --output [json|yaml]: The output format to display data in. [default: json]

  • --help: Show this message and exit.

peak metrics list

List metrics in the semantic layer.

 πŸ“ Example usage:

peak metrics list --page-size 25 --page-number 1 --namespace <namespace> --type <type>

 πŸ†— Response:

{
    "data": [
        {
            "name": "product",
            "type": "cube",
            "public": true,
            "measures": [
                {
                    "name": "product.max_price",
                    "type": "number",
                    "aggType": "max",
                    "public": true
                },
                {
                    "name": "product.max_discount",
                    "type": "number",
                    "aggType": "max",
                    "public": true
                },
            ],
            "dimensions": [
                {
                    "name": "product.sale",
                    "type": "string",
                    "public": true,
                    "primaryKey": true
                },
                {
                    "name": "order.created_at",
                    "type": "time",
                    "public": true,
                    "primaryKey": false
                },
            ],
            "segments": [],
            "collectionId": "b8d8308e-4f45-42e5-9c08-d4c4ba6db7f6",
            "publicationId": "299e7d07-db2f-4050-88c3-40afd7603807"
        }
    ],
    "pageCount": 1,
    "pageNumber": 1,
    "pageSize": 25,
    "totalCount": 2
}

πŸ”— API Documentation

Usage:

$ peak metrics list [OPTIONS]

Options:

  • --page-size INTEGER: Number of entities to include per page.

  • --page-number INTEGER: The page number to retrieve.

  • --namespace TEXT: The namespace associated with the metrics. If not provided, the default namespace is used.

  • --type TEXT: The type of metric to create. If not provided, all metrics are retrieved. Available types are cube, view, dimension, measure, segment and all.

  • --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 metrics list-collections

List metrics collections.

 πŸ“ Example usage:

peak metrics list-collections --page-size 25 --page-number 1 --id <collection_id_1> --id <collection_id_2> --scope <scope>

 πŸ†— Response:

{
    "collections": [
        {
            "id": "b8d8308e-4f45-42e5-9c08-d4c4ba6db7f6",
            "name": "product",
            "tenant": "tenant-name",
            "scope": "PUBLIC",
            "description": "Product metrics",
            "artifactId": "7dc0feaa-be90-467b-9c3a-009a234e4b2b",
            "createdAt": "2024-01-26T00:00:00Z",
            "createdBy": "someone@peak.ai",
            "updatedAt": "2024-01-26T00:00:00Z",
            "updatedBy": "someone@peak.ai"
        }
    ],
    "pageCount": 1,
    "pageNumber": 1,
    "pageSize": 25,
    "totalCount": 1
}

πŸ”— API Documentation

Usage:

$ peak metrics list-collections [OPTIONS]

Options:

  • --page-size INTEGER: Number of entities to include per page.

  • --page-number INTEGER: The page number to retrieve.

  • --id TEXT: An array of collection IDs to include in the query. If not provided, all collections are retrieved.

  • --scope TEXT: An array of scopes to filter the collections by. Available scopes are PUBLIC and PRIVATE. If not provided, all collections of the tenant along with all public collections are retrieved.

  • --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 metrics list-namespaces

List namespaces.

 πŸ“ Example usage:

peak metrics list-namespaces --page-size 25 --page-number 1

 πŸ†— Response:

{
    "namespaces": [
        {
            "name": "default",
            "models": [
                {
                    "name": "stocks",
                    "publicationId": "5503a4df-fa33-4932-9f60-9e3930f37f65",
                    "type": "cube"
                }
            ]
        }
    ],
    "pageCount": 1,
    "pageNumber": 1,
    "pageSize": 25,
    "totalCount": 1
}

πŸ”— API Documentation

Usage:

$ peak metrics list-namespaces [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 metrics publish

Publish metrics.

The metrics can be published either by passing artifact and namespace, or by passing collection_id and namespace. If both artifact and collection_id are provided, artifact takes priority. If the namespace is not provided, the β€˜default’ namespace is used.

 🧩 Input file schema(yaml):

Publish metrics using artifact and namespace

  body (map):
    namespace (str): The namespace associated with the metrics.
  artifact (map):
    path (str): Path to the artifact.

Publish metrics using collection id and namespace

  body (map):
    namespace (str): The namespace associated with the metrics.
  collectionId (str): The ID of the collection to publish the metrics.

 πŸ“ Example usage:

peak metrics publish '/path/to/metrics.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:

# Publish metrics using artifact and namespace
peak metrics publish --artifact-path <path> --namespace <namespace>
# Publish metrics using collection id and namespace
peak metrics publish --collection-id <collection-id> --namespace <namespace>

 πŸ†— Response:

{
    "artifactId": "7dc0feaa-be90-467b-9c3a-009a234e4b2b",
    "collectionId": "bc8b6ef5-d2f6-4b7f-9365-0261b43997c9",
    "publicationId": "79af8462-2820-483c-a8b6-d697555a8fc2",
}

πŸ”— API Documentation

Usage:

$ peak metrics publish [OPTIONS] [FILE]

Arguments:

  • [FILE]: Path to the file that defines the body for this operation, supports both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=value.

  • --namespace TEXT: The namespace where you intend to publish the metrics. If not provided, the default namespace is used.

  • --artifact-path TEXT: Path to the artifact.

  • --collection-id TEXT: The ID of the collection to publish the metrics.

  • --dry-run: If set, prints the debug information instead of sending the actual request.

  • -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 metrics query

Query a published metric in the semantic layer using the provided parameters.

 🧩 Input file schema(yaml):

    namespace (str | required: false): The namespace associated with the metrics. If not provided, the default namespace is used.
    generateSql (bool | required: false): Indicates whether to return the SQL query instead of data. If `true`, the response will include the SQL query used to retrieve the metrics. Default is `false`.
    measures (list(str) | required: false): An array of measures to include in the query. Measures represent quantitative metrics such as sums or counts.
    dimensions (list(str) | required: false): An array of dimensions to include in the query. Dimensions represent qualitative categories such as time, location, or product names.
    filters (list(map) | required: false):
        dimension (str): The dimension to filter on. Supported values are `equals`, `notEquals`, `contains`, `notContains`, `startsWith`, `notStartsWith`, `endsWith`, `notEndsWith`, `gt`, `gte`, `lt`, `lte`, `inDateRange`, `notInDateRange`, `beforeDate`, `beforeOrOnDate`, `afterDate`, `afterOrOnDate` etc.
        operator (str): The operator to use for the filter.
        values (list(str)): An array of values to filter on.
    timeDimensions (list(map) | required: false):
        dimension (str): The time dimension to include in the query.
        granularity (str | required: false): The granularity of the time dimension. Supported values are `second`, `minute`, `hour`, `day`, `week`, `month`, `quarter`, and `year`.
        dateRange (list(str) | str | required: false): An array of two dates that define the time range for the query. Alternatively, you can provide a single string out of the following predefined date ranges `today`, `yesterday`, `this week`, `last week`, `this month`, `last month`, `this quarter`, `last quarter`, `this year`, `last year`, `last 7 days` and `last 30 days`.
    segments (list(str) | required: false): An array of segments to include in the query. Segments represent pre-defined filters that can be applied to metrics.
    order (map | required: false): Defines the sort order of the results. This is a stringified object where keys are the dimensions/measures and values are either 'asc' or 'desc' to specify ascending or descending order.
    limit (int | required: false): Limits the number of rows returned by the query. If not provided, the default limit is applied.
    offset (int | required: false): Specifies the number of rows to skip before starting to return data. Useful for pagination.

 πŸ“ Example usage:

peak metrics query '/path/to/query.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 metrics query --measures "<cube_name>.<resource_name_1>" --measures "<cube_name>.<resource_name_2>" --dimensions "<cube_name>.<resource_name>" --time-dimensions "{"dimension":"<cube_name>.<resource_name>","dateRange":["2024-01-26T00:00:00Z","2024-06-06T00:00:00Z"],"granularity":"day"}"

 πŸ†— Response:

{
    "data": [
        {
            "region": "North America",
            "total_sales": 1000000
        },
        {
            "region": "Europe",
            "total_sales": 500000
        }
    ],
    "sql": "SELECT region, SUM(total_sales) AS total_sales FROM orders GROUP BY region"
}

πŸ”— API Documentation

Usage:

$ peak metrics query [OPTIONS] [FILE]

Arguments:

  • [FILE]: Path to the file that defines the body for this operation, supports both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=value.

  • --namespace TEXT: The namespace associated with the metrics. If not provided, the default namespace is used.

  • --generate-sql / --no-generate-sql: Indicates whether to return the SQL query instead of data. If true, the response will include the SQL query used to retrieve the metrics. Default is false.

  • --measures TEXT: An array of measures to include in the query. Measures represent quantitative metrics such as sums or counts. Provide them in stringified JSON format.

  • --dimensions TEXT: An array of dimensions to include in the query. Dimensions represent qualitative categories such as time, location, or product names. Provide them in stringified JSON format.

  • --filters TEXT: An array of filter objects to apply to the query. Filters limit the data returned based on specific conditions. Provide them in stringified JSON format.

  • --time-dimensions TEXT: An array of time dimensions to include in the query. Time dimensions allow querying over specific time ranges with optional granularity (e.g., day, month, year). Provide them in stringified JSON format.

  • --segments TEXT: An array of segments to include in the query. Segments represent pre-defined filters that can be applied to metrics. Provide them in stringified JSON format.

  • --order TEXT: Defines the sort order of the results. This is an object where keys are the dimensions/measures and values are either β€˜asc’ or β€˜desc’ to specify ascending or descending order. Provide them in stringified JSON format.

  • --limit INTEGER: Limits the number of rows returned by the query. If not provided, the default limit is applied.

  • --offset INTEGER: Specifies the number of rows to skip before starting to return data. Useful for pagination.

  • --paging: If set, prints the output using the default pager.

  • -o, --output [json|yaml|table]: 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 service

  • update: 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.
    scaleToZero (boolean | required: false): Enable scale to zero for the service. Only applicable for web-app type services. Default value is false. Enabling Scale to zero ensures that the resources hosting your app are scaled down when ideal over a period of time. The resources will scale back up automatically on next launch.
    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> --scale-to-zero

 πŸ†— 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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.

  • --scale-to-zero / --no-scale-to-zero: Enable scale to zero for the service. Only applicable for web-app type services.

  • --service-type TEXT: A list of service types to filter the list by. Valid values are api, web-app and shiny.

  • --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, scaleToZero 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.
    scaleToZero (boolean | required: false): Enable scale to zero for the service. Only applicable for web-app type services. Default value is false. Enabling Scale to zero ensures that the resources hosting your app are scaled down when ideal over a period of time. The resources will scale back up automatically on next launch.
    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> --scale-to-zero

 πŸ†— 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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.

  • --scale-to-zero / --no-scale-to-zero: Enable scale to zero for the service. Only applicable for web-app type services.

  • --service-type TEXT: A list of service types to filter the list by. Valid values are api, web-app and shiny.

  • --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,
    "scaleToZero": 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 are CREATING, 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 are api, web-app and shiny.

  • --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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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, scaleToZero 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.
    scaleToZero (boolean | required: false): Enable scale to zero for the service. Only applicable for web-app type services. Default value is false. Enabling Scale to zero ensures that the resources hosting your app are scaled down when ideal over a period of time. The resources will scale back up automatically on next launch.
    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> --scale-to-zero

 πŸ†— 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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.

  • --scale-to-zero / --no-scale-to-zero: Enable scale to zero for the service. Only applicable for web-app 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 are available, unavailable and archived.

  • --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 are deleting, delete_failed, deployed, deploying, failed, platform_resource_error, redeploying, rollback, rollback_complete, rollback_failed and warning.

  • --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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 are CREATING, 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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.

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.

 🧩 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.
            # Standard 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. This should be 'standard' for a Standard Step.
            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.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                secrets (list(str) | required: false): List of secret names to be passed.
            outputParameters (map | required: false):
                <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the file name where the output is stored.
            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.
            # HTTP Step
            type (string | required: true): Type of workflow step. This should be 'http' for a HTTP Step.
            method (string | required: true): The HTTP method to be used for the API call. Should be one of - get, post, put, patch, and delete
            url (string | required: true): The URL to make the HTTP API call to.
            payload (string | required: false): Stringified JSON payload to be sent in case of non-get requests.
            headers (map | required: false):
                absolute (map | required: false): Key-Value pair where key is the name of the header and value is the value of the header.
                secrets (map | required: false): Key-Value pair where key is the name of the header and value is the name of the secret to get the value from.
            auth (map | required: false):
                type (string | required: true): The type of authentication to use. Should be one of - no-auth, oauth, basic, api-key, and bearer-token.
                clientId (string | required: false): The Client ID used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                clientSecret (string | required: false): The Client Secret used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                authUrl (string | required: false): The URL that is hit to get the access token in case of OAuth. Required when type is oauth.
                username (string | required: false): The username used for basic authentication. Required when type is basic.
                password (string | required: false): The password used for basic authentication. Value should be the name of a secret. Required when type is basic.
                apiKey (string | required: false): The API Key used for authentication. Value should be the name of a secret. Required when type is api-key.
                bearerToken (string | required: false): The bearer token used for authentication. Value should be the name of a secret. Required when type is bearer-token.
            parameters (map | required: false):
                env (map | required: false): Key-Value pair where key is the name of the env.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                secrets (list(str) | required: false): List of secret names to be passed.
            outputParameters (map | required: false):
                <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name. Note that in case of HTTP step, value should always be "response.txt", otherwise this parameter would be rejected.
            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.
            # Export Step
            type (string | required: true): Type of workflow step. This should be 'export' for a export Step.
            schema (string | required: true): Schema from which the data is to be exported.
            table (string | required: true): Table from which the data is to be exported.
            sortBy (string | required: true): Column name by which the data is to be sorted.
            sortOrder (string | required: false): Order in which the data is to be sorted. Should be one of - asc, desc. Default is asc.
            compression (boolean | required: false): Whether to compress the files to '.gz' format while exporting. Default is false.
            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.
            # SQL Step
            type (string | required: true): Type of workflow step. This should be 'sql' for a sql Step.
            sqlQueryPath (string | required: false): Path to the SQL query file. One of the 'sqlQueryPath' or 'repository' is required.
            repository (map | required: false):
                branch (string | required: true): Branch of the repository containing the required files.
                token (string | required: false): The token to be used to clone the repository.
                url (string | required: true): URL of the repository.
                filePath (string | required: true): Path to the file containing the SQL query.
            parameters (map | required: false):
                env (map | required: false): Key-Value pair where key is the name of the env.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
            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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.
            # Standard 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. This should be 'standard' for Standard Step.
            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.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                secrets (list(str) | required: false): List of secret names to be passed.
            outputParameters (map | required: false):
                <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the file name where the output is stored.
            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.
            # HTTP Step
            type (string | required: false): Type of workflow step. This should be 'http' for a HTTP Step.
            method (string | required: true): The HTTP method to be used for the API call. Should be one of - get, post, put, patch, and delete
            url (string | required: true): The URL to make the HTTP API call to.
            payload (string | required: false): Stringified JSON payload to be sent in case of non-get requests.
            headers (map | required: false):
                absolute (map | required: false): Key-Value pair where key is the name of the header and value is the value of the header.
                secrets (map | required: false): Key-Value pair where key is the name of the header and value is the name of the secret to get the value from.
            auth (map | required: false):
                type (string | required: true): The type of authentication to use. Should be one of - no-auth, oauth, basic, api-key, and bearer-token.
                clientId (string | required: false): The Client ID used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                clientSecret (string | required: false): The Client Secret used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                authUrl (string | required: false): The URL that is hit to get the access token in case of OAuth. Required when type is oauth.
                username (string | required: false): The username used for basic authentication. Required when type is basic.
                password (string | required: false): The password used for basic authentication. Value should be the name of a secret. Required when type is basic.
                apiKey (string | required: false): The API Key used for authentication. Value should be the name of a secret. Required when type is api-key.
                bearerToken (string | required: false): The bearer token used for authentication. Value should be the name of a secret. Required when type is bearer-token.
            parameters (map | required: false):
                env (map | required: false): Key-Value pair where key is the name of the env.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                secrets (list(str) | required: false): List of secret names to be passed.
            outputParameters (map | required: false):
                <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name. Note that in case of HTTP step, value should always be "response.txt", otherwise this parameter would be rejected.
            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.
            # Export Step
            type (string | required: true): Type of workflow step. This should be 'export' for a export Step.
            schema (string | required: true): Schema from which the data is to be exported.
            table (string | required: true): Table from which the data is to be exported.
            sortBy (string | required: true): Column name by which the data is to be sorted.
            sortOrder (string | required: false): Order in which the data is to be sorted. Should be one of - asc, desc. Default is asc.
            compression (boolean | required: false): Whether to compress the files to '.gz' format while exporting. Default is false.
            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.
            # SQL Step
            type (string | required: true): Type of workflow step. This should be 'sql' for a sql Step.
            sqlQueryPath (string | required: false): Path to the SQL query file. One of the 'sqlQueryPath' or 'repository' is required.
            repository (map | required: false):
                branch (string | required: true): Branch of the repository containing the required files.
                token (string | required: false): The token to be used to clone the repository.
                url (string | required: true): URL of the repository.
                filePath (string | required: true): Path to the file containing the SQL query.
            parameters (map | required: false):
                env (map | required: false): Key-Value pair where key is the name of the env.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
            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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.

 πŸ“ 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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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 are Draft, Running, Available, Paused.

  • --last-execution-status TEXT: List of execution status of the latest run of the workflows to filter them by. Valid values are Success, 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 are Success, Running, Stopped, Stopping and Failed.

  • --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.

 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.

        # Standard 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. This should be standard for Standard Step.
            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.
            outputParameters (map | required: false):
                <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the file name where the output is stored.
            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 both yaml file or a jinja template.

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.

 🧩 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.
            # Standard 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. This should be 'standard' for Standard Step.
            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.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                secrets (list(str) | required: false): List of secret names to be passed.
            outputParameters (map | required: false):
                <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name, and the value is the file name where the output is stored.
            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.
            # HTTP Step
            type (string | required: false): Type of workflow step. This should be 'http' for a HTTP Step.
            method (string | required: true): The HTTP method to be used for the API call. Should be one of - get, post, put, patch, and delete
            url (string | required: true): The URL to make the HTTP API call to.
            payload (string | required: false): Stringified JSON payload to be sent in case of non-get requests.
            headers (map | required: false):
                absolute (map | required: false): Key-Value pair where key is the name of the header and value is the value of the header.
                secrets (map | required: false): Key-Value pair where key is the name of the header and value is the name of the secret to get the value from.
            auth (map | required: false):
                type (string | required: true): The type of authentication to use. Should be one of - no-auth, oauth, basic, api-key, and bearer-token.
                clientId (string | required: false): The Client ID used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                clientSecret (string | required: false): The Client Secret used to get the access token in case of OAuth. Value should be the name of a secret. Required when type is oauth.
                authUrl (string | required: false): The URL that is hit to get the access token in case of OAuth. Required when type is oauth.
                username (string | required: false): The username used for basic authentication. Required when type is basic.
                password (string | required: false): The password used for basic authentication. Value should be the name of a secret. Required when type is basic.
                apiKey (string | required: false): The API Key used for authentication. Value should be the name of a secret. Required when type is api-key.
                bearerToken (string | required: false): The bearer token used for authentication. Value should be the name of a secret. Required when type is bearer-token.
            parameters (map | required: false):
                env (map | required: false): Key-Value pair where key is the name of the env.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
                secrets (list(str) | required: false): List of secret names to be passed.
            outputParameters (map | required: false):
                <keyName> (string | required: false): Represents a key-value pair where the key is the parameter name. Note that in case of HTTP step, value should always be "response.txt", otherwise this parameter would be rejected.
            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.
            # Export Step
            type (string | required: true): Type of workflow step. This should be 'export' for a export Step.
            schema (string | required: true): Schema from which the data is to be exported.
            table (string | required: true): Table from which the data is to be exported.
            sortBy (string | required: true): Column name by which the data is to be sorted.
            sortOrder (string | required: false): Order in which the data is to be sorted. Should be one of - asc, desc. Default is asc.
            compression (boolean | required: false): Whether to compress the files to '.gz' format while exporting. Default is false.
            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.
            # SQL Step
            type (string | required: true): Type of workflow step. This should be 'sql' for a sql Step.
            sqlQueryPath (string | required: false): Path to the SQL query file. One of the 'sqlQueryPath' or 'repository' is required.
            repository (map | required: false):
                branch (string | required: true): Branch of the repository containing the required files.
                token (string | required: false): The token to be used to clone the repository.
                url (string | required: true): URL of the repository.
                filePath (string | required: true): Path to the file containing the SQL query.
            parameters (map | required: false):
                env (map | required: false): Key-Value pair where key is the name of the env.
                inherit (map | required: false): Key-Value pair where key is the name of the env and value is the name of the output parameter.
            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 both yaml file or a jinja template. [required]

Options:

  • -v, --params-file TEXT: Path to the yaml 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 format key=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.