Akash Network Deployments API

The Deployments API from Akash Network — 9 operation(s) for deployments.

OpenAPI Specification

akash-deployments-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: AKASH - gRPC Gateway docs Addresses Deployments API
  description: A REST interface for state queries
  version: 1.0.0
tags:
- name: Deployments
paths:
  /v1/deployments/{dseq}:
    get:
      summary: Get a deployment
      operationId: getDeployment
      tags:
      - Deployments
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^d+$
          description: Deployment sequence number
        required: true
        description: Deployment sequence number
        name: dseq
        in: path
      responses:
        '200':
          description: Returns deployment info
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      deployment:
                        type: object
                        properties:
                          id:
                            type: object
                            properties:
                              owner:
                                type: string
                              dseq:
                                type: string
                                pattern: ^d+$
                            required:
                            - owner
                            - dseq
                          state:
                            type: string
                          hash:
                            type: string
                          created_at:
                            type: string
                        required:
                        - id
                        - state
                        - hash
                        - created_at
                      leases:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: object
                              properties:
                                owner:
                                  type: string
                                dseq:
                                  type: string
                                  pattern: ^d+$
                                gseq:
                                  type: number
                                oseq:
                                  type: number
                                provider:
                                  type: string
                                bseq:
                                  type: number
                              required:
                              - owner
                              - dseq
                              - gseq
                              - oseq
                              - provider
                              - bseq
                            state:
                              type: string
                            price:
                              type: object
                              properties:
                                denom:
                                  type: string
                                amount:
                                  type: string
                              required:
                              - denom
                              - amount
                            created_at:
                              type: string
                            closed_on:
                              type: string
                            reason:
                              type: string
                            status:
                              type: object
                              nullable: true
                              properties:
                                forwarded_ports:
                                  type: object
                                  additionalProperties:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        port:
                                          type: number
                                        externalPort:
                                          type: number
                                        host:
                                          type: string
                                        available:
                                          type: number
                                      required:
                                      - port
                                      - externalPort
                                ips:
                                  type: object
                                  additionalProperties:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        IP:
                                          type: string
                                        Port:
                                          type: number
                                        ExternalPort:
                                          type: number
                                        Protocol:
                                          type: string
                                      required:
                                      - IP
                                      - Port
                                      - ExternalPort
                                      - Protocol
                                services:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      available:
                                        type: number
                                      total:
                                        type: number
                                      uris:
                                        type: array
                                        items:
                                          type: string
                                      observed_generation:
                                        type: number
                                      replicas:
                                        type: number
                                      updated_replicas:
                                        type: number
                                      ready_replicas:
                                        type: number
                                      available_replicas:
                                        type: number
                                    required:
                                    - name
                                    - available
                                    - total
                                    - uris
                                    - observed_generation
                                    - replicas
                                    - updated_replicas
                                    - ready_replicas
                                    - available_replicas
                              required:
                              - forwarded_ports
                              - ips
                              - services
                          required:
                          - id
                          - state
                          - price
                          - created_at
                          - closed_on
                          - status
                      escrow_account:
                        type: object
                        properties:
                          id:
                            type: object
                            properties:
                              scope:
                                type: string
                              xid:
                                type: string
                            required:
                            - scope
                            - xid
                          state:
                            type: object
                            properties:
                              owner:
                                type: string
                              state:
                                type: string
                              transferred:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    denom:
                                      type: string
                                    amount:
                                      type: string
                                  required:
                                  - denom
                                  - amount
                              settled_at:
                                type: string
                              funds:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    denom:
                                      type: string
                                    amount:
                                      type: string
                                  required:
                                  - denom
                                  - amount
                              deposits:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    owner:
                                      type: string
                                    height:
                                      type: string
                                    source:
                                      type: string
                                    balance:
                                      type: object
                                      properties:
                                        denom:
                                          type: string
                                        amount:
                                          type: string
                                      required:
                                      - denom
                                      - amount
                                  required:
                                  - owner
                                  - height
                                  - source
                                  - balance
                            required:
                            - owner
                            - state
                            - transferred
                            - settled_at
                            - funds
                            - deposits
                        required:
                        - id
                        - state
                    required:
                    - deployment
                    - leases
                    - escrow_account
                required:
                - data
    delete:
      summary: Close a deployment
      operationId: closeDeployment
      tags:
      - Deployments
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^d+$
          description: Deployment sequence number
        required: true
        description: Deployment sequence number
        name: dseq
        in: path
      responses:
        '200':
          description: Deployment closed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      success:
                        type: boolean
                    required:
                    - success
                required:
                - data
    put:
      summary: Update a deployment
      operationId: updateDeployment
      tags:
      - Deployments
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^d+$
          description: Deployment sequence number
        required: true
        description: Deployment sequence number
        name: dseq
        in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    sdl:
                      type: string
                  required:
                  - sdl
              required:
              - data
      responses:
        '200':
          description: Deployment updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      deployment:
                        type: object
                        properties:
                          id:
                            type: object
                            properties:
                              owner:
                                type: string
                              dseq:
                                type: string
                                pattern: ^d+$
                            required:
                            - owner
                            - dseq
                          state:
                            type: string
                          hash:
                            type: string
                          created_at:
                            type: string
                        required:
                        - id
                        - state
                        - hash
                        - created_at
                      leases:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: object
                              properties:
                                owner:
                                  type: string
                                dseq:
                                  type: string
                                  pattern: ^d+$
                                gseq:
                                  type: number
                                oseq:
                                  type: number
                                provider:
                                  type: string
                                bseq:
                                  type: number
                              required:
                              - owner
                              - dseq
                              - gseq
                              - oseq
                              - provider
                              - bseq
                            state:
                              type: string
                            price:
                              type: object
                              properties:
                                denom:
                                  type: string
                                amount:
                                  type: string
                              required:
                              - denom
                              - amount
                            created_at:
                              type: string
                            closed_on:
                              type: string
                            reason:
                              type: string
                            status:
                              type: object
                              nullable: true
                              properties:
                                forwarded_ports:
                                  type: object
                                  additionalProperties:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        port:
                                          type: number
                                        externalPort:
                                          type: number
                                        host:
                                          type: string
                                        available:
                                          type: number
                                      required:
                                      - port
                                      - externalPort
                                ips:
                                  type: object
                                  additionalProperties:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        IP:
                                          type: string
                                        Port:
                                          type: number
                                        ExternalPort:
                                          type: number
                                        Protocol:
                                          type: string
                                      required:
                                      - IP
                                      - Port
                                      - ExternalPort
                                      - Protocol
                                services:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      available:
                                        type: number
                                      total:
                                        type: number
                                      uris:
                                        type: array
                                        items:
                                          type: string
                                      observed_generation:
                                        type: number
                                      replicas:
                                        type: number
                                      updated_replicas:
                                        type: number
                                      ready_replicas:
                                        type: number
                                      available_replicas:
                                        type: number
                                    required:
                                    - name
                                    - available
                                    - total
                                    - uris
                                    - observed_generation
                                    - replicas
                                    - updated_replicas
                                    - ready_replicas
                                    - available_replicas
                              required:
                              - forwarded_ports
                              - ips
                              - services
                          required:
                          - id
                          - state
                          - price
                          - created_at
                          - closed_on
                          - status
                      escrow_account:
                        type: object
                        properties:
                          id:
                            type: object
                            properties:
                              scope:
                                type: string
                              xid:
                                type: string
                            required:
                            - scope
                            - xid
                          state:
                            type: object
                            properties:
                              owner:
                                type: string
                              state:
                                type: string
                              transferred:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    denom:
                                      type: string
                                    amount:
                                      type: string
                                  required:
                                  - denom
                                  - amount
                              settled_at:
                                type: string
                              funds:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    denom:
                                      type: string
                                    amount:
                                      type: string
                                  required:
                                  - denom
                                  - amount
                              deposits:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    owner:
                                      type: string
                                    height:
                                      type: string
                                    source:
                                      type: string
                                    balance:
                                      type: object
                                      properties:
                                        denom:
                                          type: string
                                        amount:
                                          type: string
                                      required:
                                      - denom
                                      - amount
                                  required:
                                  - owner
                                  - height
                                  - source
                                  - balance
                            required:
                            - owner
                            - state
                            - transferred
                            - settled_at
                            - funds
                            - deposits
                        required:
                        - id
                        - state
                    required:
                    - deployment
                    - leases
                    - escrow_account
                required:
                - data
  /v1/deployments:
    post:
      summary: Create new deployment
      operationId: createDeployment
      tags:
      - Deployments
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    sdl:
                      type: string
                    deposit:
                      type: number
                      description: Amount to deposit in dollars (e.g. 5.5)
                  required:
                  - sdl
                  - deposit
              required:
              - data
      responses:
        '201':
          description: Create deployment successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      dseq:
                        type: string
                        pattern: ^d+$
                      manifest:
                        type: string
                      signTx:
                        type: object
                        properties:
                          code:
                            type: number
                          transactionHash:
                            type: string
                          rawLog:
                            type: string
                        required:
                        - code
                        - transactionHash
                        - rawLog
                    required:
                    - dseq
                    - manifest
                    - signTx
                required:
                - data
    get:
      summary: List deployments with pagination and filtering
      operationId: listDeployments
      tags:
      - Deployments
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - schema:
          type: number
          nullable: true
          minimum: 0
        required: false
        name: skip
        in: query
      - schema:
          type: number
          minimum: 1
          default: 1000
        required: false
        name: limit
        in: query
      responses:
        '200':
          description: Returns paginated list of deployments
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      deployments:
                        type: array
                        items:
                          type: object
                          properties:
                            deployment:
                              type: object
                              properties:
                                id:
                                  type: object
                                  properties:
                                    owner:
                                      type: string
                                    dseq:
                                      type: string
                                      pattern: ^d+$
                                  required:
                                  - owner
                                  - dseq
                                state:
                                  type: string
                                hash:
                                  type: string
                                created_at:
                                  type: string
                              required:
                              - id
                              - state
                              - hash
                              - created_at
                            leases:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: object
                                    properties:
                                      owner:
                                        type: string
                                      dseq:
                                        type: string
                                        pattern: ^d+$
                                      gseq:
                                        type: number
                                      oseq:
                                        type: number
                                      provider:
                                        type: string
                                      bseq:
                                        type: number
                                    required:
                                    - owner
                                    - dseq
                                    - gseq
                                    - oseq
                                    - provider
                                    - bseq
                                  state:
                                    type: string
                                  price:
                                    type: object
                                    properties:
                                      denom:
                                        type: string
                                      amount:
                                        type: string
                                    required:
                                    - denom
                                    - amount
                                  created_at:
                                    type: string
                                  closed_on:
                                    type: string
                                  reason:
                                    type: string
                                required:
                                - id
                                - state
                                - price
                                - created_at
                                - closed_on
                            escrow_account:
                              type: object
                              properties:
                                id:
                                  type: object
                                  properties:
                                    scope:
                                      type: string
                                    xid:
                                      type: string
                                  required:
                                  - scope
                                  - xid
                                state:
                                  type: object
                                  properties:
                                    owner:
                                      type: string
                                    state:
                                      type: string
                                    transferred:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          denom:
                                            type: string
                                          amount:
                                            type: string
                                        required:
                                        - denom
                                        - amount
                                    settled_at:
                                      type: string
                                    funds:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          denom:
                                            type: string
                                          amount:
                                            type: string
                                        required:
                                        - denom
                            

# --- truncated at 32 KB (111 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/akash/refs/heads/main/openapi/akash-deployments-api-openapi.yml