Skip to content

Instantly share code, notes, and snippets.

@klucar
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klucar/c534d4ecb9f537f9e91e to your computer and use it in GitHub Desktop.
Save klucar/c534d4ecb9f537f9e91e to your computer and use it in GitHub Desktop.
Myriad Swagger
swagger: '2.0'
info:
version: 0.0.1
title: Myriad API
description: |
Myriad API description
host: localhost:8192
basePath: /api
schemes:
- http
consumes:
- application/json
- text/plain
produces:
- application/json
- text/plain
paths:
/cluster/flexup:
put:
summary: Launch a new Node Manager
parameters:
- name: instance
in: body
description: Instance profile and quantity to flex up
schema:
$ref: '#/definitions/FlexUp'
required: true
description: Original Flexup API
responses:
200:
description: OK
/cluster/flexup/profile/{profile-name}:
put:
parameters:
- name: profile-name
in: path
type: string
description: Instance profile name
description: Flexup a single instance of a specified profile
responses:
200:
description: OK
/cluster/flexup/profile/{profile-name}/{instances}:
put:
parameters:
- name: profile-name
in: path
type: string
description: Instance profile name
- name: instances
in: path
type: integer
description: Number of instances
description: Flexup a multiple instances of a specified profile
responses:
200:
description: OK
/cluster/flexdown:
put:
parameters:
- name: instance
in: body
description: Number of instances to flex down
schema:
$ref: '#/definitions/FlexDown'
required: true
description: Original Flexdown API
responses:
200:
description: OK
/cluster/flexdown/profile/{profile-name}:
put:
parameters:
- name: profile-name
in: path
type: string
description: Instance profile name
description: Flexdown a single instance of a specified profile
responses:
200:
description: OK
/cluster/flexdown/profile/{profile-name}/{instances}:
put:
parameters:
- name: profile-name
in: path
type: string
description: Instance profile name
- name: instances
in: path
type: integer
description: Number of instances
description: Flexdown a multiple instances of a specified profile
responses:
200:
description: OK
/cluster/flexdown/instance/{instance-id}:
put:
parameters:
- name: instance-id
in: path
type: string
description: Instance profile name
description: Flexdown a single instance of a specified profile
responses:
200:
description: OK
/state:
get:
description: Returns the state of the Myriad tasks
responses:
200:
description: Task statuses
schema:
$ref: '#/definitions/State'
/config:
get:
description: Returns Myriad configuration as JSON
responses:
200:
description: Myriad Configuration
definitions:
FlexUp:
properties:
profile:
type: string
instances:
type: integer
format: int32
FlexDown:
properties:
instances:
type: integer
format: int32
State:
properties:
pendingTasks:
type: array
items:
type: string
stagingTasks:
type: array
items:
type: string
activeTasks:
type: array
items:
type: string
killableTasks:
type: array
items:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment