Publish scripts as API endpoints that enable external calls to execute automation and integration workflows from within your environment

Using the Code2Api VS Code extension you can quickly define endpoints, write and test scripts locally and publish them from a familiar IDE.

 

Your worker agents act as a trusted intermediary — machines deployed in your infrastructure which can execute workflowcode on demand, without exposing secrets, credentials or providing access beyond the environment you control.

1
define
2
publish
3
call
4
agent
5
result
path   /data/customer-summary
auth   api-key
agent linux
param account_id, from_date
registering path...
endpoint live at /data/customer-summary
swagger updated automatically
POST https://acme.code2api.io/data/customer-summary
X-API-Key: ••••••••••••
{ "params": { "account_id": "C-00419", "from_date": "2025-01-01" } }
→ connecting to internal database...
→ executing query for account C-00419...
→ serialising 47 rows to JSON...
script executed
200 OK
{ "account_id": "C-00419", "rows": 47, "duration_ms": 284,
  "data": [ { "order_id": "ORD-881", "total": 1492.00 }, ... ] }
How it compares ↗

Who is it for?

Code2Api is designed for teams who need to trigger automation or quickly enable integration workflows with resources inside their own environment as a callable API — without the overhead of full-stack development or relying on traditional access methods such as VPN tunnels.

RoleHow they use it
DevOps engineersTrigger deployments, run pipeline steps, or manage infrastructure from CI/CD tools without exposing internal systems
SysOps / IT teamsExpose operational tasks — service restarts, log collection, user provisioning — as API endpoints callable from dashboards or ticketing systems
Platform engineersBuild internal developer platforms that delegate execution to machines already configured with the right tools and access
DevelopersCall scripts on internal machines from web apps or backend services without SSH keys or VPNs
Security-conscious teamsKeep secrets and credentials on machines you manage, never passing them through third-party services or storing them in CI variables

How it works

Your worker agent connects outbound only via HTTPS to the Code2Api platform. No inbound firewall rules, no open ports, and no special network configuration is required on your side. Secrets and credentials stay on the machines you control — they are never passed through the platform or stored anywhere outside your environment.

No open ports. No VPN. No shared credentials. When an API call arrives at your gateway, the platform dispatches the request to a connected worker agent. The worker agent runs the script locally using whatever tools, credentials, and access it already has, then returns the output as the HTTP response. Your infrastructure never needs to be reachable from the outside.

Worker agents are automatically grouped by platform (Linux or Windows). You can connect as many machines as you like, and each published path you define targets the group defined in the endpoint.

What you get

  • A dedicated gateway at https://{your-id}.code2api.io — your API's public address
  • An agent token to connect as many Linux or Windows worker agents as you need
  • An admin API key for managing endpoints via the VS Code extension
  • A user API key for authenticating inbound API calls
  • Support for custom validation rules and token authentication using a third-party authentication service
  • An optional Swagger UI that documents your API endpoints automatically
  • An optional custom domain — e.g. api.yourcompany.com

In practice

Deployment Pipeline

Trigger deployments on on-premise servers from CI/CD without SSH keys, open ports, or exposing internal credentials to the pipeline.

IT Operations

Let helpdesk staff trigger Windows operations — service restarts, profile resets — from a ticketing system, without admin access to machines.

Database Reporting

Expose on-demand database queries as API endpoints. Scripts run on machines with existing DB access — no credentials leave the environment.

Cloud Integration

Sync data between cloud services like Salesforce and Snowflake without storing credentials in your web app or a third-party integration platform.