Can the Pipedream REST API be used to update the code of an existing step inside a workflow and how to fix Pipedream CLI v0.5.0's 500 error issue on `pd publish` and `pd deploy` commands?

This topic was automatically generated from Slack. You can find the original thread here.

I have two technical questions about programmatic step code
updates:

  1. Can I update the code of an existing step inside a workflow via
    the Pipedream REST API? If yes, what’s the endpoint? If no, what’s
    the recommended way to programmatically iterate on workflow code
    during development?

  2. Pipedream CLI v0.5.0 returns 500 error on pd publish and
    pd deploy. Login and pd list registry work fine. Is there a
    newer CLI version or different flow I should use?

Goal: stop manually copy-pasting step code through the UI.

1) Can I update the code of an existing step inside a workflow via the Pipedream REST API? Currently, you cannot update the code of an existing step inside a workflow via the Pipedream REST API. The REST API does not expose endpoints for programmatically updating the code of workflow steps. Step code is managed within the Pipedream UI, and the API is primarily focused on workflow execution, event sources, and related resources. Recommended way to programmatically iterate on workflow code during development: - Pipedream CLI: The recommended approach for programmatic development and iteration is to use the Pipedream CLI. With the CLI, you can develop components (actions/triggers) locally, then publish them to your account or the registry. These components can then be added as steps to workflows in the UI. - Reusable Components: Develop your logic as reusable components, publish them via the CLI, and then add/update them in workflows through the UI. This avoids manual copy-pasting and allows for version control. - No direct step code update via API: If you need to automate workflow modifications, you’ll need to script UI interactions (not recommended or supported), or use the CLI to update components and manually re-add them to workflows. ### 2) Pipedream CLI v0.5.0 returns 500 error on pd publish and pd deploy. Login and pd list registry work fine. Is there a newer CLI version or different flow I should use? - CLI Version: v0.5.0 is an older version of the CLI. There have been significant updates and bug fixes since then. - Recommended Action: - Upgrade to the latest CLI: Run ```

bash npm install -g @pipedream/cli
or
bash npm update -g @pipedream/cli
``` to ensure you have the latest version. - Check Node.js version: Make sure you are running a supported Node.js version (typically v18+). - 500 Errors: These can be caused by outdated CLI versions, breaking API changes, or issues with your component code. Upgrading usually resolves these issues. - Newer Flow: The flow remains the same—develop locally, then pd publish or pd deploy. If you continue to see errors after upgrading, review your component code for issues, and check the CLI output for more details. — If you continue to experience issues or need more advanced automation, please visit Pipedream for direct help or to request features like API-based workflow editing. — Summary: - You cannot update workflow step code via the REST API; use the CLI for component development. - Upgrade your CLI to the latest version to resolve 500 errors with pd publish and pd deploy. - For further automation or persistent issues, reach out to Pipedream support.

Quick update: I tested with an action template generated directly
by pd init action, with no modifications. Both pd publish and
pd deploy still return:

“component create api call responded with status: 500,
body: {error: ‘Unexpected error…’}”

This confirms it’s not a code formatting issue — looks like a
server-side bug. Anyone else seeing this? Is there a workaround
or known incident?

CLI: v0.5.0 (current latest from cli.pipedream.com)
OS: macOS Apple Silicon