oc-peer/swagger/swagger.yml

180 lines
4.0 KiB
YAML
Raw Permalink Normal View History

2024-07-11 11:40:11 +02:00
swagger: "2.0"
info:
2024-10-15 10:51:12 +02:00
title: oc-peer
2024-07-11 11:40:11 +02:00
description: |
2024-09-04 17:23:30 +02:00
Manage OpenCloud peers
2024-07-11 11:40:11 +02:00
version: 1.0.0
2024-09-04 17:23:30 +02:00
termsOfService: http://cloud.o-forge.io/
2024-07-11 11:40:11 +02:00
contact:
2024-09-04 17:23:30 +02:00
email: admin@o-cloud.io
2024-07-11 11:40:11 +02:00
license:
2024-10-15 10:51:12 +02:00
name: AGPL
url: https://www.gnu.org/licenses/agpl-3.0.html
2024-07-24 10:25:08 +02:00
basePath: /oc/
2024-07-11 11:40:11 +02:00
paths:
2024-10-15 10:51:12 +02:00
/:
2024-07-11 11:40:11 +02:00
get:
tags:
2024-10-15 10:51:12 +02:00
- oc-peer/controllersPeerController
2024-07-11 11:40:11 +02:00
description: |-
2024-08-26 12:07:54 +02:00
find all peer
2024-07-11 11:40:11 +02:00
<br>
2024-08-26 12:07:54 +02:00
operationId: PeerController.GetAll
2024-07-11 11:40:11 +02:00
responses:
"200":
2024-08-26 12:07:54 +02:00
description: '{peer} models.peer'
2024-10-15 10:51:12 +02:00
/{id}:
2024-07-24 10:25:08 +02:00
get:
tags:
2024-10-15 10:51:12 +02:00
- oc-peer/controllersPeerController
2024-07-24 10:25:08 +02:00
description: |-
2024-08-26 12:07:54 +02:00
find peer by peerid
2024-07-24 10:25:08 +02:00
<br>
2024-08-26 12:07:54 +02:00
operationId: PeerController.Get
parameters:
- in: path
name: id
description: the peer id you want to get
required: true
type: string
2024-07-24 10:25:08 +02:00
responses:
"200":
2024-08-26 12:07:54 +02:00
description: '{peer} models.peer'
put:
2024-07-11 11:40:11 +02:00
tags:
2024-10-15 10:51:12 +02:00
- oc-peer/controllersPeerController
2024-07-11 11:40:11 +02:00
description: |-
2024-08-26 12:07:54 +02:00
create peers
2024-07-11 11:40:11 +02:00
<br>
2024-08-26 12:07:54 +02:00
operationId: PeerController.Update
2024-07-11 11:40:11 +02:00
parameters:
- in: path
2024-07-24 10:25:08 +02:00
name: id
2024-08-26 12:07:54 +02:00
description: the peer id you want to get
2024-07-11 11:40:11 +02:00
required: true
type: string
2024-08-26 12:07:54 +02:00
- in: body
name: body
description: The peer content
required: true
schema:
$ref: '#/definitions/models.peer'
2024-07-24 10:25:08 +02:00
responses:
"200":
2024-08-26 12:07:54 +02:00
description: ""
schema:
$ref: '#/definitions/models.peer'
2024-10-15 16:55:29 +02:00
/{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'
2024-10-15 10:51:12 +02:00
/search/{search}:
2024-08-06 11:09:38 +02:00
get:
tags:
2024-10-15 10:51:12 +02:00
- oc-peer/controllersPeerController
2024-08-06 11:09:38 +02:00
description: |-
search workspace
<br>
2024-08-26 12:07:54 +02:00
operationId: PeerController.Search
2024-08-06 11:09:38 +02:00
parameters:
- in: path
2024-08-26 12:07:54 +02:00
name: search
2024-08-06 11:09:38 +02:00
description: the word search you want to get
required: true
type: string
responses:
"200":
description: '{workspace} models.workspace'
2024-08-26 12:07:54 +02:00
/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
2024-07-11 11:40:11 +02:00
tags:
2024-08-26 12:07:54 +02:00
- name: status
description: |
Operations about workflow
2024-10-15 10:51:12 +02:00
- name: oc-peer/controllersPeerController
2024-08-06 11:09:38 +02:00
description: |
Operations about workflow
2024-07-11 11:40:11 +02:00
- name: version
description: |
VersionController operations for Version