Skip to content

List Environments

Alex O. Karasulu edited this page Mar 9, 2018 · 2 revisions
swagger: '2.0'
info:
  title: Console API
  description: Subutai Console API
  version: "1.0.0"
host: localhost:9999
schemes:
  - https
basePath: /rest/v1/environments
produces:
  - application/json
paths:
  /
    get:
      summary: Environments
      description:
        The endpoint returns information about the user environments
      tags:
        - Environment
        - Container
      responses:
        200:
          description: An array of environments
          schema:
            type: array
            items:
              $ref: '#/definitions/Environment'
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'

definitions:
  Environment:
    type: object
    properties:
      id:
        type: string
        description: Unique identifier representing a specific environment
      name:
        type: string
        description: Name of environment
      status:
        type: string
        description: Status of environment
      containers:
        type: array
        items:
          $ref: '#/definitions/Container'

  Container:
    type: object
    properties:
      id:
        type: string
        description: Unique id of container
      environmentId:
        type: string
        description: Id of parent environment
      containerName:
        type: string 
        description: Name of container
      hostname:
        type: string
        description: Hostname of container
      ip:
        type: string
        description: IP of container
      state: 
        type: string
        description: State of container
        enum: 
         - STARTING
         - RUNNING
         - STOPPING
         - STOPPED
         - ABORTING
         - FREEZING
         - FROZEN
         - UNKNOWN
      type:
        type: string
        description: Size/type of container
        enum:
         - TINY
         - SMALL
         - MEDIUM
         - LARGE
         - HUGE
      peerId:
        type: string
        description: Id of hosting peer
      hostId:
        type: string
        description: Id of hosting resource host
      templateId:
        type: string
        description: Id of container template
      templateName:
        type: string
        description: Name of container template
      arch:
        type: string
        description: architecture of container
      tags:
        type: array
        items:
          type: string
        description: custom tags assigned to container

  Error:
    type: object
    properties:
      error:
        type: string
Clone this wiki locally