Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: '2.0'
- info:
- title: ndslabs
- version: 1.0.1-alpha
- basePath: /v1
- schemes:
- - https
- produces:
- - application/json
- consumes:
- - application/json
- parameters:
- service-id:
- name: service-id
- in: path
- description: The unique service identifier
- type: string
- required: true
- account-id:
- name: account-id
- in: path
- description: The unique account identifier
- type: string
- required: true
- stack-id:
- name: stack-id
- in: path
- description: The unique stack identifier
- type: string
- required: true
- stack-service-id:
- name: stack-service-id
- in: path
- description: The unique stack service identifier
- type: string
- required: true
- vocab-name:
- name: vocab-name
- in: path
- description: Vocabulary name
- type: string
- required: true
- paths:
- /authenticate:
- post:
- description: |
- Authenticate a user (login)
- parameters:
- - name: auth
- in: body
- description: Auth definition
- schema:
- $ref: '#/definitions/Auth'
- required: true
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- $ref: '#/definitions/Token'
- '401':
- description: Not logged in
- delete:
- description: |
- Logout a user
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- $ref: '#/definitions/Token'
- /refresh_token:
- get:
- description: |
- Refresh the JWT token
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- $ref: '#/definitions/Token'
- '401':
- description: Not logged in
- /check_token:
- get:
- description: |
- Validate the JWT token
- responses:
- '200':
- description: OK
- '401':
- description: Not logged in
- /services:
- get:
- description: |
- Retrieves a site-wide list of available service definitions.
- parameters:
- - name: catalog
- in: query
- description: 'Filter list for catalog (user, system, all)'
- required: false
- type: string
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/definitions/Service'
- post:
- description: |
- Adds a new service to the service library
- parameters:
- - name: service
- in: body
- description: Service definition
- schema:
- $ref: '#/definitions/Service'
- required: true
- responses:
- '201':
- description: Created
- '/services/{service-id}':
- parameters:
- - $ref: '#/parameters/service-id'
- get:
- description: |
- Retrieves the service definition.
- responses:
- '200':
- description: The service object
- schema:
- type: object
- properties:
- data:
- $ref: '#/definitions/Service'
- put:
- description: |
- Updates a service definition in the service library
- parameters:
- - name: service
- in: body
- description: Service definition
- schema:
- $ref: '#/definitions/Service'
- required: true
- responses:
- '201':
- description: Updated
- delete:
- description: |
- Delete a service
- responses:
- '200':
- description: OK
- /accounts:
- get:
- description: |
- Retrieves a site-wide list of NDSLabs accounts.
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/definitions/Account'
- '404':
- description: Not found
- post:
- description: |
- Adds a new accounts
- parameters:
- - name: accounts
- in: body
- description: Account definition
- schema:
- $ref: '#/definitions/Account'
- required: true
- responses:
- '201':
- description: Created
- '/accounts/{account-id}':
- parameters:
- - $ref: '#/parameters/account-id'
- get:
- description: |
- Retrieves basic information about a account.
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- $ref: '#/definitions/Account'
- put:
- description: |
- Updates account information
- parameters:
- - name: account
- in: body
- description: Account definition
- schema:
- $ref: '#/definitions/Account'
- required: true
- responses:
- '201':
- description: Updated
- delete:
- description: |
- Delete a account
- responses:
- '200':
- description: OK
- /stacks:
- get:
- description: |
- Retrieves a list of stacks for this account.
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/definitions/Stack'
- '404':
- description: Not found
- post:
- description: |
- Adds a new stack to this account
- parameters:
- - name: stack
- in: body
- description: Stack definition
- schema:
- $ref: '#/definitions/Stack'
- required: true
- responses:
- '201':
- description: Created
- '/stacks/{stack-id}':
- parameters:
- - $ref: '#/parameters/stack-id'
- get:
- description: |
- Retrieves the stack definition.
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- $ref: '#/definitions/Stack'
- put:
- description: |
- Updates stack information
- parameters:
- - name: stack
- in: body
- description: Stack definition
- schema:
- $ref: '#/definitions/Stack'
- required: true
- responses:
- '201':
- description: Updated
- delete:
- description: |
- Delete a stack
- responses:
- '200':
- description: OK
- '/stacks/{stack-id}/rename':
- parameters:
- - $ref: '#/parameters/stack-id'
- put:
- parameters:
- - name: name
- description: Stack name
- schema:
- type: string
- in: body
- required: true
- description: |
- Rename the stack
- responses:
- '201':
- description: Updated
- '/logs/{stack-service-id}':
- parameters:
- - $ref: '#/parameters/stack-service-id'
- get:
- description: |
- Retrieves the stack service log.
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- $ref: '#/definitions/Log'
- '/start/{stack-id}':
- parameters:
- - $ref: '#/parameters/stack-id'
- get:
- description: |
- Starts the specified stack
- responses:
- '200':
- description: OK
- '/stop/{stack-id}':
- parameters:
- - $ref: '#/parameters/stack-id'
- get:
- description: |
- Stops the specified stack
- responses:
- '200':
- description: OK
- /configs:
- get:
- parameters:
- - name: services
- in: query
- description: services to filter by
- required: false
- type: array
- collectionFormat: csv
- items:
- type: string
- description: |
- Retrieves a list of service configuration options
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/definitions/Config'
- /version:
- get:
- description: |
- Retrieve the server version
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- type: string
- /register:
- post:
- description: |
- Register
- parameters:
- - name: account
- in: body
- description: Account definition
- schema:
- $ref: '#/definitions/Account'
- required: true
- responses:
- '201':
- description: Created
- '/vocabulary/{vocab-name}':
- get:
- parameters:
- - $ref: '#/parameters/vocab-name'
- description: |
- Retrieves a vocabulary
- responses:
- '200':
- description: OK
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/definitions/Vocabulary'
- '/change_password':
- put:
- parameters:
- - name: password
- description: Change password object
- schema:
- type: string
- in: body
- required: true
- description: |
- Change the user's password
- responses:
- '201':
- description: Updated
- '/register/verify':
- put:
- parameters:
- - name: verify
- description: Verification object
- schema:
- type: object
- properties:
- u:
- type: string
- t:
- type: string
- in: body
- required: true
- description: |
- Verify registered email address
- responses:
- '200':
- description: Verified
- '/reset/{account-id}':
- parameters:
- - $ref: '#/parameters/account-id'
- post:
- description: |
- Request password reset email.
- responses:
- '200':
- description: OK
- definitions:
- Auth:
- type: object
- properties:
- username:
- type: string
- password:
- type: string
- Token:
- type: object
- properties:
- token:
- type: string
- VolumeMount:
- type: object
- properties:
- mountPath:
- type: string
- name:
- type: string
- Service:
- type: object
- properties:
- id:
- type: string
- key:
- type: string
- label:
- type: string
- description:
- type: string
- maintainer:
- type: string
- logo:
- type: string
- display:
- type: string
- access:
- type: string
- developerEnvironment:
- type: string
- config:
- $ref: '#/definitions/Config'
- readinessProbe:
- $ref: '#/definitions/ReadyProbe'
- image:
- $ref: '#/definitions/ServiceImage'
- resourceLimits:
- $ref: '#/definitions/ResourceLimits'
- depends:
- type: array
- items:
- $ref: '#/definitions/ServiceDependency'
- ports:
- type: array
- items:
- $ref: '#/definitions/Port'
- volumeMounts:
- type: array
- items:
- $ref: '#/definitions/VolumeMount'
- repositories:
- type: array
- items:
- $ref: '#/definitions/Repository'
- command:
- type: array
- items:
- type: string
- args:
- type: array
- items:
- type: string
- tags:
- type: array
- items:
- type: string
- createdTime:
- type: integer
- updatedTime:
- type: integer
- ReadyProbe:
- type: object
- properties:
- path:
- type: string
- port:
- type: integer
- initialDelay:
- type: integer
- timeout:
- type: integer
- Port:
- type: object
- properties:
- port:
- type: integer
- protocol:
- type: string
- Repository:
- type: object
- properties:
- port:
- type: string
- url:
- type: string
- ServiceDependency:
- type: object
- properties:
- serviceId:
- type: string
- required:
- type: boolean
- Account:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- description:
- type: string
- namespace:
- type: string
- storageQuota:
- type: string
- resourceLimits:
- type: object
- properties:
- cpuMax:
- type: string
- cpuDefault:
- type: string
- memMax:
- type: string
- memDefault:
- type: string
- storageQuota:
- type: string
- resourceUsage:
- type: object
- properties:
- cpu:
- type: string
- memory:
- type: string
- storage:
- type: string
- Stack:
- type: object
- properties:
- id:
- type: string
- key:
- type: string
- name:
- type: string
- services:
- type: array
- items:
- $ref: '#/definitions/StackService'
- status:
- type: string
- action:
- type: string
- createTime:
- type: integer
- updateTime:
- type: integer
- StackService:
- type: object
- properties:
- id:
- type: string
- stackId:
- type: string
- serviceId:
- type: string
- status:
- type: string
- imageTag:
- type: string
- statusMessage:
- type: array
- items:
- type: string
- endpoints:
- type: array
- items:
- type: object
- properties:
- internalIP:
- type: string
- host:
- type: string
- ports:
- type: array
- items:
- type: object
- properties:
- port:
- type: integer
- nodePort:
- type: integer
- protocol:
- type: string
- Log:
- type: object
- properties:
- text:
- type: string
- Config:
- type: object
- properties:
- name:
- type: string
- value:
- type: string
- label:
- type: string
- canOverride:
- type: boolean
- isPassword:
- type: boolean
- ServiceImage:
- type: object
- properties:
- name:
- type: string
- tags:
- type: array
- items:
- type: string
- ResourceLimits:
- type: object
- properties:
- cpuMax:
- type: string
- cpuDefault:
- type: string
- memMax:
- type: string
- memDefault:
- type: string
- Vocabulary:
- type: object
- properties:
- name:
- type: string
- terms:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- definition:
- type: string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement