180 lines
4.0 KiB
YAML
180 lines
4.0 KiB
YAML
swagger: "2.0"
|
|
info:
|
|
title: oc-peer
|
|
description: |
|
|
Manage OpenCloud peers
|
|
version: 1.0.0
|
|
termsOfService: http://cloud.o-forge.io/
|
|
contact:
|
|
email: admin@o-cloud.io
|
|
license:
|
|
name: AGPL
|
|
url: https://www.gnu.org/licenses/agpl-3.0.html
|
|
basePath: /oc/
|
|
paths:
|
|
/:
|
|
get:
|
|
tags:
|
|
- oc-peer/controllersPeerController
|
|
description: |-
|
|
find all peer
|
|
<br>
|
|
operationId: PeerController.GetAll
|
|
responses:
|
|
"200":
|
|
description: '{peer} models.peer'
|
|
/{id}:
|
|
get:
|
|
tags:
|
|
- oc-peer/controllersPeerController
|
|
description: |-
|
|
find peer by peerid
|
|
<br>
|
|
operationId: PeerController.Get
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
description: the peer id you want to get
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: '{peer} models.peer'
|
|
put:
|
|
tags:
|
|
- oc-peer/controllersPeerController
|
|
description: |-
|
|
create peers
|
|
<br>
|
|
operationId: PeerController.Update
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
description: the peer id you want to get
|
|
required: true
|
|
type: string
|
|
- in: body
|
|
name: body
|
|
description: The peer content
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/models.peer'
|
|
responses:
|
|
"200":
|
|
description: ""
|
|
schema:
|
|
$ref: '#/definitions/models.peer'
|
|
/{id}/blacklist:
|
|
post:
|
|
tags:
|
|
- oc-peer/controllersPeerController
|
|
description: |-
|
|
add blacklist peer by peerid
|
|
<br>
|
|
operationId: PeerController.Blacklist
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
description: the peer id you want to blacklist
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: '{peer} models.peer'
|
|
/{id}/partner:
|
|
post:
|
|
tags:
|
|
- oc-peer/controllersPeerController
|
|
description: |-
|
|
add partner peer by peerid
|
|
<br>
|
|
operationId: PeerController.Partner
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
description: the peer id you want to partner
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: '{peer} models.peer'
|
|
/{id}/undo_state:
|
|
post:
|
|
tags:
|
|
- oc-peer/controllersPeerController
|
|
description: |-
|
|
delete state peer by peerid
|
|
<br>
|
|
operationId: PeerController.DeleteState
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
description: the peer id you want to delete state
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: '{peer} models.peer'
|
|
/search/{search}:
|
|
get:
|
|
tags:
|
|
- oc-peer/controllersPeerController
|
|
description: |-
|
|
search workspace
|
|
<br>
|
|
operationId: PeerController.Search
|
|
parameters:
|
|
- in: path
|
|
name: search
|
|
description: the word search you want to get
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: '{workspace} models.workspace'
|
|
/status/:
|
|
post:
|
|
tags:
|
|
- status
|
|
description: |-
|
|
get peer status if it's alive
|
|
<br>
|
|
operationId: StatusController.Status
|
|
parameters:
|
|
- in: body
|
|
name: body
|
|
description: of
|
|
schema:
|
|
$ref: '#/definitions/list'
|
|
responses:
|
|
"200":
|
|
description: '{status} models.status'
|
|
/version/:
|
|
get:
|
|
tags:
|
|
- version
|
|
description: |-
|
|
get version
|
|
<br>
|
|
operationId: VersionController.GetAll
|
|
responses:
|
|
"200":
|
|
description: ""
|
|
definitions:
|
|
list:
|
|
title: list
|
|
type: object
|
|
models.peer:
|
|
title: peer
|
|
type: object
|
|
tags:
|
|
- name: status
|
|
description: |
|
|
Operations about workflow
|
|
- name: oc-peer/controllersPeerController
|
|
description: |
|
|
Operations about workflow
|
|
- name: version
|
|
description: |
|
|
VersionController operations for Version
|