onecloud

Developers / API · CLI

Everything you do in the console,from code and the terminal.

Automate deploys and operations with the REST API, the oc CLI and a GitHub Action. OpenAPI 3.1 docs and scoped API tokens included.
An Open API clay gateway connecting servers and billing records

December 1, 2026 · API v1

API base URL

https://dash.app.onecloud.im/api/v1

Authenticate with API tokens

Create a token under Account settings → API tokens in the console, choosing a name, scopes and expiry. The token (oc_…) is shown once; send it with every request in the Authorization: Bearer header.

Grant only the scopes you need

read is for viewing, write for creating, deploying, changing and deleting, and exec for running commands in containers (web terminal). Tokens with only the read scope cannot read secret values in plain text.

OpenAPI 3.1 docs

Every endpoint and request/response format is documented at /api/v1/docs. You can paste a token into the docs page and try calls right away.

Getting started

  1. 01

    Create a token with the scopes you need under Account settings → API tokens.

  2. 02

    Run oc login in your terminal. A token for this machine is issued and stored.

  3. 03

    Run oc up in your app folder to upload, build and deploy it.

  4. 04

    Automate repeated tasks with the REST API or the GitHub Action.

Commonly used endpoints. See the API docs for the full list.

Read endpoints

Read endpoints
HTTP / EndpointPurposeRequired scope
GET/auth/meYour accountread
GET/projectsList projectsread
GET/projects/{projectId}Project, services and membersread
GET/projects/{projectId}/servicesList servicesread
GET/projects/{projectId}/services/{serviceId}Service status and instancesread
GET/projects/{projectId}/services/{serviceId}/deploymentsDeploy historyread
GET/projects/{projectId}/services/{serviceId}/logsSearch logsread
GET/projects/{projectId}/services/{serviceId}/metricsMetricsread
GET/projects/{projectId}/services/{serviceId}/variablesEnvironment variables (masked)read
GET/projects/{projectId}/usageProject usageread

Write endpoints

Write endpoints
HTTP / EndpointPurposeRequired scope
POST/projectsCreate a projectwrite
POST/projects/{projectId}/servicesCreate a service (app or database)write
POST/projects/{projectId}/services/{serviceId}/deployRedeploywrite
POST/projects/{projectId}/services/{serviceId}/deployments/{deploymentId}/rollbackRoll back to a previous deploywrite
PATCH/projects/{projectId}/services/{serviceId}/variablesSet or unset environment variableswrite
POST/projects/{projectId}/services/{serviceId}/domainsAdd a custom domainwrite
POST/projects/{projectId}/services/{serviceId}/terminalOpen a web terminalexec + write

The oc CLI

oc login, oc up (folder upload deploys), oc logs, oc variables, oc env (environments), oc domain, oc db and oc shell — all from your terminal. Link a folder to a project with oc link so you don't have to name the target every time.

GitHub Action

Use it to deploy after your tests pass, or to deploy without the GitHub app. It uploads your repository folder, deploys it and outputs the deployment ID and service URL. Store the token in repository secrets as ONECLOUD_TOKEN.

Managing tokens

Create a separate token for each purpose and keep expiry short. Revoke unused tokens from the console at any time.

Examples

Replace ONECLOUD_TOKEN and the project and service IDs with values from your console. The examples contain no real credentials.

List projects

# ONECLOUD_TOKEN=oc_…   (Console → Account settings → API tokens)
curl "https://dash.app.onecloud.im/api/v1/projects" \
  -H "Authorization: Bearer $ONECLOUD_TOKEN"

Redeploy a service

curl -X POST "https://dash.app.onecloud.im/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/deploy" \
  -H "Authorization: Bearer $ONECLOUD_TOKEN"

Deploy with the CLI

oc login                          # email & password, 2FA supported
cd my-app
oc up                             # upload this folder, build & deploy
oc logs -f                        # live logs
oc variables set NODE_ENV=production
oc domain add app.example.com     # prints the DNS records to create
oc db create postgres --name pg   # managed PostgreSQL
oc env list                       # production · staging · development

GitHub Action (.github/workflows/deploy.yml)

name: deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: <OneCloud Deploy action>   # action path from the console guide
        with:
          token: ${{ secrets.ONECLOUD_TOKEN }}
          project: my-app
          service: web

Use MCP from AI tools

Use the remote MCP connector in Claude and ChatGPT, or an API token over stdio in local clients such as Cursor. The same scopes (read, write, exec) apply, and destructive actions require confirmation.