API reference
Everything the web interface does goes through the Procy REST API, so you can automate it too. The full reference of endpoints, parameters and responses is generated from the OpenAPI description:
- Base URL
https://procy.sh/api/v1on hosted Procy. On a self-hosted server,https://<your server>/api/v1.- Authentication
- HTTP basic authentication with your username and an API token. On hosted Procy the username is the email address you sign in with. A token acts in the organization it was created in.
- Format
- Requests and responses are JSON, except file uploads (multipart form). Results are in
data, lists also carrymeta.count; errors are a list inerrors, each withcode,titleanddetail. - Lists
- Most list endpoints take
sort=<field>(-<field>for descending),filter[<field>]=<value>(comma-separate values to match any of them) andpage[limit]/page[offset]. With curl, pass-gso the brackets are sent as they are. - Live output
- Commands, scripts, library entries and uploads also have WebSocket endpoints under
/api/v1/ws/that stream results as devices report them. - Limits
- Request bodies are limited to 10 KB (file uploads to 10 MB) by default. After several failed sign-ins the server
answers
429for a while.
curl -s -u 'you@example.com:<api-token>' https://procy.sh/api/v1/clients | jq '.data[].name'
| Task | Guide |
|---|---|
| Open, list and close tunnels | Managing tunnels |
| Run commands on devices | Running commands |
| Library entries and scripts | Scripts and the library |
| Schedules | Schedules |
| Send files | Sending files |
| Vault entries | Vault |
| From the shell | procy-cli |