Ownkube Revisions API

The Revisions API from Ownkube — 7 operation(s) for revisions.

GitHub OpenAPI

Operations 7

GET /v1/deployments/{deploymentId}/revisions List revisions for a deployment (newest first) #
POST /v1/deployments/{deploymentId}/revisions/{revisionId}/rollback Roll a deployment back to a prior revision #
POST /v1/deployments/{deploymentId}/promote Promote a deployment's config to another deployment #
POST /v1/deployments/{deploymentId}/rebuild Rebuild a deployment from source #
POST /v1/source-uploads Presign an upload slot for local source #
POST /v1/source-deploys Build and deploy uploaded source (create or redeploy) #
POST /v1/deployments/{deploymentId}/up Build and deploy previously uploaded local source #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ownkube-io:ownkube-io-revisions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ownkube-io-revisions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ownkube CLI Revisions API
  version: 1.15.0
  description: API for the Ownkube CLI tool. Authenticate via browser-based flow, then use x-api-key header for subsequent requests.
servers:
- url: /api/cli
security:
- apiKey: []
tags:
- name: Revisions
paths:
  /v1/deployments/{deploymentId}/revisions:
    get:
      tags:
      - Revisions
      summary: List revisions for a deployment (newest first)
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
          description: The deployment id.
        required: true
        description: The deployment id.
        name: deploymentId
        in: path
      responses:
        '200':
          description: Revisions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionListResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1DeploymentsByDeploymentIdRevisions
      x-operation-id-source: derived
  /v1/deployments/{deploymentId}/revisions/{revisionId}/rollback:
    post:
      tags:
      - Revisions
      summary: Roll a deployment back to a prior revision
      description: 'Restores the config snapshot from `revisionId` onto the deployment and records a new revision. Returns the new revision. Only the most recent builds are retained: rolling back to an older build is rejected with 400 (check `canRollback` on the revision list).'
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
          description: The deployment id.
        required: true
        description: The deployment id.
        name: deploymentId
        in: path
      - schema:
          type: string
          description: The revision id to roll back to.
        required: true
        description: The revision id to roll back to.
        name: revisionId
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RollbackBody'
      responses:
        '200':
          description: New revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Revision'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1DeploymentsByDeploymentIdRevisionsByRevisionIdRollback
      x-operation-id-source: derived
  /v1/deployments/{deploymentId}/promote:
    post:
      tags:
      - Revisions
      summary: Promote a deployment's config to another deployment
      description: Copies this deployment's current config into `targetDeploymentId`, records a revision there, and links it back to this deployment's latest revision. Returns the new revision on the target.
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
          description: The deployment to promote from.
        required: true
        description: The deployment to promote from.
        name: deploymentId
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromoteBody'
      responses:
        '200':
          description: New revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Revision'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1DeploymentsByDeploymentIdPromote
      x-operation-id-source: derived
  /v1/deployments/{deploymentId}/rebuild:
    post:
      tags:
      - Revisions
      summary: Rebuild a deployment from source
      description: Rebuilds an in-cluster deployment from the current head of its tracked branch (or a pinned `commit`) — the manual counterpart to the push trigger. Queues a build and supersedes any in-flight one. Only valid for deployments that build from source.
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
          description: The deployment id.
        required: true
        description: The deployment id.
        name: deploymentId
        in: path
      - schema:
          type: string
          maxLength: 200
          description: Optional note recorded on the queued revision.
        required: false
        description: Optional note recorded on the queued revision.
        name: note
        in: query
      - schema:
          type: string
          pattern: ^[0-9a-f]{7,40}$/i
          description: Commit sha (7 to 40 hex characters) to build instead of the tracked branch's current head.
        required: false
        description: Commit sha (7 to 40 hex characters) to build instead of the tracked branch's current head.
        name: commit
        in: query
      responses:
        '200':
          description: Queued rebuild
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RebuildResult'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1DeploymentsByDeploymentIdRebuild
      x-operation-id-source: derived
  /v1/source-uploads:
    post:
      tags:
      - Revisions
      summary: Presign an upload slot for local source
      description: 'Mints a short-lived upload slot: returns an `uploadId` plus a pre-signed URL to PUT a gzipped tarball of the source to (files at the archive root, at most `maxBytes`). Pass the `uploadId` to POST /v1/source-deploys to build and deploy it. Refuses up front when the wallet has no credit (new apps and Ownkube Compute redeploys).'
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
          description: The app this upload will redeploy. Omit when the upload will create a new app.
        required: false
        description: The app this upload will redeploy. Omit when the upload will create a new app.
        name: deploymentId
        in: query
      responses:
        '200':
          description: Upload slot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceUploadResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1SourceUploads
      x-operation-id-source: derived
  /v1/source-deploys:
    post:
      tags:
      - Revisions
      summary: Build and deploy uploaded source (create or redeploy)
      description: Builds source uploaded via POST /v1/source-uploads. Without `deploymentId`, creates a new Ownkube Compute app and resolves every omitted field server-side (name from `nameHint`, made unique; the org's existing region, else the default; port from the Dockerfile's EXPOSE, else the detected framework's default, else 8080; public for web; the default project and environment), returning what it chose in `defaults`. With `deploymentId`, rebuilds that app from the upload (create-only fields are rejected). Returns the build's `revisionId`.
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceDeployBody'
      responses:
        '200':
          description: Created app and/or queued build
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceDeployResult'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1SourceDeploys
      x-operation-id-source: derived
  /v1/deployments/{deploymentId}/up:
    post:
      tags:
      - Revisions
      summary: Build and deploy previously uploaded local source
      description: Builds an existing app from source uploaded via POST /v1/source-uploads and rolls it out. Supersedes any in-flight build. Equivalent to POST /v1/source-deploys with `deploymentId`; kept for older CLI versions.
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
          description: The deployment id.
        required: true
        description: The deployment id.
        name: deploymentId
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpBody'
      responses:
        '200':
          description: Queued build
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpResult'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1DeploymentsByDeploymentIdUp
      x-operation-id-source: derived
components:
  schemas:
    Revision:
      type: object
      properties:
        id:
          type: string
        deploymentId:
          type: string
        image:
          type: string
          nullable: true
        imageSource:
          type: string
          enum:
          - managed
          description: Set to managed when Ownkube built and stores the image; image is then null
        tag:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        commitMessage:
          type: string
          nullable: true
          description: First line of the built commit's message, for builds from a repository
        commitAuthor:
          type: string
          nullable: true
          description: Author of the built commit, for builds from a repository
        note:
          type: string
          nullable: true
        source:
          type: string
          nullable: true
        promotedFromRevisionId:
          type: string
          nullable: true
        triggeredByUser:
          type: object
          nullable: true
          properties:
            id:
              type: string
            name:
              type: string
              nullable: true
          required:
          - id
          - name
        appConfig:
          nullable: true
        changes:
          type: array
          items:
            nullable: true
        failureReason:
          type: string
          nullable: true
        createdAt:
          anyOf:
          - type: string
          - type: string
            format: date-time
        queuedAt:
          anyOf:
          - type: string
          - type: string
            format: date-time
          - nullable: true
        buildStartedAt:
          anyOf:
          - type: string
          - type: string
            format: date-time
          - nullable: true
        deployingAt:
          anyOf:
          - type: string
          - type: string
            format: date-time
          - nullable: true
        liveAt:
          anyOf:
          - type: string
          - type: string
            format: date-time
          - nullable: true
        failedAt:
          anyOf:
          - type: string
          - type: string
            format: date-time
          - nullable: true
        canRollback:
          type: boolean
          description: Whether this revision can still be rolled back to. Only the most recent builds are retained. Present on list results only.
      required:
      - id
      - deploymentId
      - image
      - tag
      - status
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
      required:
      - error
      - code
    UpResult:
      type: object
      properties:
        revisionId:
          type: string
      required:
      - revisionId
    SourceUploadResponse:
      type: object
      properties:
        uploadId:
          type: string
          description: Opaque id echoed back to the deploy call to identify this upload.
        uploadUrl:
          type: string
          description: Pre-signed URL to PUT the gzipped source tarball to.
        contentType:
          type: string
          description: Content-Type the upload PUT must set (matches the presign).
        expiresAt:
          type: string
          description: ISO expiry of the upload URL.
        maxBytes:
          type: integer
          description: Largest accepted upload, in bytes. A bigger tarball is rejected at deploy time.
      required:
      - uploadId
      - uploadUrl
      - contentType
      - expiresAt
      - maxBytes
    SourceDeployBody:
      type: object
      properties:
        uploadId:
          type: string
          format: uuid
          description: The `uploadId` returned by POST /v1/source-uploads.
        name:
          type: string
          minLength: 1
          maxLength: 63
          description: Exact deployment name. Fails if taken. Omit to derive one from nameHint.
        nameHint:
          type: string
          maxLength: 200
          description: Free-form name source (e.g. the project's directory name). Slugified and suffixed (-2, -3, …) if taken. Defaults to "app".
        region:
          type: string
          description: Region slug from list_regions. Defaults to the region the organization already deploys in, else the platform default.
        port:
          type: integer
          minimum: 1
          maximum: 65535
          description: Port the app listens on (also passed as PORT). Defaults to the Dockerfile's EXPOSE, else the detected framework's default, else 8080.
        resourceType:
          type: string
          enum:
          - web
          - worker
          description: web (default, serves HTTP) or worker (background process).
        public:
          type: boolean
          description: Give a web app a public URL. Defaults to true for web.
        projectId:
          type: string
          description: Project id from list_projects. Defaults to the organization's default project.
        environmentId:
          type: string
          description: Environment id from list_environments. Defaults to the project's default environment.
        note:
          type: string
          maxLength: 200
          description: Optional note recorded on the build.
        deploymentId:
          type: string
          description: Redeploy this existing app from the upload. Omit to create a new app; the create-only fields below are rejected when it's set.
      required:
      - uploadId
    RevisionListResponse:
      type: object
      properties:
        revisions:
          type: array
          items:
            $ref: '#/components/schemas/Revision'
      required:
      - revisions
    RebuildResult:
      type: object
      properties:
        revisionId:
          type: string
        gitSha:
          type: string
        branch:
          type: string
      required:
      - revisionId
      - gitSha
      - branch
    RollbackBody:
      type: object
      properties:
        note:
          type: string
          maxLength: 200
          description: Optional note recorded on the rollback.
    UpBody:
      type: object
      properties:
        uploadId:
          type: string
          format: uuid
          description: The `uploadId` returned by POST /v1/source-uploads.
        note:
          type: string
          maxLength: 200
      required:
      - uploadId
    PromoteBody:
      type: object
      properties:
        targetDeploymentId:
          type: string
          description: The deployment to promote to.
        note:
          type: string
          maxLength: 200
          description: Optional note recorded on the promotion.
      required:
      - targetDeploymentId
    SourceDeployResult:
      type: object
      properties:
        created:
          type: boolean
          description: True when this call created a new app; false on a redeploy.
        deploymentId:
          type: string
        revisionId:
          type: string
          nullable: true
          description: The build's revision id (use it for build logs). Null if the app was created but its build didn't start; upload and deploy again.
        clusterId:
          type: string
          nullable: true
          description: 'Always null: uploaded source runs on Ownkube Compute, which is placed by region (see `defaults.region`). Kept for older CLI versions.'
        environmentId:
          type: string
          nullable: true
          description: The new app's environment id. Null on a redeploy.
        publicHostname:
          type: string
          nullable: true
          description: The new app's public address, once assigned. Null on a redeploy or for a private app.
        defaults:
          type: object
          nullable: true
          properties:
            name:
              type: string
            region:
              type: string
              description: Region id (as in GET /v1/regions).
            regionLabel:
              type: string
              description: Human-readable region name.
            port:
              type: integer
            portSource:
              type: string
              enum:
              - explicit
              - dockerfile
              - language
              - fallback
              description: 'Where the port came from: the request, the Dockerfile''s EXPOSE, the detected framework''s default, or the 8080 fallback.'
            resourceType:
              type: string
              enum:
              - web
              - worker
            public:
              type: boolean
            projectId:
              type: string
            environmentId:
              type: string
          required:
          - name
          - region
          - regionLabel
          - port
          - portSource
          - resourceType
          - public
          - projectId
          - environmentId
          description: What was chosen for the new app, including resolved defaults. Null on a redeploy.
      required:
      - created
      - deploymentId
      - revisionId
      - clusterId
      - environmentId
      - publicHostname
      - defaults
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by the browser-based CLI authorization flow.